/*
	Copyright (c) 2006-2012 ALPSTEIN Tourismus GmbH & Co. KG. All rights reserved.

	Find out more at http://www.alpstein-tourismus.com/

	Portions of this software are based on works provided by the 
	Dojo Foundation and are Copyright (c) 2004-2009, The Dojo Foundation.
*/

typeof dojo==="undefined"||dojo.provide("oa_v2.pages.tours");if(typeof dojo==="undefined"||!dojo._hasResource["alp.browser_desperate"]){typeof dojo==="undefined"||(dojo._hasResource["alp.browser_desperate"]=true);if(typeof dojo!=="undefined"){dojo.provide("alp.browser_desperate");}else{if(typeof alp==="undefined"){alp={};}if(typeof alp.browser_desperate==="undefined"){alp.browser_desperate={};}}(function(){alp.likeIE=_1;alp.likeIE_onactivate=_2;alp.likeIE8minus_backslash_v=_3;alp.likeIE9plus=_4;var _5;function _1(){return _5!=null?_5:(_5=_3()||_2());};var _6;function _3(){return _6!=null?_6:(_6=!+"\v1");};var _7;function _2(){return _7!=null?_7:(_7="onactivate" in document.createElement("div"));};var _8;function _4(){return _8!=null?_8:(_8=_2()&&!_3());};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.dom"]){typeof dojo==="undefined"||(dojo._hasResource["alp.dom"]=true);if(typeof dojo!=="undefined"){dojo.provide("alp.dom");}else{if(typeof alp==="undefined"){alp={};}if(typeof alp.dom==="undefined"){alp.dom={};}}(function(){var _9=Array.prototype.slice,_a={};var _b=/\bie9nofix\b/.test(document.location.search);var _c={DOMContentLoaded:"onload"},_d,_e=[],_f=_10(document,"DOMContentLoaded",function(){_d=true;_11();_12(_f);});alp.aC=_13;alp.aEL=_10;alp.autoRedrawIE9plus=_14;alp.body=_15;alp.cE=_16;alp.cookie=_17;alp.cookie.isSupported=_18;alp.cTxN=_19;alp.domWalkSelect=_1a;alp.gA=_1b;alp.gBodyNode=_1c;alp.gEBI=_1d;alp.gEBCN=_1e;alp.gEBTN=_1f;alp.gWindowScroll=_20;alp.hA=_21;alp.hasClass=_22;alp.head=_23;alp.newId=_24;alp.onDCL=_25;alp.orphan=_26;alp.place=_27;alp.rEL=_12;alp.redrawIE9=_28;alp.rA=_29;alp.sA=_2a;alp.setProp=_2b;alp.setClass=_2c;function _13(_2d,_2e){_2d.appendChild(_2e);};function _10(_2f,_30,_31,_32){var arr=_2f instanceof Array?_2f:[_2f];for(var a=arr.length;a--;){var _33=arr[a];if(_33.addEventListener){_33.addEventListener(_30,_31,_32);}else{if(_33.attachEvent){var _34=_c[_30]||("on"+_30);(_30==="DOMContentLoaded"?window:_33).attachEvent(_34,_31);}else{console.error("alp_aEL failed.",a,arguments);}}}var ret=_9.call(arguments);ret.alp_aEL=true;return ret;};var _35;function _15(){return _35||(_35=document.body||_1f("body")[0]||_1a(document,function(_36){return _36!==document&&/body/i.test(_36.tagName);},true));};function _16(_37,_38,_39,_3a){if(_39&&alp.likeIE8minus_backslash_v()){if(!/^[^\<\>]+$/.test(_37)){console.error("alp.cE(): the IE8- workaround needs a simple tag name. Workaround skipped.");}else{_37="<"+_37;for(var k in _39){if(!(k in _a)){_37+=" "+k+"=\""+_39[k].replace(/"/g,"\\\"")+"\"";}}_39=null;_37+=">";}}var ret=document.createElement(_37);if(_39){_2a(ret,_39);}if(_3a){_2b(ret,_3a);}if(_38){_13(_38,ret);}return ret;};function _17(_3b,_3c,_3d){var doc=document;if(_3c==null){var c=doc.cookie,m=c.match(new RegExp("(?:^|; )"+_3b.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));return (m||[])[1];}_3d||(_3d={});var exp=_3d.expires;if(typeof exp==="number"){var d=new Date();d.setTime(d.getTime()+exp*24*60*60*1000);exp=_3d.expires=d;}if(exp&&exp.toUTCString){_3d.expires=exp.toUTCString();}_3c=encodeURIComponent(_3c);var _3e=_3b+"="+_3c,_3f,_40={};for(_3f in _3d){if(!(_3f in _40)){_3e+="; "+_3f;var _41=_3d[_3f];if(_41!==true){_3e+="="+_41;}}}document.cookie=_3e;};function _18(){if(!("cookieEnabled" in navigator)){this("__alpCookieTest__","CookiesAllowed");navigator.cookieEnabled=this("__alpCookieTest__")=="CookiesAllowed";if(navigator.cookieEnabled){this("__alpCookieTest__","",{expires:-1});}}return navigator.cookieEnabled;};function _19(_42,_43){var ret=document.createTextNode(_42);if(_43){_13(_43,ret);}return ret;};function _12(_44){var arg=arguments.length>1?arguments:_44;var _45=arg[0],_46=_45 instanceof Array?_45:[_45],_47=arg[1],_48=arg[2],_49=arg[3];for(var a=_46.length;a--;){var _4a=_46[a];if(_4a.removeEventListener){_4a.removeEventListener(_47,_48,_49);}else{if(_4a.detachEvent){var _4b=_c[_47]||("on"+_47);(_47==="DOMContentLoaded"?window:_4a).detachEvent(_4b,_48);}else{console.error("alp_rEL failed.",a,arguments);}}}};function _14(){if(!alp.likeIE9plus()||_14.isActive){return;}_14.isActive=true;var d=document,w=window,_4c=/(html|body|select|option|input|textarea)/i;_10(d,"activate",_4d);_10(d,"deactivate",_4d);_10(d,"click",_4d);_10(d,"mouseover",_4d);_10(d,"mouseout",_4d);_10(d,"mousemove",_4d);_10(d,"mouseenter",_4d);_10(d,"mouseleave",_4d);function _4d(e){e=e||w.event;var t=e&&(e.target||e.srcElement);if(t&&!_4c.test(t.tagName)&&!_4e(t,"iframe")){alp.redrawIE9(t);}return e;};function _4e(t,_4f){var rx=new RegExp(_4f,"i");while(t){if(rx.test(t.tagName)){return true;}t=t.parentNode;}return false;};};function _1a(_50,_51,_52){var ret=[],_53=_50,_54;while(true){var up=_54&&_54.parentNode===_53;if(!up&&_51(_53)){if(_52){return _53;}else{ret.push(_53);}}var _55=((!up&&_53.firstChild)||_53.nextSibling||_53.parentNode);if(!_55||_55===_50){break;}_54=_53;_53=_55;}if(_52){return;}return ret;};function _1b(_56,_57){return _56.getAttribute(_57);};var _58;function _1c(){if(_58){return _58;}var dgb=document.getElementsByTagName("body");return (_58=(dgb&&dgb[0])||document.body||_1a(document.documentElement||document,function(_59){return _59.tagName==="body";},true));};var _5a="getElementById";function _1d(id){if(document[_5a]){return document[_5a](id);}else{return _1a(_1c(),function(_5b){return _5b&&_5b.id===id;},true);}};var _5c="getElementsByClassName";function _1e(_5d,_5e){_5e||(_5e=document);if(typeof _5d==="string"){if(_5e[_5c]){return _9.call(_5e[_5c](_5d));}var rx=new RegExp("\\b"+_5d+"\\b");return _1a(_5e,function(_5f){return _5f!==_5e&&_5f.className&&rx.test(_5f.className);});}var ret=[];for(var n=_5d.length,a=0;a<n;a++){var _60=_5d[a];if(_5e[_5c]){ret=ret.concat(_9.call(_5e[_5c](_60)));}else{var rx=new RegExp("\\b"+_60+"\\b");ret=ret.concat(_1a(_5e,function(_61){return _61!==_5e&&_61.className&&rx.test(_61.className);}));}}return ret;};function _1f(_62){return document.getElementsByTagName(_62);};function _20(){var w=window;if("number"===typeof w.pageXOffset&&"number"===typeof w.pageYOffset){return {left:w.pageXOffset,top:w.pageYOffset};}var t=document.documentElement||document.body.parentNode;if(t){var ret={left:("number"===typeof t.scrollLeft)?t.scrollLeft:document.body.scrollLeft,top:("number"===typeof t.scrollTop)?t.scrollTop:document.body.scrollTop};if("number"===typeof ret.left&&"number"===typeof ret.top){return ret;}}return {left:w.scrollX,top:w.scrollY};};function _21(_63,_64){if(_63.hasAttribute){return _63.hasAttribute(_64);}else{return null!=_63.getAttribute(_64);}};function _22(_65,_66){var rx=new RegExp("\\b"+_66+"\\b");return rx.test(_65.className);};var _67;function _23(){return _67||(_67=document.head||_1f("head")[0]||_1a(document,function(_68){return _68!==document&&/head/i.test(_68.tagName);},true));};function _24(_69){_69||(_69="alp");var _6a=null;while(true){var _6b=_69+(_6a==null?"":_6a);if(!alp.gEBI(_6b)){return _6b;}if(_6a==null){_6a=0;}else{_6a++;}}};function _25(_6c){_e.push(_6c);_11();};function _26(_6d){var arr="parentNode" in _6d?[_6d]:_6d;for(var a=arr.length;a--;){var _6e=arr[a],p=_6e.parentNode;if(p){p.removeChild(_6e);}}};var _6f=0,_70=1,_71=2,_72=3,_73={first:_6f,last:_70,before:_71,after:_72};function _27(_74,ref,_75){_75||(_75="first");var arr="parentNode" in _74?[_74]:_74,pos=_73[_75.toLowerCase()];for(var n=arr.length,a=0;a<n;a++){var _76=arr[a];if(pos===_70||(pos===_6f&&!ref.firstChild)){ref.appendChild(_76);}else{if(pos===_6f){ref.insertBefore(_76,ref.firstChild);}else{if(pos===_71){ref.parentNode.insertBefore(_76,ref);}else{if(pos===_72){if(ref.nextSibling){ref.parentNode.insertBefore(_76,ref.nextSibling);}else{ref.parentNode.appendChild(_76);}}else{throw new Error("alp.place(): unknown position string \""+_75+"\". Please use \"first\", \"last\", \"before\" or \"after\".");}}}}}};function _28(_77){if(_b||!alp.likeIE9plus()){return;}if(!_77||_77===window||!("tagName" in _77&&"style" in _77)){return;}if(alp.util&&alp.util.asyncHitch){alp.util.asyncHitch(_78,null,37)();}else{setTimeout(_78,37);}function _78(){var _79=_77.style.visibility;_77.style.visibility="hidden";_77.offsetWidth;_77.offsetHeight;_77.style.visibility=_79;_77.offsetWidth;_77.offsetHeight;};};function _29(_7a,_7b){_7a.removeAttribute(_7b);};function _2a(_7c,_7d,_7e){if(arguments.length>2){_7c.setAttribute(_7d,""+_7e);}else{for(var k in _7d){if(!(k in _a)){_7c.setAttribute(k,""+_7d[k]);}}}};function _2b(_7f,_80,_81){if(arguments.length>2){_7f[_80]=_81;}else{for(var k in _80){if(!(k in _a)){_7f[k]=_80[k];}}}};function _2c(_82,_83,_84){var obj;if(arguments.length>2){obj={};obj[_83]=_84;}else{obj=_83;}var s=_82.className,_85=s;for(var k in obj){if(!(k in _a)){var rx=new RegExp("\\b"+k+"\\b","g");if(obj[k]){if(!rx.test(_85)){_85+=" "+k;}}else{_85=_85.replace(rx,"");}}}_85=_85.replace(/(^\s+|\s+$)/g,"");if(_85!=s){_82.className=_85;}};function _11(){if(_d){while(_e.length){try{_e.shift()();}finally{_11();}}}};})();}if(typeof dojo==="undefined"||!dojo._hasResource["dijit.form._FormWidget"]){typeof dojo==="undefined"||(dojo._hasResource["dijit.form._FormWidget"]=true);dojo.provide("dijit.form._FormWidget");dojo.declare("dijit.form._FormWidget",[dijit._Widget,dijit._Templated],{baseClass:"",name:"",alt:"",value:"",type:"text",tabIndex:"0",disabled:false,intermediateChanges:false,scrollOnFocus:true,attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{value:"focusNode",id:"focusNode",tabIndex:"focusNode",alt:"focusNode",title:"focusNode"}),postMixInProperties:function(){this.nameAttrSetting=this.name?("name='"+this.name+"'"):"";this.inherited(arguments);},_setDisabledAttr:function(_86){this.disabled=_86;dojo.attr(this.focusNode,"disabled",_86);if(this.valueNode){dojo.attr(this.valueNode,"disabled",_86);}dijit.setWaiState(this.focusNode,"disabled",_86);if(_86){this._hovering=false;this._active=false;this.focusNode.setAttribute("tabIndex","-1");}else{this.focusNode.setAttribute("tabIndex",this.tabIndex);}this._setStateClass();},setDisabled:function(_87){dojo.deprecated("setDisabled("+_87+") is deprecated. Use attr('disabled',"+_87+") instead.","","2.0");this.attr("disabled",_87);},_onFocus:function(e){if(this.scrollOnFocus){dijit.scrollIntoView(this.domNode);}this.inherited(arguments);},_onMouse:function(_88){var _89=_88.currentTarget;if(_89&&_89.getAttribute){this.stateModifier=_89.getAttribute("stateModifier")||"";}if(!this.disabled){switch(_88.type){case "mouseenter":case "mouseover":this._hovering=true;this._active=this._mouseDown;break;case "mouseout":case "mouseleave":this._hovering=false;this._active=false;break;case "mousedown":this._active=true;this._mouseDown=true;var _8a=this.connect(dojo.body(),"onmouseup",function(){if(this._mouseDown&&this.isFocusable()){this.focus();}this._active=false;this._mouseDown=false;this._setStateClass();this.disconnect(_8a);});break;}this._setStateClass();}},isFocusable:function(){return !this.disabled&&!this.readOnly&&this.focusNode&&(dojo.style(this.domNode,"display")!="none");},focus:function(){dijit.focus(this.focusNode);},_setStateClass:function(){var _8b=this.baseClass.split(" ");function _8c(_8d){_8b=_8b.concat(dojo.map(_8b,function(c){return c+_8d;}),"dijit"+_8d);};if(this.checked){_8c("Checked");}if(this.state){_8c(this.state);}if(this.selected){_8c("Selected");}if(this.disabled){_8c("Disabled");}else{if(this.readOnly){_8c("ReadOnly");}else{if(this._active){_8c(this.stateModifier+"Active");}else{if(this._focused){_8c("Focused");}if(this._hovering){_8c(this.stateModifier+"Hover");}}}}var tn=this.stateNode||this.domNode,_8e={};dojo.forEach(tn.className.split(" "),function(c){_8e[c]=true;});if("_stateClasses" in this){dojo.forEach(this._stateClasses,function(c){delete _8e[c];});}dojo.forEach(_8b,function(c){_8e[c]=true;});var _8f=[];for(var c in _8e){if(_8e.hasOwnProperty(c)){_8f.push(c);}}tn.className=_8f.join(" ");this._stateClasses=_8b;},compare:function(_90,_91){if(typeof _90=="number"&&typeof _91=="number"){return (isNaN(_90)&&isNaN(_91))?0:_90-_91;}else{if(_90>_91){return 1;}else{if(_90<_91){return -1;}else{return 0;}}}},onChange:function(_92){},_onChangeActive:false,_handleOnChange:function(_93,_94){this._lastValue=_93;if(this._lastValueReported==undefined&&(_94===null||!this._onChangeActive)){this._resetValue=this._lastValueReported=_93;}if((this.intermediateChanges||_94||_94===undefined)&&((typeof _93!=typeof this._lastValueReported)||this.compare(_93,this._lastValueReported)!=0)){this._lastValueReported=_93;if(this._onChangeActive){if(this._onChangeHandle){clearTimeout(this._onChangeHandle);}this._onChangeHandle=setTimeout(dojo.hitch(this,function(){this._onChangeHandle=null;this.onChange(_93);}),0);}}},create:function(){this.inherited(arguments);this._onChangeActive=true;this._setStateClass();},destroy:function(){if(this._onChangeHandle){clearTimeout(this._onChangeHandle);this.onChange(this._lastValueReported);}this.inherited(arguments);},setValue:function(_95){dojo.deprecated("dijit.form._FormWidget:setValue("+_95+") is deprecated.  Use attr('value',"+_95+") instead.","","2.0");this.attr("value",_95);},getValue:function(){dojo.deprecated(this.declaredClass+"::getValue() is deprecated. Use attr('value') instead.","","2.0");return this.attr("value");}});dojo.declare("dijit.form._FormValueWidget",dijit.form._FormWidget,{readOnly:false,attributeMap:dojo.delegate(dijit.form._FormWidget.prototype.attributeMap,{value:"",readOnly:"focusNode"}),_setReadOnlyAttr:function(_96){this.readOnly=_96;dojo.attr(this.focusNode,"readOnly",_96);dijit.setWaiState(this.focusNode,"readonly",_96);this._setStateClass();},postCreate:function(){if(dojo.isIE){this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown);}if(this._resetValue===undefined){this._resetValue=this.value;}},_setValueAttr:function(_97,_98){this.value=_97;this._handleOnChange(_97,_98);},_getValueAttr:function(){return this._lastValue;},undo:function(){this._setValueAttr(this._lastValueReported,false);},reset:function(){this._hasBeenBlurred=false;this._setValueAttr(this._resetValue,true);},_onKeyDown:function(e){if(e.keyCode==dojo.keys.ESCAPE&&!(e.ctrlKey||e.altKey||e.metaKey)){var te;if(dojo.isIE){e.preventDefault();te=document.createEventObject();te.keyCode=dojo.keys.ESCAPE;te.shiftKey=e.shiftKey;e.srcElement.fireEvent("onkeypress",te);}}},_layoutHackIE7:function(){if(dojo.isIE==7){var _99=this.domNode;var _9a=_99.parentNode;var _9b=_99.firstChild||_99;var _9c=_9b.style.filter;while(_9a&&_9a.clientHeight==0){_9a._disconnectHandle=this.connect(_9a,"onscroll",dojo.hitch(this,function(e){this.disconnect(_9a._disconnectHandle);_9a.removeAttribute("_disconnectHandle");_9b.style.filter=(new Date()).getMilliseconds();setTimeout(function(){_9b.style.filter=_9c;},0);}));_9a=_9a.parentNode;}}}});}if(typeof dojo==="undefined"||!dojo._hasResource["dijit._HasDropDown"]){typeof dojo==="undefined"||(dojo._hasResource["dijit._HasDropDown"]=true);dojo.provide("dijit._HasDropDown");dojo.declare("dijit._HasDropDown",null,{_buttonNode:null,_arrowWrapperNode:null,_popupStateNode:null,_aroundNode:null,dropDown:null,autoWidth:true,forceWidth:false,maxHeight:0,dropDownPosition:["below","above"],_stopClickEvents:true,_onDropDownMouse:function(e){if(e.type=="click"&&!this._seenKeydown){return;}this._seenKeydown=false;if(e.type=="mousedown"){this._docHandler=this.connect(dojo.doc,"onmouseup","_onDropDownMouseup");}if(this.disabled||this.readOnly){return;}if(this._stopClickEvents){dojo.stopEvent(e);}this.toggleDropDown();if(e.type=="click"||e.type=="keypress"){this._onDropDownMouseup();}},_onDropDownMouseup:function(e){if(e&&this._docHandler){this.disconnect(this._docHandler);}var _9d=this.dropDown,_9e=false;if(e&&this._opened){var c=dojo.position(this._buttonNode,true);if(!(e.pageX>=c.x&&e.pageX<=c.x+c.w)||!(e.pageY>=c.y&&e.pageY<=c.y+c.h)){var t=e.target;while(t&&!_9e){if(dojo.hasClass(t,"dijitPopup")){_9e=true;}else{t=t.parentNode;}}if(_9e){t=e.target;if(_9d.onItemClick){var _9f;while(t&&!(_9f=dijit.byNode(t))){t=t.parentNode;}if(_9f&&_9f.onClick&&_9f.getParent){_9f.getParent().onItemClick(_9f,e);}}return;}}}if(this._opened&&_9d.focus){window.setTimeout(dojo.hitch(_9d,"focus"),1);}},_setupDropdown:function(){this._buttonNode=this._buttonNode||this.focusNode||this.domNode;this._popupStateNode=this._popupStateNode||this.focusNode||this._buttonNode;this._aroundNode=this._aroundNode||this.domNode;this.connect(this._buttonNode,"onmousedown","_onDropDownMouse");this.connect(this._buttonNode,"onclick","_onDropDownMouse");this.connect(this._buttonNode,"onkeydown","_onDropDownKeydown");this.connect(this._buttonNode,"onblur","_onDropDownBlur");this.connect(this._buttonNode,"onkeypress","_onKey");if(this._setStateClass){this.connect(this,"openDropDown","_setStateClass");this.connect(this,"closeDropDown","_setStateClass");}var _a0={"after":this.isLeftToRight()?"Right":"Left","before":this.isLeftToRight()?"Left":"Right","above":"Up","below":"Down","left":"Left","right":"Right"}[this.dropDownPosition[0]]||this.dropDownPosition[0]||"Down";dojo.addClass(this._arrowWrapperNode||this._buttonNode,"dijit"+_a0+"ArrowButton");},postCreate:function(){this._setupDropdown();this.inherited(arguments);},destroyDescendants:function(){if(this.dropDown){if(!this.dropDown._destroyed){this.dropDown.destroyRecursive();}delete this.dropDown;}this.inherited(arguments);},_onDropDownKeydown:function(e){this._seenKeydown=true;},_onKeyPress:function(e){if(this._opened&&e.charOrCode==dojo.keys.ESCAPE&&!e.shiftKey&&!e.ctrlKey&&!e.altKey){this.toggleDropDown();dojo.stopEvent(e);return;}this.inherited(arguments);},_onDropDownBlur:function(e){this._seenKeydown=false;},_onKey:function(e){if(this.disabled||this.readOnly){return;}var d=this.dropDown;if(d&&this._opened&&d.handleKey){if(d.handleKey(e)===false){return;}}if(d&&this._opened&&e.keyCode==dojo.keys.ESCAPE){this.toggleDropDown();return;}if(e.keyCode==dojo.keys.DOWN_ARROW||e.keyCode==dojo.keys.ENTER||e.charOrCode==" "){this._onDropDownMouse(e);}},_onBlur:function(){this.closeDropDown();this.inherited(arguments);},isLoaded:function(){return true;},loadDropDown:function(_a1){_a1();},toggleDropDown:function(){if(this.disabled||this.readOnly){return;}this.focus();var _a2=this.dropDown;if(!_a2){return;}if(!this._opened){if(!this.isLoaded()){this.loadDropDown(dojo.hitch(this,"openDropDown"));return;}else{this.openDropDown();}}else{this.closeDropDown();}},openDropDown:function(){var _a3=this.dropDown;var _a4=_a3.domNode;var _a5=this;if(!this._preparedNode){dijit.popup.moveOffScreen(_a4);this._preparedNode=true;if(_a4.style.width){this._explicitDDWidth=true;}if(_a4.style.height){this._explicitDDHeight=true;}}if(this.maxHeight||this.forceWidth||this.autoWidth){var _a6={display:"",visibility:"hidden"};if(!this._explicitDDWidth){_a6.width="";}if(!this._explicitDDHeight){_a6.height="";}dojo.style(_a4,_a6);var mb=dojo.marginBox(_a4);var _a7=(this.maxHeight&&mb.h>this.maxHeight);dojo.style(_a4,{overflow:_a7?"auto":"hidden"});if(this.forceWidth){mb.w=this.domNode.offsetWidth;}else{if(this.autoWidth){mb.w=Math.max(mb.w,this.domNode.offsetWidth);}else{delete mb.w;}}if(_a7){mb.h=this.maxHeight;if("w" in mb){mb.w+=16;}}else{delete mb.h;}delete mb.t;delete mb.l;if(dojo.isFunction(_a3.resize)){_a3.resize(mb);}else{dojo.marginBox(_a4,mb);}}var _a8=dijit.popup.open({parent:this,popup:_a3,around:this._aroundNode,orient:dijit.getPopupAroundAlignment((this.dropDownPosition&&this.dropDownPosition.length)?this.dropDownPosition:["below"],this.isLeftToRight()),onExecute:function(){_a5.closeDropDown(true);},onCancel:function(){_a5.closeDropDown(true);},onClose:function(){dojo.attr(_a5._popupStateNode,"popupActive",false);dojo.removeClass(_a5._popupStateNode,"dijitHasDropDownOpen");_a5._opened=false;_a5.state="";}});dojo.attr(this._popupStateNode,"popupActive","true");dojo.addClass(_a5._popupStateNode,"dijitHasDropDownOpen");this._opened=true;this.state="Opened";return _a8;},closeDropDown:function(_a9){if(this._opened){dijit.popup.close(this.dropDown);if(_a9){this.focus();}this._opened=false;this.state="";}}});}if(typeof dojo==="undefined"||!dojo._hasResource["dijit.form.Button"]){typeof dojo==="undefined"||(dojo._hasResource["dijit.form.Button"]=true);dojo.provide("dijit.form.Button");dojo.declare("dijit.form.Button",dijit.form._FormWidget,{label:"",showLabel:true,iconClass:"",type:"button",baseClass:"dijitButton",templateString:dojo.cache("dijit.form","templates/Button.html","<span class=\"dijit dijitReset dijitLeft dijitInline\"\n\tdojoAttachEvent=\"onclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"\n\t><span class=\"dijitReset dijitRight dijitInline\"\n\t\t><span class=\"dijitReset dijitInline dijitButtonNode\"\n\t\t\t><button class=\"dijitReset dijitStretch dijitButtonContents\"\n\t\t\t\tdojoAttachPoint=\"titleNode,focusNode\"\n\t\t\t\t${nameAttrSetting} type=\"${type}\" value=\"${value}\" waiRole=\"button\" waiState=\"labelledby-${id}_label\"\n\t\t\t\t><span class=\"dijitReset dijitInline\" dojoAttachPoint=\"iconNode\"\n\t\t\t\t\t><span class=\"dijitReset dijitToggleButtonIconChar\">&#10003;</span\n\t\t\t\t></span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"\n\t\t\t\t\tid=\"${id}_label\"\n\t\t\t\t\tdojoAttachPoint=\"containerNode\"\n\t\t\t\t></span\n\t\t\t></button\n\t\t></span\n\t></span\n></span>\n"),attributeMap:dojo.delegate(dijit.form._FormWidget.prototype.attributeMap,{label:{node:"containerNode",type:"innerHTML"},iconClass:{node:"iconNode",type:"class"}}),_onClick:function(e){if(this.disabled){return false;}this._clicked();return this.onClick(e);},_onButtonClick:function(e){if(this._onClick(e)===false){e.preventDefault();}else{if(this.type=="submit"&&!this.focusNode.form){for(var _aa=this.domNode;_aa.parentNode;_aa=_aa.parentNode){var _ab=dijit.byNode(_aa);if(_ab&&typeof _ab._onSubmit=="function"){_ab._onSubmit(e);break;}}}}},_setValueAttr:function(_ac){var _ad=this.attributeMap.value||"";if(this[_ad.node||_ad||"domNode"].tagName=="BUTTON"){if(_ac!=this.value){console.debug("Cannot change the value attribute on a Button widget.");}}},_fillContent:function(_ae){if(_ae&&(!this.params||!("label" in this.params))){this.attr("label",_ae.innerHTML);}},postCreate:function(){dojo.setSelectable(this.focusNode,false);this.inherited(arguments);},_setShowLabelAttr:function(val){if(this.containerNode){dojo.toggleClass(this.containerNode,"dijitDisplayNone",!val);}this.showLabel=val;},onClick:function(e){return true;},_clicked:function(e){},setLabel:function(_af){dojo.deprecated("dijit.form.Button.setLabel() is deprecated.  Use attr('label', ...) instead.","","2.0");this.attr("label",_af);},_setLabelAttr:function(_b0){this.containerNode.innerHTML=this.label=_b0;if(this.showLabel==false&&!this.params.title){this.titleNode.title=dojo.trim(this.containerNode.innerText||this.containerNode.textContent||"");}}});dojo.declare("dijit.form.DropDownButton",[dijit.form.Button,dijit._Container,dijit._HasDropDown],{baseClass:"dijitDropDownButton",templateString:dojo.cache("dijit.form","templates/DropDownButton.html","<span class=\"dijit dijitReset dijitLeft dijitInline\"\n\tdojoAttachPoint=\"_buttonNode\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"\n\t><span class='dijitReset dijitRight dijitInline'\n\t\t><span class='dijitReset dijitInline dijitButtonNode'\n\t\t\t><button class=\"dijitReset dijitStretch dijitButtonContents\"\n\t\t\t\t${nameAttrSetting} type=\"${type}\" value=\"${value}\"\n\t\t\t\tdojoAttachPoint=\"focusNode,titleNode,_arrowWrapperNode\"\n\t\t\t\twaiRole=\"button\" waiState=\"haspopup-true,labelledby-${id}_label\"\n\t\t\t\t><span class=\"dijitReset dijitInline\"\n\t\t\t\t\tdojoAttachPoint=\"iconNode\"\n\t\t\t\t></span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"\n\t\t\t\t\tdojoAttachPoint=\"containerNode,_popupStateNode\"\n\t\t\t\t\tid=\"${id}_label\"\n\t\t\t\t></span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonInner\">&thinsp;</span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonChar\">&#9660;</span\n\t\t\t></button\n\t\t></span\n\t></span\n></span>\n"),_fillContent:function(){if(this.srcNodeRef){var _b1=dojo.query("*",this.srcNodeRef);dijit.form.DropDownButton.superclass._fillContent.call(this,_b1[0]);this.dropDownContainer=this.srcNodeRef;}},startup:function(){if(this._started){return;}if(!this.dropDown){var _b2=dojo.query("[widgetId]",this.dropDownContainer)[0];this.dropDown=dijit.byNode(_b2);delete this.dropDownContainer;}dijit.popup.moveOffScreen(this.dropDown.domNode);this.inherited(arguments);},isLoaded:function(){var _b3=this.dropDown;return (!_b3.href||_b3.isLoaded);},loadDropDown:function(){var _b4=this.dropDown;if(!_b4){return;}if(!this.isLoaded()){var _b5=dojo.connect(_b4,"onLoad",this,function(){dojo.disconnect(_b5);this.openDropDown();});_b4.refresh();}else{this.openDropDown();}},isFocusable:function(){return this.inherited(arguments)&&!this._mouseDown;}});dojo.declare("dijit.form.ComboButton",dijit.form.DropDownButton,{templateString:dojo.cache("dijit.form","templates/ComboButton.html","<table class='dijit dijitReset dijitInline dijitLeft'\n\tcellspacing='0' cellpadding='0' waiRole=\"presentation\"\n\t><tbody waiRole=\"presentation\"><tr waiRole=\"presentation\"\n\t\t><td class=\"dijitReset dijitStretch dijitButtonNode\"><button id=\"${id}_button\" class=\"dijitReset dijitButtonContents\"\n\t\t\tdojoAttachEvent=\"onclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse,onkeypress:_onButtonKeyPress\"  dojoAttachPoint=\"titleNode\"\n\t\t\twaiRole=\"button\" waiState=\"labelledby-${id}_label\"\n\t\t\t><div class=\"dijitReset dijitInline\" dojoAttachPoint=\"iconNode\" waiRole=\"presentation\"></div\n\t\t\t><div class=\"dijitReset dijitInline dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\" waiRole=\"presentation\"></div\n\t\t></button></td\n\t\t><td id=\"${id}_arrow\" class='dijitReset dijitRight dijitButtonNode dijitArrowButton'\n\t\t\tdojoAttachPoint=\"_popupStateNode,focusNode,_buttonNode\"\n\t\t\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onkeypress:_onArrowKeyPress\"\n\t\t\tstateModifier=\"DownArrow\"\n\t\t\ttitle=\"${optionsTitle}\" ${nameAttrSetting}\n\t\t\twaiRole=\"button\" waiState=\"haspopup-true\"\n\t\t\t><div class=\"dijitReset dijitArrowButtonInner\" waiRole=\"presentation\">&thinsp;</div\n\t\t\t><div class=\"dijitReset dijitArrowButtonChar\" waiRole=\"presentation\">&#9660;</div\n\t\t></td\n\t></tr></tbody\n></table>\n"),attributeMap:dojo.mixin(dojo.clone(dijit.form.Button.prototype.attributeMap),{id:"",tabIndex:["focusNode","titleNode"],title:"titleNode"}),optionsTitle:"",baseClass:"dijitComboButton",_focusedNode:null,postCreate:function(){this.inherited(arguments);this._focalNodes=[this.titleNode,this._popupStateNode];var _b6=dojo.isIE;dojo.forEach(this._focalNodes,dojo.hitch(this,function(_b7){this.connect(_b7,_b6?"onactivate":"onfocus",this._onNodeFocus);this.connect(_b7,_b6?"ondeactivate":"onblur",this._onNodeBlur);}));if(_b6&&(_b6<8||dojo.isQuirks)){var tn=this.titleNode;tn.style.width=tn.scrollWidth+"px";this.connect(tn,"onresize",function(){setTimeout(function(){tn.style.width=tn.scrollWidth+"px";},0);});}},_onNodeFocus:function(evt){this._focusedNode=evt.currentTarget;var fnc=this._focusedNode==this.focusNode?"dijitDownArrowButtonFocused":"dijitButtonContentsFocused";dojo.addClass(this._focusedNode,fnc);},_onNodeBlur:function(evt){var fnc=evt.currentTarget==this.focusNode?"dijitDownArrowButtonFocused":"dijitButtonContentsFocused";dojo.removeClass(evt.currentTarget,fnc);},_onBlur:function(){this.inherited(arguments);this._focusedNode=null;},_onButtonKeyPress:function(evt){if(evt.charOrCode==dojo.keys[this.isLeftToRight()?"RIGHT_ARROW":"LEFT_ARROW"]){dijit.focus(this._popupStateNode);dojo.stopEvent(evt);}},_onArrowKeyPress:function(evt){if(evt.charOrCode==dojo.keys[this.isLeftToRight()?"LEFT_ARROW":"RIGHT_ARROW"]){dijit.focus(this.titleNode);dojo.stopEvent(evt);}},focus:function(_b8){dijit.focus(_b8=="start"?this.titleNode:this._popupStateNode);}});dojo.declare("dijit.form.ToggleButton",dijit.form.Button,{baseClass:"dijitToggleButton",checked:false,attributeMap:dojo.mixin(dojo.clone(dijit.form.Button.prototype.attributeMap),{checked:"focusNode"}),_clicked:function(evt){this.attr("checked",!this.checked);},_setCheckedAttr:function(_b9){this.checked=_b9;dojo.attr(this.focusNode||this.domNode,"checked",_b9);dijit.setWaiState(this.focusNode||this.domNode,"pressed",_b9);this._setStateClass();this._handleOnChange(_b9,true);},setChecked:function(_ba){dojo.deprecated("setChecked("+_ba+") is deprecated. Use attr('checked',"+_ba+") instead.","","2.0");this.attr("checked",_ba);},reset:function(){this._hasBeenBlurred=false;this.attr("checked",this.params.checked||false);}});}if(typeof dojo==="undefined"||!dojo._hasResource["dojo.number"]){typeof dojo==="undefined"||(dojo._hasResource["dojo.number"]=true);dojo.provide("dojo.number");dojo.number.format=function(_bb,_bc){_bc=dojo.mixin({},_bc||{});var _bd=dojo.i18n.normalizeLocale(_bc.locale);var _be=dojo.i18n.getLocalization("dojo.cldr","number",_bd);_bc.customs=_be;var _bf=_bc.pattern||_be[(_bc.type||"decimal")+"Format"];if(isNaN(_bb)||Math.abs(_bb)==Infinity){return null;}return dojo.number._applyPattern(_bb,_bf,_bc);};dojo.number._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;dojo.number._applyPattern=function(_c0,_c1,_c2){_c2=_c2||{};var _c3=_c2.customs.group;var _c4=_c2.customs.decimal;var _c5=_c1.split(";");var _c6=_c5[0];_c1=_c5[(_c0<0)?1:0]||("-"+_c6);if(_c1.indexOf("%")!=-1){_c0*=100;}else{if(_c1.indexOf("‰")!=-1){_c0*=1000;}else{if(_c1.indexOf("¤")!=-1){_c3=_c2.customs.currencyGroup||_c3;_c4=_c2.customs.currencyDecimal||_c4;_c1=_c1.replace(/\u00a4{1,3}/,function(_c7){var _c8=["symbol","currency","displayName"][_c7.length-1];return _c2[_c8]||_c2.currency||"";});}else{if(_c1.indexOf("E")!=-1){throw new Error("exponential notation not supported");}}}}var _c9=dojo.number._numberPatternRE;var _ca=_c6.match(_c9);if(!_ca){throw new Error("unable to find a number expression in pattern: "+_c1);}if(_c2.fractional===false){_c2.places=0;}return _c1.replace(_c9,dojo.number._formatAbsolute(_c0,_ca[0],{decimal:_c4,group:_c3,places:_c2.places,round:_c2.round}));};dojo.number.round=function(_cb,_cc,_cd){var _ce=10/(_cd||10);return (_ce*+_cb).toFixed(_cc)/_ce;};if((0.9).toFixed()==0){(function(){var _cf=dojo.number.round;dojo.number.round=function(v,p,m){var d=Math.pow(10,-p||0),a=Math.abs(v);if(!v||a>=d||a*Math.pow(10,p+1)<5){d=0;}return _cf(v,p,m)+(v>0?d:-d);};})();}dojo.number._formatAbsolute=function(_d0,_d1,_d2){_d2=_d2||{};if(_d2.places===true){_d2.places=0;}if(_d2.places===Infinity){_d2.places=6;}var _d3=_d1.split(".");var _d4=(_d2.places>=0)?_d2.places:(_d3[1]&&_d3[1].length)||0;if(!(_d2.round<0)){_d0=dojo.number.round(_d0,_d4,_d2.round);}var _d5=String(Math.abs(_d0)).split(".");var _d6=_d5[1]||"";if(_d2.places){var _d7=dojo.isString(_d2.places)&&_d2.places.indexOf(",");if(_d7){_d2.places=_d2.places.substring(_d7+1);}_d5[1]=dojo.string.pad(_d6.substr(0,_d2.places),_d2.places,"0",true);}else{if(_d3[1]&&_d2.places!==0){var pad=_d3[1].lastIndexOf("0")+1;if(pad>_d6.length){_d5[1]=dojo.string.pad(_d6,pad,"0",true);}var _d8=_d3[1].length;if(_d8<_d6.length){_d5[1]=_d6.substr(0,_d8);}}else{if(_d5[1]){_d5.pop();}}}var _d9=_d3[0].replace(",","");pad=_d9.indexOf("0");if(pad!=-1){pad=_d9.length-pad;if(pad>_d5[0].length){_d5[0]=dojo.string.pad(_d5[0],pad);}if(_d9.indexOf("#")==-1){_d5[0]=_d5[0].substr(_d5[0].length-pad);}}var _da=_d3[0].lastIndexOf(",");var _db,_dc;if(_da!=-1){_db=_d3[0].length-_da-1;var _dd=_d3[0].substr(0,_da);_da=_dd.lastIndexOf(",");if(_da!=-1){_dc=_dd.length-_da-1;}}var _de=[];for(var _df=_d5[0];_df;){var off=_df.length-_db;_de.push((off>0)?_df.substr(off):_df);_df=(off>0)?_df.slice(0,off):"";if(_dc){_db=_dc;delete _dc;}}_d5[0]=_de.reverse().join(_d2.group||",");return _d5.join(_d2.decimal||".");};dojo.number.regexp=function(_e0){return dojo.number._parseInfo(_e0).regexp;};dojo.number._parseInfo=function(_e1){_e1=_e1||{};var _e2=dojo.i18n.normalizeLocale(_e1.locale);var _e3=dojo.i18n.getLocalization("dojo.cldr","number",_e2);var _e4=_e1.pattern||_e3[(_e1.type||"decimal")+"Format"];var _e5=_e3.group;var _e6=_e3.decimal;var _e7=1;if(_e4.indexOf("%")!=-1){_e7/=100;}else{if(_e4.indexOf("‰")!=-1){_e7/=1000;}else{var _e8=_e4.indexOf("¤")!=-1;if(_e8){_e5=_e3.currencyGroup||_e5;_e6=_e3.currencyDecimal||_e6;}}}var _e9=_e4.split(";");if(_e9.length==1){_e9.push("-"+_e9[0]);}var re=dojo.regexp.buildGroupRE(_e9,function(_ea){_ea="(?:"+dojo.regexp.escapeString(_ea,".")+")";return _ea.replace(dojo.number._numberPatternRE,function(_eb){var _ec={signed:false,separator:_e1.strict?_e5:[_e5,""],fractional:_e1.fractional,decimal:_e6,exponent:false};var _ed=_eb.split(".");var _ee=_e1.places;if(_ed.length==1||_ee===0){_ec.fractional=false;}else{if(_ee===undefined){_ee=_e1.pattern?_ed[1].lastIndexOf("0")+1:Infinity;}if(_ee&&_e1.fractional==undefined){_ec.fractional=true;}if(!_e1.places&&(_ee<_ed[1].length)){_ee+=","+_ed[1].length;}_ec.places=_ee;}var _ef=_ed[0].split(",");if(_ef.length>1){_ec.groupSize=_ef.pop().length;if(_ef.length>1){_ec.groupSize2=_ef.pop().length;}}return "("+dojo.number._realNumberRegexp(_ec)+")";});},true);if(_e8){re=re.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,function(_f0,_f1,_f2,_f3){var _f4=["symbol","currency","displayName"][_f2.length-1];var _f5=dojo.regexp.escapeString(_e1[_f4]||_e1.currency||"");_f1=_f1?"[\\s\\xa0]":"";_f3=_f3?"[\\s\\xa0]":"";if(!_e1.strict){if(_f1){_f1+="*";}if(_f3){_f3+="*";}return "(?:"+_f1+_f5+_f3+")?";}return _f1+_f5+_f3;});}return {regexp:re.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:_e5,decimal:_e6,factor:_e7};};dojo.number.parse=function(_f6,_f7){var _f8=dojo.number._parseInfo(_f7);var _f9=(new RegExp("^"+_f8.regexp+"$")).exec(_f6);if(!_f9){return NaN;}var _fa=_f9[1];if(!_f9[1]){if(!_f9[2]){return NaN;}_fa=_f9[2];_f8.factor*=-1;}_fa=_fa.replace(new RegExp("["+_f8.group+"\\s\\xa0"+"]","g"),"").replace(_f8.decimal,".");return _fa*_f8.factor;};dojo.number._realNumberRegexp=function(_fb){_fb=_fb||{};if(!("places" in _fb)){_fb.places=Infinity;}if(typeof _fb.decimal!="string"){_fb.decimal=".";}if(!("fractional" in _fb)||/^0/.test(_fb.places)){_fb.fractional=[true,false];}if(!("exponent" in _fb)){_fb.exponent=[true,false];}if(!("eSigned" in _fb)){_fb.eSigned=[true,false];}var _fc=dojo.number._integerRegexp(_fb);var _fd=dojo.regexp.buildGroupRE(_fb.fractional,function(q){var re="";if(q&&(_fb.places!==0)){re="\\"+_fb.decimal;if(_fb.places==Infinity){re="(?:"+re+"\\d+)?";}else{re+="\\d{"+_fb.places+"}";}}return re;},true);var _fe=dojo.regexp.buildGroupRE(_fb.exponent,function(q){if(q){return "([eE]"+dojo.number._integerRegexp({signed:_fb.eSigned})+")";}return "";});var _ff=_fc+_fd;if(_fd){_ff="(?:(?:"+_ff+")|(?:"+_fd+"))";}return _ff+_fe;};dojo.number._integerRegexp=function(_100){_100=_100||{};if(!("signed" in _100)){_100.signed=[true,false];}if(!("separator" in _100)){_100.separator="";}else{if(!("groupSize" in _100)){_100.groupSize=3;}}var _101=dojo.regexp.buildGroupRE(_100.signed,function(q){return q?"[-+]":"";},true);var _102=dojo.regexp.buildGroupRE(_100.separator,function(sep){if(!sep){return "(?:\\d+)";}sep=dojo.regexp.escapeString(sep);if(sep==" "){sep="\\s";}else{if(sep==" "){sep="\\s\\xa0";}}var grp=_100.groupSize,grp2=_100.groupSize2;if(grp2){var _103="(?:0|[1-9]\\d{0,"+(grp2-1)+"}(?:["+sep+"]\\d{"+grp2+"})*["+sep+"]\\d{"+grp+"})";return ((grp-grp2)>0)?"(?:"+_103+"|(?:0|[1-9]\\d{0,"+(grp-1)+"}))":_103;}return "(?:0|[1-9]\\d{0,"+(grp-1)+"}(?:["+sep+"]\\d{"+grp+"})*)";},true);return _101+_102;};}if(typeof dojo==="undefined"||!dojo._hasResource["dijit.form.HorizontalSlider"]){typeof dojo==="undefined"||(dojo._hasResource["dijit.form.HorizontalSlider"]=true);dojo.provide("dijit.form.HorizontalSlider");dojo.declare("dijit.form.HorizontalSlider",[dijit.form._FormValueWidget,dijit._Container],{templateString:dojo.cache("dijit.form","templates/HorizontalSlider.html","<table class=\"dijit dijitReset dijitSlider\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" rules=\"none\" dojoAttachEvent=\"onkeypress:_onKeyPress,onkeyup:_onKeyUp\"\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t\t><td dojoAttachPoint=\"topDecoration\" class=\"dijitReset\" style=\"text-align:center;width:100%;\"></td\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH\"\n\t\t\t><div class=\"dijitSliderDecrementIconH\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"decrementButton\"><span class=\"dijitSliderButtonInner\">-</span></div\n\t\t></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderLeftBumper dijitSliderLeftBumper\" dojoAttachEvent=\"onmousedown:_onClkDecBumper\"></div\n\t\t></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><input dojoAttachPoint=\"valueNode\" type=\"hidden\" ${nameAttrSetting}\n\t\t\t/><div class=\"dijitReset dijitSliderBarContainerH\" waiRole=\"presentation\" dojoAttachPoint=\"sliderBarContainer\"\n\t\t\t\t><div waiRole=\"presentation\" dojoAttachPoint=\"progressBar\" class=\"dijitSliderBar dijitSliderBarH dijitSliderProgressBar dijitSliderProgressBarH\" dojoAttachEvent=\"onmousedown:_onBarClick\"\n\t\t\t\t\t><div class=\"dijitSliderMoveable dijitSliderMoveableH\"\n\t\t\t\t\t\t><div dojoAttachPoint=\"sliderHandle,focusNode\" class=\"dijitSliderImageHandle dijitSliderImageHandleH\" dojoAttachEvent=\"onmousedown:_onHandleClick\" waiRole=\"slider\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"></div\n\t\t\t\t\t></div\n\t\t\t\t></div\n\t\t\t\t><div waiRole=\"presentation\" dojoAttachPoint=\"remainingBar\" class=\"dijitSliderBar dijitSliderBarH dijitSliderRemainingBar dijitSliderRemainingBarH\" dojoAttachEvent=\"onmousedown:_onBarClick\"></div\n\t\t\t></div\n\t\t></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderRightBumper dijitSliderRightBumper\" dojoAttachEvent=\"onmousedown:_onClkIncBumper\"></div\n\t\t></td\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH\" style=\"right:0px;\"\n\t\t\t><div class=\"dijitSliderIncrementIconH\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"incrementButton\"><span class=\"dijitSliderButtonInner\">+</span></div\n\t\t></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t\t><td dojoAttachPoint=\"containerNode,bottomDecoration\" class=\"dijitReset\" style=\"text-align:center;\"></td\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\n\t></tr\n></table>\n"),value:0,showButtons:true,minimum:0,maximum:100,discreteValues:Infinity,pageIncrement:2,clickSelect:true,slideDuration:dijit.defaultDuration,captureMouseWheel:false,widgetsInTemplate:true,attributeMap:dojo.delegate(dijit.form._FormWidget.prototype.attributeMap,{id:""}),baseClass:"dijitSlider",_mousePixelCoord:"pageX",_pixelCount:"w",_startingPixelCoord:"x",_startingPixelCount:"l",_handleOffsetCoord:"left",_progressPixelSize:"width",_onKeyUp:function(e){if(this.disabled||this.readOnly||e.altKey||e.ctrlKey||e.metaKey){return;}this._setValueAttr(this.value,true);},_onKeyPress:function(e){if(this.disabled||this.readOnly||e.altKey||e.ctrlKey||e.metaKey){return;}switch(e.charOrCode){case dojo.keys.HOME:this._setValueAttr(this.minimum,false);break;case dojo.keys.END:this._setValueAttr(this.maximum,false);break;case ((this._descending||this.isLeftToRight())?dojo.keys.RIGHT_ARROW:dojo.keys.LEFT_ARROW):case (this._descending===false?dojo.keys.DOWN_ARROW:dojo.keys.UP_ARROW):case (this._descending===false?dojo.keys.PAGE_DOWN:dojo.keys.PAGE_UP):this.increment(e);break;case ((this._descending||this.isLeftToRight())?dojo.keys.LEFT_ARROW:dojo.keys.RIGHT_ARROW):case (this._descending===false?dojo.keys.UP_ARROW:dojo.keys.DOWN_ARROW):case (this._descending===false?dojo.keys.PAGE_UP:dojo.keys.PAGE_DOWN):this.decrement(e);break;default:return;}dojo.stopEvent(e);},_onHandleClick:function(e){if(this.disabled||this.readOnly){return;}if(!dojo.isIE){dijit.focus(this.sliderHandle);}dojo.stopEvent(e);},_isReversed:function(){return !this.isLeftToRight();},_onBarClick:function(e){if(this.disabled||this.readOnly||!this.clickSelect){return;}dijit.focus(this.sliderHandle);dojo.stopEvent(e);var _104=dojo.position(this.sliderBarContainer,true);var _105=e[this._mousePixelCoord]-_104[this._startingPixelCoord];this._setPixelValue(this._isReversed()?(_104[this._pixelCount]-_105):_105,_104[this._pixelCount],true);this._movable.onMouseDown(e);},_setPixelValue:function(_106,_107,_108){if(this.disabled||this.readOnly){return;}_106=_106<0?0:_107<_106?_107:_106;var _109=this.discreteValues;if(_109<=1||_109==Infinity){_109=_107;}_109--;var _10a=_107/_109;var _10b=Math.round(_106/_10a);this._setValueAttr((this.maximum-this.minimum)*_10b/_109+this.minimum,_108);},_setValueAttr:function(_10c,_10d){this.valueNode.value=this.value=_10c;dijit.setWaiState(this.focusNode,"valuenow",_10c);this.inherited(arguments);var _10e=(_10c-this.minimum)/(this.maximum-this.minimum);var _10f=(this._descending===false)?this.remainingBar:this.progressBar;var _110=(this._descending===false)?this.progressBar:this.remainingBar;if(this._inProgressAnim&&this._inProgressAnim.status!="stopped"){this._inProgressAnim.stop(true);}if(_10d&&this.slideDuration>0&&_10f.style[this._progressPixelSize]){var _111=this;var _112={};var _113=parseFloat(_10f.style[this._progressPixelSize]);var _114=this.slideDuration*(_10e-_113/100);if(_114==0){return;}if(_114<0){_114=0-_114;}_112[this._progressPixelSize]={start:_113,end:_10e*100,units:"%"};this._inProgressAnim=dojo.animateProperty({node:_10f,duration:_114,onAnimate:function(v){_110.style[_111._progressPixelSize]=(100-parseFloat(v[_111._progressPixelSize]))+"%";},onEnd:function(){delete _111._inProgressAnim;},properties:_112});this._inProgressAnim.play();}else{_10f.style[this._progressPixelSize]=(_10e*100)+"%";_110.style[this._progressPixelSize]=((1-_10e)*100)+"%";}},_bumpValue:function(_115,_116){if(this.disabled||this.readOnly){return;}var s=dojo.getComputedStyle(this.sliderBarContainer);var c=dojo._getContentBox(this.sliderBarContainer,s);var _117=this.discreteValues;if(_117<=1||_117==Infinity){_117=c[this._pixelCount];}_117--;var _118=(this.value-this.minimum)*_117/(this.maximum-this.minimum)+_115;if(_118<0){_118=0;}if(_118>_117){_118=_117;}_118=_118*(this.maximum-this.minimum)/_117+this.minimum;this._setValueAttr(_118,_116);},_onClkBumper:function(val){if(this.disabled||this.readOnly||!this.clickSelect){return;}this._setValueAttr(val,true);},_onClkIncBumper:function(){this._onClkBumper(this._descending===false?this.minimum:this.maximum);},_onClkDecBumper:function(){this._onClkBumper(this._descending===false?this.maximum:this.minimum);},decrement:function(e){this._bumpValue(e.charOrCode==dojo.keys.PAGE_DOWN?-this.pageIncrement:-1);},increment:function(e){this._bumpValue(e.charOrCode==dojo.keys.PAGE_UP?this.pageIncrement:1);},_mouseWheeled:function(evt){if(!this.captureMouseWheel){return;}dojo.stopEvent(evt);var _119=!dojo.isMozilla;var _11a=evt[(_119?"wheelDelta":"detail")]*(_119?1:-1);this._bumpValue(_11a<0?-1:1,true);},startup:function(){dojo.forEach(this.getChildren(),function(_11b){if(this[_11b.container]!=this.containerNode){this[_11b.container].appendChild(_11b.domNode);}},this);},_typematicCallback:function(_11c,_11d,e){if(_11c==-1){this._setValueAttr(this.value,true);}else{this[(_11d==(this._descending?this.incrementButton:this.decrementButton))?"decrement":"increment"](e);}},postCreate:function(){if(this.showButtons){this.incrementButton.style.display="";this.decrementButton.style.display="";this._connects.push(dijit.typematic.addMouseListener(this.decrementButton,this,"_typematicCallback",25,500));this._connects.push(dijit.typematic.addMouseListener(this.incrementButton,this,"_typematicCallback",25,500));}this.connect(this.domNode,!dojo.isMozilla?"onmousewheel":"DOMMouseScroll","_mouseWheeled");var _11e=dojo.declare(dijit.form._SliderMover,{widget:this});this._movable=new dojo.dnd.Moveable(this.sliderHandle,{mover:_11e});var _11f=dojo.query("label[for=\""+this.id+"\"]");if(_11f.length){_11f[0].id=(this.id+"_label");dijit.setWaiState(this.focusNode,"labelledby",_11f[0].id);}dijit.setWaiState(this.focusNode,"valuemin",this.minimum);dijit.setWaiState(this.focusNode,"valuemax",this.maximum);this.inherited(arguments);this._layoutHackIE7();},destroy:function(){this._movable.destroy();if(this._inProgressAnim&&this._inProgressAnim.status!="stopped"){this._inProgressAnim.stop(true);}this._supportingWidgets=dijit.findWidgets(this.domNode);this.inherited(arguments);}});dojo.declare("dijit.form._SliderMover",dojo.dnd.Mover,{onMouseMove:function(e){var _120=this.widget;var _121=_120._abspos;if(!_121){_121=_120._abspos=dojo.position(_120.sliderBarContainer,true);_120._setPixelValue_=dojo.hitch(_120,"_setPixelValue");_120._isReversed_=_120._isReversed();}var _122=e[_120._mousePixelCoord]-_121[_120._startingPixelCoord];_120._setPixelValue_(_120._isReversed_?(_121[_120._pixelCount]-_122):_122,_121[_120._pixelCount],false);},destroy:function(e){dojo.dnd.Mover.prototype.destroy.apply(this,arguments);var _123=this.widget;_123._abspos=null;_123._setValueAttr(_123.value,true);}});}if(typeof dojo==="undefined"||!dojo._hasResource["dijit.form.VerticalSlider"]){typeof dojo==="undefined"||(dojo._hasResource["dijit.form.VerticalSlider"]=true);dojo.provide("dijit.form.VerticalSlider");dojo.declare("dijit.form.VerticalSlider",dijit.form.HorizontalSlider,{templateString:dojo.cache("dijit.form","templates/VerticalSlider.html","<table class=\"dijitReset dijitSlider\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" rules=\"none\" dojoAttachEvent=\"onkeypress:_onKeyPress,onkeyup:_onKeyUp\"\n><tbody class=\"dijitReset\"\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerV\"\n\t\t\t><div class=\"dijitSliderIncrementIconV\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"decrementButton\"><span class=\"dijitSliderButtonInner\">+</span></div\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><center><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperV dijitSliderTopBumper dijitSliderTopBumper\" dojoAttachEvent=\"onmousedown:_onClkIncBumper\"></div></center\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td dojoAttachPoint=\"leftDecoration\" class=\"dijitReset\" style=\"text-align:center;height:100%;\"></td\n\t\t><td class=\"dijitReset\" style=\"height:100%;\"\n\t\t\t><input dojoAttachPoint=\"valueNode\" type=\"hidden\" ${nameAttrSetting}\n\t\t\t/><center class=\"dijitReset dijitSliderBarContainerV\" waiRole=\"presentation\" dojoAttachPoint=\"sliderBarContainer\"\n\t\t\t\t><div waiRole=\"presentation\" dojoAttachPoint=\"remainingBar\" class=\"dijitSliderBar dijitSliderBarV dijitSliderRemainingBar dijitSliderRemainingBarV\" dojoAttachEvent=\"onmousedown:_onBarClick\"><!--#5629--></div\n\t\t\t\t><div waiRole=\"presentation\" dojoAttachPoint=\"progressBar\" class=\"dijitSliderBar dijitSliderBarV dijitSliderProgressBar dijitSliderProgressBarV\" dojoAttachEvent=\"onmousedown:_onBarClick\"\n\t\t\t\t\t><div class=\"dijitSliderMoveable\" style=\"vertical-align:top;\"\n\t\t\t\t\t\t><div dojoAttachPoint=\"sliderHandle,focusNode\" class=\"dijitSliderImageHandle dijitSliderImageHandleV\" dojoAttachEvent=\"onmousedown:_onHandleClick\" waiRole=\"slider\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"></div\n\t\t\t\t\t></div\n\t\t\t\t></div\n\t\t\t></center\n\t\t></td\n\t\t><td dojoAttachPoint=\"containerNode,rightDecoration\" class=\"dijitReset\" style=\"text-align:center;height:100%;\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset\"\n\t\t\t><center><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperV dijitSliderBottomBumper dijitSliderBottomBumper\" dojoAttachEvent=\"onmousedown:_onClkDecBumper\"></div></center\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n\t><tr class=\"dijitReset\"\n\t\t><td class=\"dijitReset\"></td\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerV\"\n\t\t\t><div class=\"dijitSliderDecrementIconV\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"incrementButton\"><span class=\"dijitSliderButtonInner\">-</span></div\n\t\t></td\n\t\t><td class=\"dijitReset\"></td\n\t></tr\n></tbody></table>\n"),_mousePixelCoord:"pageY",_pixelCount:"h",_startingPixelCoord:"y",_startingPixelCount:"t",_handleOffsetCoord:"top",_progressPixelSize:"height",_descending:true,startup:function(){if(this._started){return;}if(!this.isLeftToRight()&&dojo.isMoz){if(this.leftDecoration){this._rtlRectify(this.leftDecoration);}if(this.rightDecoration){this._rtlRectify(this.rightDecoration);}}this.inherited(arguments);},_isReversed:function(){return this._descending;},_rtlRectify:function(_124){var _125=[];while(_124.firstChild){_125.push(_124.firstChild);_124.removeChild(_124.firstChild);}for(var i=_125.length-1;i>=0;i--){if(_125[i]){_124.appendChild(_125[i]);}}}});}if(typeof dojo==="undefined"||!dojo._hasResource["dojox.fx._base"]){typeof dojo==="undefined"||(dojo._hasResource["dojox.fx._base"]=true);dojo.provide("dojox.fx._base");dojo.mixin(dojox.fx,{anim:dojo.anim,animateProperty:dojo.animateProperty,fadeTo:dojo._fade,fadeIn:dojo.fadeIn,fadeOut:dojo.fadeOut,combine:dojo.fx.combine,chain:dojo.fx.chain,slideTo:dojo.fx.slideTo,wipeIn:dojo.fx.wipeIn,wipeOut:dojo.fx.wipeOut});dojox.fx.sizeTo=function(args){var node=args.node=dojo.byId(args.node),abs="absolute";var _126=args.method||"chain";if(!args.duration){args.duration=500;}if(_126=="chain"){args.duration=Math.floor(args.duration/2);}var top,_127,left,_128,_129,_12a=null;var init=(function(n){return function(){var cs=dojo.getComputedStyle(n),pos=cs.position,w=cs.width,h=cs.height;top=(pos==abs?n.offsetTop:parseInt(cs.top)||0);left=(pos==abs?n.offsetLeft:parseInt(cs.left)||0);_129=(w=="auto"?0:parseInt(w));_12a=(h=="auto"?0:parseInt(h));_128=left-Math.floor((args.width-_129)/2);_127=top-Math.floor((args.height-_12a)/2);if(pos!=abs&&pos!="relative"){var ret=dojo.coords(n,true);top=ret.y;left=ret.x;n.style.position=abs;n.style.top=top+"px";n.style.left=left+"px";}};})(node);var _12b=dojo.animateProperty(dojo.mixin({properties:{height:function(){init();return {end:args.height||0,start:_12a};},top:function(){return {start:top,end:_127};}}},args));var _12c=dojo.animateProperty(dojo.mixin({properties:{width:function(){return {start:_129,end:args.width||0};},left:function(){return {start:left,end:_128};}}},args));var anim=dojo.fx[(args.method=="combine"?"combine":"chain")]([_12b,_12c]);return anim;};dojox.fx.slideBy=function(args){var node=args.node=dojo.byId(args.node),top,left;var init=(function(n){return function(){var cs=dojo.getComputedStyle(n);var pos=cs.position;top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);left=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);if(pos!="absolute"&&pos!="relative"){var ret=dojo.coords(n,true);top=ret.y;left=ret.x;n.style.position="absolute";n.style.top=top+"px";n.style.left=left+"px";}};})(node);init();var _12d=dojo.animateProperty(dojo.mixin({properties:{top:top+(args.top||0),left:left+(args.left||0)}},args));dojo.connect(_12d,"beforeBegin",_12d,init);return _12d;};dojox.fx.crossFade=function(args){var _12e=args.nodes[0]=dojo.byId(args.nodes[0]),op1=dojo.style(_12e,"opacity"),_12f=args.nodes[1]=dojo.byId(args.nodes[1]),op2=dojo.style(_12f,"opacity");var _130=dojo.fx.combine([dojo[(op1==0?"fadeIn":"fadeOut")](dojo.mixin({node:_12e},args)),dojo[(op1==0?"fadeOut":"fadeIn")](dojo.mixin({node:_12f},args))]);return _130;};dojox.fx.highlight=function(args){var node=args.node=dojo.byId(args.node);args.duration=args.duration||400;var _131=args.color||"#ffff99",_132=dojo.style(node,"backgroundColor");if(_132=="rgba(0, 0, 0, 0)"){_132="transparent";}var anim=dojo.animateProperty(dojo.mixin({properties:{backgroundColor:{start:_131,end:_132}}},args));if(_132=="transparent"){dojo.connect(anim,"onEnd",anim,function(){node.style.backgroundColor=_132;});}return anim;};dojox.fx.wipeTo=function(args){args.node=dojo.byId(args.node);var node=args.node,s=node.style;var dir=(args.width?"width":"height"),_133=args[dir],_134={};_134[dir]={start:function(){s.overflow="hidden";if(s.visibility=="hidden"||s.display=="none"){s[dir]="1px";s.display="";s.visibility="";return 1;}else{var now=dojo.style(node,dir);return Math.max(now,1);}},end:_133};var anim=dojo.animateProperty(dojo.mixin({properties:_134},args));return anim;};}if(typeof dojo==="undefined"||!dojo._hasResource["dojox.fx"]){typeof dojo==="undefined"||(dojo._hasResource["dojox.fx"]=true);dojo.provide("dojox.fx");}if(typeof dojo==="undefined"||!dojo._hasResource["dojox.form.RangeSlider"]){typeof dojo==="undefined"||(dojo._hasResource["dojox.form.RangeSlider"]=true);dojo.provide("dojox.form.RangeSlider");(function(){var _135=function(a,b){return b-a;},_136=function(a,b){return a-b;};dojo.declare("dojox.form._RangeSliderMixin",null,{value:[0,100],postMixInProperties:function(){this.value=dojo.map(this.value,function(i){return parseInt(i,10);});},postCreate:function(){this.inherited(arguments);this.value.sort(this._isReversed()?_135:_136);var _137=this;var _138=function(){dijit.form._SliderMoverMax.apply(this,arguments);this.widget=_137;};dojo.extend(_138,dijit.form._SliderMoverMax.prototype);this._movableMax=new dojo.dnd.Moveable(this.sliderHandleMax,{mover:_138});dijit.setWaiState(this.focusNodeMax,"valuemin",this.minimum);dijit.setWaiState(this.focusNodeMax,"valuemax",this.maximum);var _139=function(){dijit.form._SliderBarMover.apply(this,arguments);this.widget=_137;};dojo.extend(_139,dijit.form._SliderBarMover.prototype);this._movableBar=new dojo.dnd.Moveable(this.progressBar,{mover:_139});},destroy:function(){this.inherited(arguments);this._movableMax.destroy();this._movableBar.destroy();},_onKeyPress:function(e){if(this.disabled||this.readOnly||e.altKey||e.ctrlKey){return;}var _13a=e.currentTarget,_13b=false,_13c=false,k=dojo.keys;if(_13a==this.sliderHandle){_13b=true;}else{if(_13a==this.progressBar){_13c=_13b=true;}else{if(_13a==this.sliderHandleMax){_13c=true;}}}switch(e.keyCode){case k.HOME:this._setValueAttr(this.minimum,true,_13c);break;case k.END:this._setValueAttr(this.maximum,true,_13c);break;case ((this._descending||this.isLeftToRight())?k.RIGHT_ARROW:k.LEFT_ARROW):case (this._descending===false?k.DOWN_ARROW:k.UP_ARROW):case (this._descending===false?k.PAGE_DOWN:k.PAGE_UP):if(_13b&&_13c){this._bumpValue([{"change":e.keyCode==k.PAGE_UP?this.pageIncrement:1,"useMaxValue":true},{"change":e.keyCode==k.PAGE_UP?this.pageIncrement:1,"useMaxValue":false}]);}else{if(_13b){this._bumpValue(e.keyCode==k.PAGE_UP?this.pageIncrement:1,true);}else{if(_13c){this._bumpValue(e.keyCode==k.PAGE_UP?this.pageIncrement:1);}}}break;case ((this._descending||this.isLeftToRight())?k.LEFT_ARROW:k.RIGHT_ARROW):case (this._descending===false?k.UP_ARROW:k.DOWN_ARROW):case (this._descending===false?k.PAGE_UP:k.PAGE_DOWN):if(_13b&&_13c){this._bumpValue([{change:e.keyCode==k.PAGE_DOWN?-this.pageIncrement:-1,useMaxValue:false},{change:e.keyCode==k.PAGE_DOWN?-this.pageIncrement:-1,useMaxValue:true}]);}else{if(_13b){this._bumpValue(e.keyCode==k.PAGE_DOWN?-this.pageIncrement:-1);}else{if(_13c){this._bumpValue(e.keyCode==k.PAGE_DOWN?-this.pageIncrement:-1,true);}}}break;default:dijit.form._FormValueWidget.prototype._onKeyPress.apply(this,arguments);this.inherited(arguments);return;}dojo.stopEvent(e);},_onHandleClickMax:function(e){if(this.disabled||this.readOnly){return;}if(!dojo.isIE){dijit.focus(this.sliderHandleMax);}dojo.stopEvent(e);},_onClkIncBumper:function(){this._setValueAttr(this._descending===false?this.minimum:this.maximum,true,true);},_bumpValue:function(_13d,_13e){var _13f=dojo.isArray(_13d)?[this._getBumpValue(_13d[0].change,_13d[0].useMaxValue),this._getBumpValue(_13d[1].change,_13d[1].useMaxValue)]:this._getBumpValue(_13d,_13e);this._setValueAttr(_13f,true,!dojo.isArray(_13d)&&((_13d>0&&!_13e)||(_13e&&_13d<0)));},_getBumpValue:function(_140,_141){var s=dojo.getComputedStyle(this.sliderBarContainer),c=dojo._getContentBox(this.sliderBarContainer,s),_142=this.discreteValues,_143=!_141?this.value[0]:this.value[1];if(_142<=1||_142==Infinity){_142=c[this._pixelCount];}_142--;if((this._isReversed()&&_140<0)||(_140>0&&!this._isReversed())){_143=!_141?this.value[1]:this.value[0];}var _144=(_143-this.minimum)*_142/(this.maximum-this.minimum)+_140;if(_144<0){_144=0;}if(_144>_142){_144=_142;}return _144*(this.maximum-this.minimum)/_142+this.minimum;},_onBarClick:function(e){if(this.disabled||this.readOnly){return;}if(!dojo.isIE){dijit.focus(this.progressBar);}dojo.stopEvent(e);},_onRemainingBarClick:function(e){if(this.disabled||this.readOnly){return;}if(!dojo.isIE){dijit.focus(this.progressBar);}var _145=dojo.coords(this.sliderBarContainer,true),bar=dojo.coords(this.progressBar,true),_146=e[this._mousePixelCoord]-_145[this._startingPixelCoord],_147=bar[this._startingPixelCount],_148=_147+bar[this._pixelCount],_149=this._isReversed()?_146<=_147:_146>=_148,p=this._isReversed()?_145[this._pixelCount]-_146:_146;this._setPixelValue(p,_145[this._pixelCount],true,_149);dojo.stopEvent(e);},_setPixelValue:function(_14a,_14b,_14c,_14d){if(this.disabled||this.readOnly){return;}var _14e=this._getValueByPixelValue(_14a,_14b);this._setValueAttr(_14e,_14c,_14d);},_getValueByPixelValue:function(_14f,_150){_14f=_14f<0?0:_150<_14f?_150:_14f;var _151=this.discreteValues;if(_151<=1||_151==Infinity){_151=_150;}_151--;var _152=_150/_151;var _153=Math.round(_14f/_152);return (this.maximum-this.minimum)*_153/_151+this.minimum;},_setValueAttr:function(_154,_155,_156){var _157=this.value;if(!dojo.isArray(_154)){if(_156){if(this._isReversed()){_157[0]=_154;}else{_157[1]=_154;}}else{if(this._isReversed()){_157[1]=_154;}else{_157[0]=_154;}}}else{_157=_154;}this._lastValueReported="";this.valueNode.value=this.value=_154=_157;dijit.setWaiState(this.focusNode,"valuenow",_157[0]);dijit.setWaiState(this.focusNodeMax,"valuenow",_157[1]);this.value.sort(this._isReversed()?_135:_136);dijit.form._FormValueWidget.prototype._setValueAttr.apply(this,arguments);this._printSliderBar(_155,_156);},_printSliderBar:function(_158,_159){var _15a=(this.value[0]-this.minimum)/(this.maximum-this.minimum);var _15b=(this.value[1]-this.minimum)/(this.maximum-this.minimum);var _15c=_15a;if(_15a>_15b){_15a=_15b;_15b=_15c;}var _15d=this._isReversed()?((1-_15a)*100):(_15a*100);var _15e=this._isReversed()?((1-_15b)*100):(_15b*100);var _15f=this._isReversed()?((1-_15b)*100):(_15a*100);if(_158&&this.slideDuration>0&&this.progressBar.style[this._progressPixelSize]){var _160=_159?_15b:_15a;var _161=this;var _162={};var _163=parseFloat(this.progressBar.style[this._handleOffsetCoord]);var _164=this.slideDuration/10;if(_164===0){return;}if(_164<0){_164=0-_164;}var _165={};var _166={};var _167={};_165[this._handleOffsetCoord]={start:this.sliderHandle.style[this._handleOffsetCoord],end:_15d,units:"%"};_166[this._handleOffsetCoord]={start:this.sliderHandleMax.style[this._handleOffsetCoord],end:_15e,units:"%"};_167[this._handleOffsetCoord]={start:this.progressBar.style[this._handleOffsetCoord],end:_15f,units:"%"};_167[this._progressPixelSize]={start:this.progressBar.style[this._progressPixelSize],end:(_15b-_15a)*100,units:"%"};var _168=dojo.animateProperty({node:this.sliderHandle,duration:_164,properties:_165});var _169=dojo.animateProperty({node:this.sliderHandleMax,duration:_164,properties:_166});var _16a=dojo.animateProperty({node:this.progressBar,duration:_164,properties:_167});var _16b=dojo.fx.combine([_168,_169,_16a]);_16b.play();}else{this.sliderHandle.style[this._handleOffsetCoord]=_15d+"%";this.sliderHandleMax.style[this._handleOffsetCoord]=_15e+"%";this.progressBar.style[this._handleOffsetCoord]=_15f+"%";this.progressBar.style[this._progressPixelSize]=((_15b-_15a)*100)+"%";}}});dojo.declare("dijit.form._SliderMoverMax",dijit.form._SliderMover,{onMouseMove:function(e){var _16c=this.widget;var _16d=_16c._abspos;if(!_16d){_16d=_16c._abspos=dojo.coords(_16c.sliderBarContainer,true);_16c._setPixelValue_=dojo.hitch(_16c,"_setPixelValue");_16c._isReversed_=_16c._isReversed();}var _16e=e[_16c._mousePixelCoord]-_16d[_16c._startingPixelCoord];_16c._setPixelValue_(_16c._isReversed_?(_16d[_16c._pixelCount]-_16e):_16e,_16d[_16c._pixelCount],false,true);},destroy:function(e){dojo.dnd.Mover.prototype.destroy.apply(this,arguments);var _16f=this.widget;_16f._abspos=null;_16f._setValueAttr(_16f.value,true);}});dojo.declare("dijit.form._SliderBarMover",dojo.dnd.Mover,{onMouseMove:function(e){var _170=this.widget;if(_170.disabled||_170.readOnly){return;}var _171=_170._abspos;var bar=_170._bar;var _172=_170._mouseOffset;if(!_171){_171=_170._abspos=dojo.coords(_170.sliderBarContainer,true);_170._setPixelValue_=dojo.hitch(_170,"_setPixelValue");_170._getValueByPixelValue_=dojo.hitch(_170,"_getValueByPixelValue");_170._isReversed_=_170._isReversed();}if(!bar){bar=_170._bar=dojo.coords(_170.progressBar,true);}if(!_172){_172=_170._mouseOffset=e[_170._mousePixelCoord]-_171[_170._startingPixelCoord]-bar[_170._startingPixelCount];}var _173=e[_170._mousePixelCoord]-_171[_170._startingPixelCoord]-_172,_174=_173+bar[_170._pixelCount],_175=[_173,_174];_175.sort(_136);if(_175[0]<=0){_175[0]=0;_175[1]=bar[_170._pixelCount];}if(_175[1]>=_171[_170._pixelCount]){_175[1]=_171[_170._pixelCount];_175[0]=_171[_170._pixelCount]-bar[_170._pixelCount];}var _176=[_170._getValueByPixelValue(_170._isReversed_?(_171[_170._pixelCount]-_175[0]):_175[0],_171[_170._pixelCount]),_170._getValueByPixelValue(_170._isReversed_?(_171[_170._pixelCount]-_175[1]):_175[1],_171[_170._pixelCount])];_170._setValueAttr(_176,false,false);},destroy:function(){dojo.dnd.Mover.prototype.destroy.apply(this,arguments);var _177=this.widget;_177._abspos=null;_177._bar=null;_177._mouseOffset=null;_177._setValueAttr(_177.value,true);}});dojo.declare("dojox.form.HorizontalRangeSlider",[dijit.form.HorizontalSlider,dojox.form._RangeSliderMixin],{templateString:dojo.cache("dojox.form","resources/HorizontalRangeSlider.html","<table class=\"dijit dijitReset dijitSlider dojoxRangeSlider\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" rules=\"none\"\n    ><tr class=\"dijitReset\"\n        ><td class=\"dijitReset\" colspan=\"2\"></td\n        ><td dojoAttachPoint=\"containerNode,topDecoration\" class=\"dijitReset\" style=\"text-align:center;width:100%;\"></td\n        ><td class=\"dijitReset\" colspan=\"2\"></td\n    ></tr\n    ><tr class=\"dijitReset\"\n        ><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH\"\n            ><div class=\"dijitSliderDecrementIconH\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"decrementButton\" dojoAttachEvent=\"onclick: decrement\"><span class=\"dijitSliderButtonInner\">-</span></div\n        ></td\n        ><td class=\"dijitReset\"\n            ><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderLeftBumper dijitSliderLeftBumperH\" dojoAttachEvent=\"onclick:_onClkDecBumper\"></div\n        ></td\n        ><td class=\"dijitReset\"\n            ><input dojoAttachPoint=\"valueNode\" type=\"hidden\" name=\"${name}\"\n            /><div waiRole=\"presentation\" class=\"dojoxRangeSliderBarContainer\" dojoAttachPoint=\"sliderBarContainer\"\n                ><div dojoAttachPoint=\"sliderHandle\" tabIndex=\"${tabIndex}\" class=\"dijitSliderMoveable\" dojoAttachEvent=\"onkeypress:_onKeyPress,onmousedown:_onHandleClick\" waiRole=\"slider\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"\n                    ><div class=\"dijitSliderImageHandle dijitSliderImageHandleH\"></div\n                ></div\n                ><div waiRole=\"presentation\" dojoAttachPoint=\"progressBar,focusNode\" class=\"dijitSliderBar dijitSliderBarH dijitSliderProgressBar dijitSliderProgressBarH\" dojoAttachEvent=\"onkeypress:_onKeyPress,onmousedown:_onBarClick\"></div\n                ><div dojoAttachPoint=\"sliderHandleMax,focusNodeMax\" tabIndex=\"${tabIndex}\" class=\"dijitSliderMoveable\" dojoAttachEvent=\"onkeypress:_onKeyPress,onmousedown:_onHandleClickMax\" waiRole=\"sliderMax\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"\n                    ><div class=\"dijitSliderImageHandle dijitSliderImageHandleH\"></div\n                ></div\n                ><div waiRole=\"presentation\" dojoAttachPoint=\"remainingBar\" class=\"dijitSliderBar dijitSliderBarH dijitSliderRemainingBar dijitSliderRemainingBarH\" dojoAttachEvent=\"onmousedown:_onRemainingBarClick\"></div\n            ></div\n        ></td\n        ><td class=\"dijitReset\"\n            ><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderRightBumper dijitSliderRightBumperH\" dojoAttachEvent=\"onclick:_onClkIncBumper\"></div\n        ></td\n        ><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH\"\n            ><div class=\"dijitSliderIncrementIconH\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"incrementButton\" dojoAttachEvent=\"onclick: increment\"><span class=\"dijitSliderButtonInner\">+</span></div\n        ></td\n    ></tr\n    ><tr class=\"dijitReset\"\n        ><td class=\"dijitReset\" colspan=\"2\"></td\n        ><td dojoAttachPoint=\"containerNode,bottomDecoration\" class=\"dijitReset\" style=\"text-align:center;\"></td\n        ><td class=\"dijitReset\" colspan=\"2\"></td\n    ></tr\n></table>\n")});dojo.declare("dojox.form.VerticalRangeSlider",[dijit.form.VerticalSlider,dojox.form._RangeSliderMixin],{templateString:dojo.cache("dojox.form","resources/VerticalRangeSlider.html","<table class=\"dijitReset dijitSlider dojoxRangeSlider\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" rules=\"none\"\n><tbody class=\"dijitReset\"\n    ><tr class=\"dijitReset\"\n        ><td class=\"dijitReset\"></td\n        ><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerV\"\n            ><div class=\"dijitSliderIncrementIconV\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"incrementButton\" dojoAttachEvent=\"onclick: increment\"><span class=\"dijitSliderButtonInner\">+</span></div\n        ></td\n        ><td class=\"dijitReset\"></td\n    ></tr\n    ><tr class=\"dijitReset\"\n        ><td class=\"dijitReset\"></td\n        ><td class=\"dijitReset\"\n            ><center><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperV dijitSliderTopBumper dijitSliderTopBumperV\" dojoAttachEvent=\"onclick:_onClkIncBumper\"></div></center\n        ></td\n        ><td class=\"dijitReset\"></td\n    ></tr\n    ><tr class=\"dijitReset\"\n        ><td dojoAttachPoint=\"leftDecoration\" class=\"dijitReset\" style=\"text-align:center;height:100%;\"></td\n        ><td class=\"dijitReset\" style=\"height:100%;\"\n            ><input dojoAttachPoint=\"valueNode\" type=\"hidden\" name=\"${name}\"\n            /><center waiRole=\"presentation\" style=\"position:relative;height:100%;\" dojoAttachPoint=\"sliderBarContainer\"\n                ><div waiRole=\"presentation\" dojoAttachPoint=\"remainingBar\" class=\"dijitSliderBar dijitSliderBarV dijitSliderRemainingBar dijitSliderRemainingBarV\" dojoAttachEvent=\"onmousedown:_onRemainingBarClick\"\n                    ><div dojoAttachPoint=\"sliderHandle\" tabIndex=\"${tabIndex}\" class=\"dijitSliderMoveable\" dojoAttachEvent=\"onkeypress:_onKeyPress,onmousedown:_onHandleClick\" style=\"vertical-align:top;\" waiRole=\"slider\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"\n                        ><div class=\"dijitSliderImageHandle dijitSliderImageHandleV\"></div\n                    ></div\n                    ><div waiRole=\"presentation\" dojoAttachPoint=\"progressBar,focusNode\" tabIndex=\"${tabIndex}\" class=\"dijitSliderBar dijitSliderBarV dijitSliderProgressBar dijitSliderProgressBarV\" dojoAttachEvent=\"onkeypress:_onKeyPress,onmousedown:_onBarClick\"\n                    ></div\n                    ><div dojoAttachPoint=\"sliderHandleMax,focusNodeMax\" tabIndex=\"${tabIndex}\" class=\"dijitSliderMoveable\" dojoAttachEvent=\"onkeypress:_onKeyPress,onmousedown:_onHandleClickMax\" style=\"vertical-align:top;\" waiRole=\"slider\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"\n                        ><div class=\"dijitSliderImageHandle dijitSliderImageHandleV\"></div\n                    ></div\n                ></div\n            ></center\n        ></td\n        ><td dojoAttachPoint=\"containerNode,rightDecoration\" class=\"dijitReset\" style=\"text-align:center;height:100%;\"></td\n    ></tr\n    ><tr class=\"dijitReset\"\n        ><td class=\"dijitReset\"></td\n        ><td class=\"dijitReset\"\n            ><center><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperV dijitSliderBottomBumper dijitSliderBottomBumperV\" dojoAttachEvent=\"onclick:_onClkDecBumper\"></div></center\n        ></td\n        ><td class=\"dijitReset\"></td\n    ></tr\n    ><tr class=\"dijitReset\"\n        ><td class=\"dijitReset\"></td\n        ><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerV\"\n            ><div class=\"dijitSliderDecrementIconV\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"decrementButton\" dojoAttachEvent=\"onclick: decrement\"><span class=\"dijitSliderButtonInner\">-</span></div\n        ></td\n        ><td class=\"dijitReset\"></td\n    ></tr\n></tbody></table>\n")});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.memleak"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.memleak"]=true);dojo.provide("alp.util.memleak");(function(){var _178=function(){var cfg=dojo.getObject("alpConfig.memleak");return cfg&&cfg.inactive;};dojo.declare("alp.util.LeakyThing",null,{constructor:function(){if(_178()){return;}alp.util.unleak(this);}});alp.util.unleak=function(_179){if(_178()){return _179;}if(_179){_179._alpUnleak=_179._alpUnleak||dojo.hitch(_179,alp.util.unleak._stopUpLeakFun);alp.util.unleak._learnAbout(_179);}return _179;};alp.util.unleak.proactive=(dojo.global.alpConfig&&dojo.global.alpConfig.memleak&&dojo.global.alpConfig.memleak.proactive)||(!alp.util.likeIE());(function(){if(_178()){return;}var me=alp.util.unleak;var _17a=0;var _17b=0;var _17c=0;dojo.mixin(me,{_leakyThings:[],_G:"_alpUnleakHasGEventListeners",_DC:"_alpUnleakDojoConnectList",_DS:"_alpUnleakDojoSubscribeList",_OTHER:"_alp",_stopUpLeakFun:function(){function _17d(x){dojo.disconnect(x);_17b++;};function _17e(x){dojo.unsubscribe(x);_17c++;};for(var a in this){if(this.hasOwnProperty(a)){if((a===me._G)&&this[a]&&dojo.global.GEvent&&dojo.global.GEvent.clearInstanceListeners){dojo.global.GEvent.clearInstanceListeners(this);_17a++;}else{if(a===me._DC){dojo.forEach(this[a],_17d);}else{if(a===me._DS){dojo.forEach(this[a],_17e);}else{if(me._OTHER&&me._OTHER.length&&(a.substr(0,me._OTHER.length)===me._OTHER)){}else{continue;}}}}try{delete this[a];}catch(e){if(djConfig.isDebug){console.log("xxx memleak: Firefox rules !!! (1)");}}this[a]=undefined;}}try{me._forgetAbout(this);}catch(e2){if(djConfig.isDebug){console.log("xxx memleak: Firefox rules !!! (2)");}}},_forgetAbout:function(_17f){var b=me._index(_17f);if(b>-1){me._leakyThings.splice(b,1);}},_forgetAboutAll:function(){me._leakyThings=[];},_learnAbout:function(_180){if(!me._isKnown(_180)){me._leakyThings.push(_180);}},_index:function(_181){return dojo.indexOf(me._leakyThings,_181);},_isKnown:function(_182){return !!(_182&&_182._alpUnleak&&(me._index(_182)>-1));}});var _183;var _184;function aaa(){dojo.mixin(me,{_connects:[dojo.global.GEvent&&dojo.connect(GEvent,"addListener",me,function(_185){if(_178()){return;}if(me.proactive){me(_185);}if(me._isKnown(_185)){_185[me._G]=true;}}),dojo.global.GEvent&&dojo.connect(GEvent,"addDomListener",me,function(_186){if(_178()){return;}if(me.proactive){me(_186);}if(me._isKnown(_186)){_186[me._G]=true;}}),dojo.global.GEvent&&dojo.connect(GEvent,"bind",me,function(_187){if(_178()){return;}if(me.proactive){me(_187);}if(me._isKnown(_187)){_187[me._G]=true;}}),dojo.global.GEvent&&dojo.connect(GEvent,"bindDom",me,function(_188){if(_178()){return;}if(me.proactive){me(_188);}if(me._isKnown(_188)){_188[me._G]=true;}})]});_183=dojo.connect;dojo.connect=function(_189){if((!_178())&&me.proactive){me(_189);}var h=_183.apply(dojo,arguments);if((!_178())&&me._isKnown(_189)){_189[me._DC]=_189[me._DC]||[];_189[me._DC].push(h);}return h;};_184=dojo.subscribe;dojo.subscribe=function(_18a,_18b){if((!_178())&&me.proactive){me(_18b);}var h=_184.apply(dojo,arguments);if((!_178())&&me._isKnown(_18b)){_18b[me._DS]=_18b[me._DS]||[];_18b[me._DS].push(h);}return h;};};aaa();dojo.addOnLoad(function(){dojo.addOnWindowUnload(function(){if(_178()){return;}if(djConfig.isDebug){console.log("xxx memleak unload start");}var _18c=(new Date()).getTime();while(me._leakyThings.length>0){if((new Date()).getTime()-_18c>333){console.error("alp.util.memleak: _leakyThings cleanup reached maxtime.");break;}var a=me._leakyThings.pop();if(!(a&&a._alpUnleak)){continue;}try{a._alpUnleak();}catch(e){if(djConfig.isDebug){console.log("xxx memleak: Firefox rules !!! (3)");}}a._alpUnleak=undefined;}me._forgetAboutAll();dojo.forEach(me._connects,function(a){if(!a){return;}dojo.disconnect(a);});if(_183){dojo.connect=_183;}if(_184){dojo.subscribe=_184;}var f=dojo.global.GUnload;if(f){f();}function _18d(c){var n,nmax,_18c=(new Date()).getTime(),_18e=333;function cf(o){if((new Date()).getTime()-_18c>_18e){throw new Error("alp.util.memleak: clean() reached maxtime.");}if(n>nmax){return;}n++;for(var a in o){if((a!=="hasOwnProperty")&&o.hasOwnProperty&&o.hasOwnProperty(a)){cf(o[a]);try{delete o[a];}catch(e){o[a]=undefined;}}}n--;};if(c){nmax=10;n=0;try{cf(c);}catch(e){console.error(""+e);}c=undefined;}};if(djConfig.isDebug){console.log("xxx memleak unload 5");}dojo.forEach(["alpConfig"],function(x){if(!dojo.global[x]){return;}_18d(dojo.global[x]);if(dojo.global[x]){var v=dojo.global;try{delete v[x];}catch(e){if(djConfig.isDebug){console.log("xxx memleak: Firefox rules !!! (4)");}}v[x]=undefined;}});(function(){var _18f=0;var _190=(new Date()).getTime();var _191=document.getElementsByTagName("*");var _192=["onabort","onblur","onchange","onclick","ondblclick","onerror","onfocus","onkeydown","onkeypress","onkeyup","onload","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onreset","onresize","onselect","onsubmit","onunload"];var _193=false;for(var a=0;a<_191.length;a++){for(var b=0;b<_192.length;b++){if(_191[a][_192[b]]){_18f++;try{if(!_193){delete _191[a][_192[b]];}}catch(e){_193=true;}try{_191[a][_192[b]]=undefined;}catch(e2){}}}var _194=(new Date()).getTime()-_190;if(_194>333){console.error("alp.util.memleak alltags cleanup: maxtime reached.");break;}}_191=undefined;})();if(djConfig.isDebug){console.log("xxx memleak unload end - alert");}if(djConfig.isDebug>1){console.log("xxx debug alp.util.unleak on unload, dojo untouched,\n count_clearlisteners:"+_17a+"\n count_disconnect:"+_17b+"\n count_unsubscribe:"+_17c+"\n alltags_ms:"+dojo.global.alltags_ms+"  count_alltags:"+dojo.global.count_alltags);}});});})();})();}if(typeof dojo==="undefined"||!dojo._hasResource["dojo.data.util.sorter"]){typeof dojo==="undefined"||(dojo._hasResource["dojo.data.util.sorter"]=true);dojo.provide("dojo.data.util.sorter");dojo.data.util.sorter.basicComparator=function(a,b){var r=-1;if(a===null){a=undefined;}if(b===null){b=undefined;}if(a==b){r=0;}else{if(a>b||a==null){r=1;}}return r;};dojo.data.util.sorter.createSortFunction=function(_195,_196){var _197=[];function _198(attr,dir,comp,s){return function(_199,_19a){var a=s.getValue(_199,attr);var b=s.getValue(_19a,attr);return dir*comp(a,b);};};var _19b;var map=_196.comparatorMap;var bc=dojo.data.util.sorter.basicComparator;for(var i=0;i<_195.length;i++){_19b=_195[i];var attr=_19b.attribute;if(attr){var dir=(_19b.descending)?-1:1;var comp=bc;if(map){if(typeof attr!=="string"&&("toString" in attr)){attr=attr.toString();}comp=map[attr]||bc;}_197.push(_198(attr,dir,comp,_196));}}return function(rowA,rowB){var i=0;while(i<_197.length){var ret=_197[i++](rowA,rowB);if(ret!==0){return ret;}}return 0;};};}if(typeof dojo==="undefined"||!dojo._hasResource["dijit.form._FormSelectWidget"]){typeof dojo==="undefined"||(dojo._hasResource["dijit.form._FormSelectWidget"]=true);dojo.provide("dijit.form._FormSelectWidget");dojo.declare("dijit.form._FormSelectWidget",dijit.form._FormValueWidget,{multiple:false,options:null,store:null,query:null,queryOptions:null,onFetch:null,sortByLabel:true,loadChildrenOnOpen:false,getOptions:function(_19c){var _19d=_19c,opts=this.options||[],l=opts.length;if(_19d===undefined){return opts;}if(dojo.isArray(_19d)){return dojo.map(_19d,"return this.getOptions(item);",this);}if(dojo.isObject(_19c)){if(!dojo.some(this.options,function(o,idx){if(o===_19d||(o.value&&o.value===_19d.value)){_19d=idx;return true;}return false;})){_19d=-1;}}if(typeof _19d=="string"){for(var i=0;i<l;i++){if(opts[i].value===_19d){_19d=i;break;}}}if(typeof _19d=="number"&&_19d>=0&&_19d<l){return this.options[_19d];}return null;},addOption:function(_19e){if(!dojo.isArray(_19e)){_19e=[_19e];}dojo.forEach(_19e,function(i){if(i&&dojo.isObject(i)){this.options.push(i);}},this);this._loadChildren();},removeOption:function(_19f){if(!dojo.isArray(_19f)){_19f=[_19f];}var _1a0=this.getOptions(_19f);dojo.forEach(_1a0,function(i){if(i){this.options=dojo.filter(this.options,function(node,idx){return (node.value!==i.value);});this._removeOptionItem(i);}},this);this._loadChildren();},updateOption:function(_1a1){if(!dojo.isArray(_1a1)){_1a1=[_1a1];}dojo.forEach(_1a1,function(i){var _1a2=this.getOptions(i),k;if(_1a2){var _1a3={};for(k in i){if(k in _1a3){continue;}_1a2[k]=i[k];}}},this);this._loadChildren();},setStore:function(_1a4,_1a5,_1a6){var _1a7=this.store;_1a6=_1a6||{};if(_1a7!==_1a4){dojo.forEach(this._notifyConnections||[],dojo.disconnect);delete this._notifyConnections;if(_1a4&&_1a4.getFeatures()["dojo.data.api.Notification"]){this._notifyConnections=[dojo.connect(_1a4,"onNew",this,"_onNewItem"),dojo.connect(_1a4,"onDelete",this,"_onDeleteItem"),dojo.connect(_1a4,"onSet",this,"_onSetItem")];}this.store=_1a4;}this._onChangeActive=false;if(this.options&&this.options.length){this.removeOption(this.options);}if(_1a4){var cb=function(_1a8){if(this.sortByLabel&&!_1a6.sort&&_1a8.length){_1a8.sort(dojo.data.util.sorter.createSortFunction([{attribute:_1a4.getLabelAttributes(_1a8[0])[0]}],_1a4));}if(_1a6.onFetch){_1a8=_1a6.onFetch(_1a8);}dojo.forEach(_1a8,function(i){this._addOptionForItem(i);},this);this._loadingStore=false;this.attr("value",(("_pendingValue" in this)?this._pendingValue:_1a5));delete this._pendingValue;if(!this.loadChildrenOnOpen){this._loadChildren();}else{this._pseudoLoadChildren(_1a8);}this._fetchedWith=opts;this._lastValueReported=this.multiple?[]:null;this._onChangeActive=true;this.onSetStore();this._handleOnChange(this.value);};var opts=dojo.mixin({onComplete:cb,scope:this},_1a6);this._loadingStore=true;_1a4.fetch(opts);}else{delete this._fetchedWith;}return _1a7;},_setValueAttr:function(_1a9,_1aa){if(this._loadingStore){this._pendingValue=_1a9;return;}var opts=this.getOptions()||[];if(!dojo.isArray(_1a9)){_1a9=[_1a9];}dojo.forEach(_1a9,function(i,idx){if(!dojo.isObject(i)){i=i+"";}if(typeof i==="string"){_1a9[idx]=dojo.filter(opts,function(node){return node.value===i;})[0]||{value:"",label:""};}},this);_1a9=dojo.filter(_1a9,function(i){return i&&i.value;});if(!this.multiple&&(!_1a9[0]||!_1a9[0].value)&&opts.length){_1a9[0]=opts[0];}dojo.forEach(opts,function(i){i.selected=dojo.some(_1a9,function(v){return v.value===i.value;});});var val=dojo.map(_1a9,function(i){return i.value;}),disp=dojo.map(_1a9,function(i){return i.label;});this.value=this.multiple?val:val[0];this._setDisplay(this.multiple?disp:disp[0]);this._updateSelection();this._handleOnChange(this.value,_1aa);},_getDisplayedValueAttr:function(){var val=this.attr("value");if(!dojo.isArray(val)){val=[val];}var ret=dojo.map(this.getOptions(val),function(v){if(v&&"label" in v){return v.label;}else{if(v){return v.value;}}return null;},this);return this.multiple?ret:ret[0];},_getValueDeprecated:false,getValue:function(){return this._lastValue;},undo:function(){this._setValueAttr(this._lastValueReported,false);},_loadChildren:function(){if(this._loadingStore){return;}dojo.forEach(this._getChildren(),function(_1ab){_1ab.destroyRecursive();});dojo.forEach(this.options,this._addOptionItem,this);this._updateSelection();},_updateSelection:function(){this.value=this._getValueFromOpts();var val=this.value;if(!dojo.isArray(val)){val=[val];}if(val&&val[0]){dojo.forEach(this._getChildren(),function(_1ac){var _1ad=dojo.some(val,function(v){return _1ac.option&&(v===_1ac.option.value);});dojo.toggleClass(_1ac.domNode,this.baseClass+"SelectedOption",_1ad);dijit.setWaiState(_1ac.domNode,"selected",_1ad);},this);}this._handleOnChange(this.value);},_getValueFromOpts:function(){var opts=this.getOptions()||[];if(!this.multiple&&opts.length){var opt=dojo.filter(opts,function(i){return i.selected;})[0];if(opt&&opt.value){return opt.value;}else{opts[0].selected=true;return opts[0].value;}}else{if(this.multiple){return dojo.map(dojo.filter(opts,function(i){return i.selected;}),function(i){return i.value;})||[];}}return "";},_onNewItem:function(item,_1ae){if(!_1ae||!_1ae.parent){this._addOptionForItem(item);}},_onDeleteItem:function(item){var _1af=this.store;this.removeOption(_1af.getIdentity(item));},_onSetItem:function(item){this.updateOption(this._getOptionObjForItem(item));},_getOptionObjForItem:function(item){var _1b0=this.store,_1b1=_1b0.getLabel(item),_1b2=(_1b1?_1b0.getIdentity(item):null);return {value:_1b2,label:_1b1,item:item};},_addOptionForItem:function(item){var _1b3=this.store;if(!_1b3.isItemLoaded(item)){_1b3.loadItem({item:item,onComplete:function(i){this._addOptionForItem(item);},scope:this});return;}var _1b4=this._getOptionObjForItem(item);this.addOption(_1b4);},constructor:function(_1b5){this._oValue=(_1b5||{}).value||null;},_fillContent:function(){var opts=this.options;if(!opts){opts=this.options=this.srcNodeRef?dojo.query(">",this.srcNodeRef).map(function(node){if(node.getAttribute("type")==="separator"){return {value:"",label:"",selected:false,disabled:false};}return {value:node.getAttribute("value"),label:String(node.innerHTML),selected:node.getAttribute("selected")||false,disabled:node.getAttribute("disabled")||false};},this):[];}if(!this.value){this.value=this._getValueFromOpts();}else{if(this.multiple&&typeof this.value=="string"){this.value=this.value.split(",");}}},postCreate:function(){dojo.setSelectable(this.focusNode,false);this.inherited(arguments);this.connect(this,"onChange","_updateSelection");this.connect(this,"startup","_loadChildren");this._setValueAttr(this.value,null);},startup:function(){this.inherited(arguments);var _1b6=this.store,_1b7={};dojo.forEach(["query","queryOptions","onFetch"],function(i){if(this[i]){_1b7[i]=this[i];}delete this[i];},this);if(_1b6&&_1b6.getFeatures()["dojo.data.api.Identity"]){this.store=null;this.setStore(_1b6,this._oValue,_1b7);}},destroy:function(){dojo.forEach(this._notifyConnections||[],dojo.disconnect);this.inherited(arguments);},_addOptionItem:function(_1b8){},_removeOptionItem:function(_1b9){},_setDisplay:function(_1ba){},_getChildren:function(){return [];},_getSelectedOptionsAttr:function(){return this.getOptions(this.attr("value"));},_pseudoLoadChildren:function(_1bb){},onSetStore:function(){}});}if(typeof dojo==="undefined"||!dojo._hasResource["dojox.form._FormSelectWidget"]){typeof dojo==="undefined"||(dojo._hasResource["dojox.form._FormSelectWidget"]=true);dojo.deprecated("dojox.form._FormSelectWidget","Use dijit.form._FormSelectWidget instead","2.0");dojo.provide("dojox.form._FormSelectWidget");dojo.setObject("dojox.form._FormSelectWidget",dijit.form._FormSelectWidget);}if(typeof dojo==="undefined"||!dojo._hasResource["alp.x.popup"]){typeof dojo==="undefined"||(dojo._hasResource["alp.x.popup"]=true);dojo.provide("alp.x.popup");alp.x.popup=new function(){var _1bc=[],_1bd=1000,_1be=1;this.prepare=function(node){var s=node.style;s.visibility="hidden";s.position="absolute";s.top="-9999px";if(s.display=="none"){s.display="";}dojo.body().appendChild(node);};this.open=function(args){var _1bf=args.popup,_1c0=args.orient||{"BL":"TL","TL":"BL"},_1c1=args.around,id=(args.around&&args.around.id)?(args.around.id+"_dropdown"):("popup_"+_1be++);var _1c2=["dijitPopup"];if(typeof args.extraClass==="string"){_1c2.push(args.extraClass);}else{if((typeof args.extraClass==="object")&&args.extraClass.length){_1c2=_1c2.concat(args.extraClass);}}var _1c3=dojo.create("div",{id:id,"class":_1c2.join(" "),style:{zIndex:_1bd+_1bc.length,visibility:"hidden"}},dojo.body());dijit.setWaiRole(_1c3,"presentation");_1c3.style.left=_1c3.style.top="0px";if(args.parent){_1c3.dijitPopupParent=args.parent.id;}var s=_1bf.domNode.style;s.display="";s.visibility="";s.position="";s.top="0px";_1c3.appendChild(_1bf.domNode);var _1c4=new dijit.BackgroundIframe(_1c3);var best=_1c1?dijit.placeOnScreenAroundElement(_1c3,_1c1,_1c0,_1bf.orient?dojo.hitch(_1bf,"orient"):null):dijit.placeOnScreen(_1c3,args,_1c0=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],args.padding);_1c3.style.visibility="visible";var _1c5=[];var _1c6=function(){for(var pi=_1bc.length-1;pi>0&&_1bc[pi].parent===_1bc[pi-1].widget;pi--){}return _1bc[pi];};_1c5.push(dojo.connect(_1c3,"onkeypress",this,function(evt){if(evt.charOrCode==dojo.keys.ESCAPE&&args.onCancel){dojo.stopEvent(evt);args.onCancel();}else{if(evt.charOrCode===dojo.keys.TAB){dojo.stopEvent(evt);var _1c7=_1c6();if(_1c7&&_1c7.onCancel){_1c7.onCancel();}}}}));if(_1bf.onCancel){_1c5.push(dojo.connect(_1bf,"onCancel",null,args.onCancel));}_1c5.push(dojo.connect(_1bf,_1bf.onExecute?"onExecute":"onChange",null,function(){var _1c8=_1c6();if(_1c8&&_1c8.onExecute){_1c8.onExecute();}}));_1bc.push({wrapper:_1c3,iframe:_1c4,widget:_1bf,parent:args.parent,onExecute:args.onExecute,onCancel:args.onCancel,onClose:args.onClose,handlers:_1c5});if(_1bf.onOpen){_1bf.onOpen(best);}return best;};this.close=function(_1c9){while(dojo.some(_1bc,function(elem){return elem.widget==_1c9;})){var top=_1bc.pop(),_1ca=top.wrapper,_1cb=top.iframe,_1cc=top.widget,_1cd=top.onClose;if(_1cc.onClose){_1cc.onClose();}dojo.forEach(top.handlers,dojo.disconnect);if(!_1cc||!_1cc.domNode){return;}this.prepare(_1cc.domNode);_1cb.destroy();dojo.destroy(_1ca);if(_1cd){_1cd();}}};}();dijit._frames=new function(){var _1ce=[];this.pop=function(){var _1cf;if(_1ce.length){_1cf=_1ce.pop();_1cf.style.display="";}else{if(alp.util.likeIE()&&dojo.isIE<9){var burl=dojo.config.dojoBlankHtmlUrl||(dojo.moduleUrl("dojo","resources/blank.html")+"")||"javascript:\"\"";var html="<iframe src='"+burl+"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";_1cf=dojo.doc.createElement(html);}else{_1cf=dojo.create("iframe");_1cf.src="javascript:\"\"";_1cf.className="dijitBackgroundIframe";}_1cf.tabIndex=-1;dojo.body().appendChild(_1cf);}return _1cf;};this.push=function(_1d0){_1d0.style.display="none";if(alp.util.likeIE()){_1d0.style.removeExpression("width");_1d0.style.removeExpression("height");}_1ce.push(_1d0);};}();dijit.BackgroundIframe=function(node){if(!node.id){throw new Error("no id");}if((alp.util.likeIE()&&(dojo.isIE<7))||(alp.util.likeFF()&&(dojo.isFF<3)&&dojo.hasClass(dojo.body(),"dijit_a11y"))){var _1d1=dijit._frames.pop();node.appendChild(_1d1);if(alp.util.likeIE()){_1d1.style.setExpression("width",dojo._scopeName+".doc.getElementById('"+node.id+"').offsetWidth");_1d1.style.setExpression("height",dojo._scopeName+".doc.getElementById('"+node.id+"').offsetHeight");}this.iframe=_1d1;}};dojo.extend(dijit.BackgroundIframe,{destroy:function(){if(this.iframe){dijit._frames.push(this.iframe);delete this.iframe;}}});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.w._HasDropDown"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.w._HasDropDown"]=true);dojo.provide("alp.util.w._HasDropDown");dojo.declare("alp.util.w._HasDropDown",null,{dropDownNode:null,popupStateNode:null,aroundNode:null,dropDown:null,autoWidth:true,popupExtraClass:"",_stopClickEvents:true,_onMenuMouseup:function(e){},_onDropDownMouse:function(e){if(e.type=="click"&&!this._seenKeydown){return;}this._seenKeydown=false;if(e.type=="mousedown"){this._docHandler=this.connect(dojo.doc,"onmouseup","_onDropDownMouseup");}if(this.disabled||this.readOnly){return;}if(this._stopClickEvents){dojo.stopEvent(e);}this.toggleDropDown();if(e.type=="click"||e.type=="keypress"){this._onDropDownMouseup();}},_onDropDownMouseup:function(e){if(e&&this._docHandler){this.disconnect(this._docHandler);}var _1d2=this.dropDown,_1d3=false;if(e&&this._opened){var t=e.target;while(t&&!_1d3){if(dojo.hasClass(t,"dijitPopup")){_1d3=true;}else{t=t.parentNode;}}if(_1d3){this._onMenuMouseup(e);return;}}if(this._opened&&_1d2.focus){window.setTimeout(dojo.hitch(_1d2,"focus"),1);}else{dijit.focus(this.focusNode);}},_setupDropdown:function(){this.dropDownNode=this.dropDownNode||this.focusNode||this.domNode;this.popupStateNode=this.popupStateNode||this.focusNode||this.dropDownNode;this.aroundNode=this.aroundNode||this.domNode;this.connect(this.dropDownNode,"onmousedown","_onDropDownMouse");this.connect(this.dropDownNode,"onclick","_onDropDownMouse");this.connect(this.dropDownNode,"onkeydown","_onDropDownKeydown");this.connect(this.dropDownNode,"onblur","_onDropDownBlur");this.connect(this.dropDownNode,"onkeypress","_onKey");if(this._setStateClass){this.connect(this,"openDropDown","_setStateClass");this.connect(this,"closeDropDown","_setStateClass");}},postCreate:function(){this._setupDropdown();this.inherited("postCreate",arguments);},startup:function(){alp.x.popup.prepare(this.dropDown.domNode);this.inherited("startup",arguments);},destroyDescendants:function(){if(this.dropDown){this.dropDown.destroyRecursive();delete this.dropDown;}this.inherited("destroyDescendants",arguments);},_onDropDownKeydown:function(e){this._seenKeydown=true;},_onKeyPress:function(e){if(this._opened&&e.charOrCode==dojo.keys.ESCAPE&&!e.shiftKey&&!e.ctrlKey&&!e.altKey){this.toggleDropDown();dojo.stopEvent(e);return;}this.inherited(arguments);},_onDropDownBlur:function(e){this._seenKeydown=false;},_onKey:function(e){if(this.disabled||this.readOnly){return;}var d=this.dropDown;if(d&&this._opened&&d.handleKey){if(d.handleKey(e)===false){return;}}if(d&&this._opened&&e.keyCode==dojo.keys.ESCAPE){this.toggleDropDown();return;}if(e.keyCode==dojo.keys.DOWN_ARROW){this._onDropDownMouse(e);}},_onBlur:function(){this.closeDropDown();this.inherited("_onBlur",arguments);},isLoaded:function(){return true;},loadDropDown:function(_1d4){_1d4();},toggleDropDown:function(){if(this.disabled||this.readOnly){return;}this.focus();var _1d5=this.dropDown;if(!_1d5){return;}if(!this._opened){if(!this.isLoaded()){this.loadDropDown(dojo.hitch(this,"openDropDown"));return;}else{this.openDropDown();}}else{this.closeDropDown();}},openDropDown:function(){var _1d6=this.dropDown;var _1d7=_1d6.domNode.style.width;var self=this;var _1d8=alp.x.popup.open({parent:this,popup:_1d6,around:this.aroundNode,orient:this.isLeftToRight()?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"},onExecute:function(){self.closeDropDown(true);},onCancel:function(){self.closeDropDown(true);},onClose:function(){_1d6.domNode.style.width=_1d7;dojo.attr(self.popupStateNode,"popupActive",false);dojo.removeClass(self.popupStateNode,"dojoxHasDropDownOpen");self._opened=false;self.state="";},extraClass:this.popupExtraClass});if(this.autoWidth&&this.domNode.offsetWidth>_1d6.domNode.offsetWidth){var _1d9=null;if(!this.isLeftToRight()){_1d9=_1d6.domNode.parentNode;var _1da=_1d9.offsetLeft+_1d9.offsetWidth;}if(_1d6.resize){_1d6.resize({w:this.domNode.offsetWidth});}else{dojo.marginBox(_1d6.domNode,{w:this.domNode.offsetWidth});}if(_1d9){_1d9.style.left=_1da-this.domNode.offsetWidth+"px";}}dojo.attr(this.popupStateNode,"popupActive","true");dojo.addClass(self.popupStateNode,"dojoxHasDropDownOpen");this._opened=true;this.state="Opened";return _1d8;},closeDropDown:function(_1db){if(this._opened){alp.x.popup.close(this.dropDown);if(_1db){this.focus();}this._opened=false;this.state="";}}});}if(typeof dojo==="undefined"||!dojo._hasResource["dijit._KeyNavContainer"]){typeof dojo==="undefined"||(dojo._hasResource["dijit._KeyNavContainer"]=true);dojo.provide("dijit._KeyNavContainer");dojo.declare("dijit._KeyNavContainer",dijit._Container,{tabIndex:"0",_keyNavCodes:{},connectKeyNavHandlers:function(_1dc,_1dd){var _1de=(this._keyNavCodes={});var prev=dojo.hitch(this,this.focusPrev);var next=dojo.hitch(this,this.focusNext);dojo.forEach(_1dc,function(code){_1de[code]=prev;});dojo.forEach(_1dd,function(code){_1de[code]=next;});this.connect(this.domNode,"onkeypress","_onContainerKeypress");this.connect(this.domNode,"onfocus","_onContainerFocus");},startupKeyNavChildren:function(){dojo.forEach(this.getChildren(),dojo.hitch(this,"_startupChild"));},addChild:function(_1df,_1e0){dijit._KeyNavContainer.superclass.addChild.apply(this,arguments);this._startupChild(_1df);},focus:function(){this.focusFirstChild();},focusFirstChild:function(){var _1e1=this._getFirstFocusableChild();if(_1e1){this.focusChild(_1e1);}},focusNext:function(){var _1e2=this._getNextFocusableChild(this.focusedChild,1);this.focusChild(_1e2);},focusPrev:function(){var _1e3=this._getNextFocusableChild(this.focusedChild,-1);this.focusChild(_1e3,true);},focusChild:function(_1e4,last){if(this.focusedChild&&_1e4!==this.focusedChild){this._onChildBlur(this.focusedChild);}_1e4.focus(last?"end":"start");this.focusedChild=_1e4;},_startupChild:function(_1e5){_1e5.attr("tabIndex","-1");this.connect(_1e5,"_onFocus",function(){_1e5.attr("tabIndex",this.tabIndex);});this.connect(_1e5,"_onBlur",function(){_1e5.attr("tabIndex","-1");});},_onContainerFocus:function(evt){if(evt.target!==this.domNode){return;}this.focusFirstChild();dojo.attr(this.domNode,"tabIndex","-1");},_onBlur:function(evt){if(this.tabIndex){dojo.attr(this.domNode,"tabIndex",this.tabIndex);}this.inherited(arguments);},_onContainerKeypress:function(evt){if(evt.ctrlKey||evt.altKey){return;}var func=this._keyNavCodes[evt.charOrCode];if(func){func();dojo.stopEvent(evt);}},_onChildBlur:function(_1e6){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1);},_getNextFocusableChild:function(_1e7,dir){if(_1e7){_1e7=this._getSiblingOfChild(_1e7,dir);}var _1e8=this.getChildren();for(var i=0;i<_1e8.length;i++){if(!_1e7){_1e7=_1e8[(dir>0)?0:(_1e8.length-1)];}if(_1e7.isFocusable()){return _1e7;}_1e7=this._getSiblingOfChild(_1e7,dir);}return null;}});}if(typeof dojo==="undefined"||!dojo._hasResource["dijit.MenuItem"]){typeof dojo==="undefined"||(dojo._hasResource["dijit.MenuItem"]=true);dojo.provide("dijit.MenuItem");dojo.declare("dijit.MenuItem",[dijit._Widget,dijit._Templated,dijit._Contained],{templateString:dojo.cache("dijit","templates/MenuItem.html","<tr class=\"dijitReset dijitMenuItem\" dojoAttachPoint=\"focusNode\" waiRole=\"menuitem\" tabIndex=\"-1\"\n\t\tdojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\n\t<td class=\"dijitReset\" waiRole=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuItemIcon\" dojoAttachPoint=\"iconNode\">\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" dojoAttachPoint=\"containerNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" dojoAttachPoint=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" waiRole=\"presentation\">\n\t\t<div dojoAttachPoint=\"arrowWrapper\" style=\"visibility: hidden\">\n\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuExpand\">\n\t\t\t<span class=\"dijitMenuExpandA11y\">+</span>\n\t\t</div>\n\t</td>\n</tr>\n"),attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{label:{node:"containerNode",type:"innerHTML"},iconClass:{node:"iconNode",type:"class"}}),label:"",iconClass:"",accelKey:"",disabled:false,_fillContent:function(_1e9){if(_1e9&&!("label" in this.params)){this.attr("label",_1e9.innerHTML);}},postCreate:function(){dojo.setSelectable(this.domNode,false);var _1ea=this.id+"_text";dojo.attr(this.containerNode,"id",_1ea);if(this.accelKeyNode){dojo.attr(this.accelKeyNode,"id",this.id+"_accel");_1ea+=" "+this.id+"_accel";}dijit.setWaiState(this.domNode,"labelledby",_1ea);},_onHover:function(){dojo.addClass(this.domNode,"dijitMenuItemHover");this.getParent().onItemHover(this);},_onUnhover:function(){dojo.removeClass(this.domNode,"dijitMenuItemHover");this.getParent().onItemUnhover(this);},_onClick:function(evt){this.getParent().onItemClick(this,evt);dojo.stopEvent(evt);},onClick:function(evt){},focus:function(){try{if(dojo.isIE==8){this.containerNode.focus();}dijit.focus(this.focusNode);}catch(e){}},_onFocus:function(){this._setSelected(true);this.getParent()._onItemFocus(this);this.inherited(arguments);},_setSelected:function(_1eb){dojo.toggleClass(this.domNode,"dijitMenuItemSelected",_1eb);},setLabel:function(_1ec){dojo.deprecated("dijit.MenuItem.setLabel() is deprecated.  Use attr('label', ...) instead.","","2.0");this.attr("label",_1ec);},setDisabled:function(_1ed){dojo.deprecated("dijit.Menu.setDisabled() is deprecated.  Use attr('disabled', bool) instead.","","2.0");this.attr("disabled",_1ed);},_setDisabledAttr:function(_1ee){this.disabled=_1ee;dojo[_1ee?"addClass":"removeClass"](this.domNode,"dijitMenuItemDisabled");dijit.setWaiState(this.focusNode,"disabled",_1ee?"true":"false");},_setAccelKeyAttr:function(_1ef){this.accelKey=_1ef;this.accelKeyNode.style.display=_1ef?"":"none";this.accelKeyNode.innerHTML=_1ef;dojo.attr(this.containerNode,"colSpan",_1ef?"1":"2");}});}if(typeof dojo==="undefined"||!dojo._hasResource["dijit.PopupMenuItem"]){typeof dojo==="undefined"||(dojo._hasResource["dijit.PopupMenuItem"]=true);dojo.provide("dijit.PopupMenuItem");dojo.declare("dijit.PopupMenuItem",dijit.MenuItem,{_fillContent:function(){if(this.srcNodeRef){var _1f0=dojo.query("*",this.srcNodeRef);dijit.PopupMenuItem.superclass._fillContent.call(this,_1f0[0]);this.dropDownContainer=this.srcNodeRef;}},startup:function(){if(this._started){return;}this.inherited(arguments);if(!this.popup){var node=dojo.query("[widgetId]",this.dropDownContainer)[0];this.popup=dijit.byNode(node);}dojo.body().appendChild(this.popup.domNode);this.popup.domNode.style.display="none";if(this.arrowWrapper){dojo.style(this.arrowWrapper,"visibility","");}dijit.setWaiState(this.focusNode,"haspopup","true");},destroyDescendants:function(){if(this.popup){if(!this.popup._destroyed){this.popup.destroyRecursive();}delete this.popup;}this.inherited(arguments);}});}if(typeof dojo==="undefined"||!dojo._hasResource["dijit.CheckedMenuItem"]){typeof dojo==="undefined"||(dojo._hasResource["dijit.CheckedMenuItem"]=true);dojo.provide("dijit.CheckedMenuItem");dojo.declare("dijit.CheckedMenuItem",dijit.MenuItem,{templateString:dojo.cache("dijit","templates/CheckedMenuItem.html","<tr class=\"dijitReset dijitMenuItem\" dojoAttachPoint=\"focusNode\" waiRole=\"menuitemcheckbox\" tabIndex=\"-1\"\n\t\tdojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\n\t<td class=\"dijitReset\" waiRole=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuItemIcon dijitCheckedMenuItemIcon\" dojoAttachPoint=\"iconNode\">\n\t\t<span class=\"dijitCheckedMenuItemIconChar\">&#10003;</span>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" dojoAttachPoint=\"containerNode,labelNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" dojoAttachPoint=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" waiRole=\"presentation\">\n\t</td>\n</tr>\n"),checked:false,_setCheckedAttr:function(_1f1){dojo.toggleClass(this.domNode,"dijitCheckedMenuItemChecked",_1f1);dijit.setWaiState(this.domNode,"checked",_1f1);this.checked=_1f1;},onChange:function(_1f2){},_onClick:function(e){if(!this.disabled){this.attr("checked",!this.checked);this.onChange(this.checked);}this.inherited(arguments);}});}if(typeof dojo==="undefined"||!dojo._hasResource["dijit.MenuSeparator"]){typeof dojo==="undefined"||(dojo._hasResource["dijit.MenuSeparator"]=true);dojo.provide("dijit.MenuSeparator");dojo.declare("dijit.MenuSeparator",[dijit._Widget,dijit._Templated,dijit._Contained],{templateString:dojo.cache("dijit","templates/MenuSeparator.html","<tr class=\"dijitMenuSeparator\">\n\t<td colspan=\"4\">\n\t\t<div class=\"dijitMenuSeparatorTop\"></div>\n\t\t<div class=\"dijitMenuSeparatorBottom\"></div>\n\t</td>\n</tr>\n"),postCreate:function(){dojo.setSelectable(this.domNode,false);},isFocusable:function(){return false;}});}if(typeof dojo==="undefined"||!dojo._hasResource["dijit.Menu"]){typeof dojo==="undefined"||(dojo._hasResource["dijit.Menu"]=true);dojo.provide("dijit.Menu");dojo.declare("dijit._MenuBase",[dijit._Widget,dijit._Templated,dijit._KeyNavContainer],{parentMenu:null,popupDelay:500,startup:function(){if(this._started){return;}dojo.forEach(this.getChildren(),function(_1f3){_1f3.startup();});this.startupKeyNavChildren();this.inherited(arguments);},onExecute:function(){},onCancel:function(_1f4){},_moveToPopup:function(evt){if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled){this.focusedChild._onClick(evt);}else{var _1f5=this._getTopMenu();if(_1f5&&_1f5._isMenuBar){_1f5.focusNext();}}},_onPopupHover:function(evt){if(this.currentPopup&&this.currentPopup._pendingClose_timer){var _1f6=this.currentPopup.parentMenu;if(_1f6.focusedChild){_1f6.focusedChild._setSelected(false);}_1f6.focusedChild=this.currentPopup.from_item;_1f6.focusedChild._setSelected(true);this._stopPendingCloseTimer(this.currentPopup);}},onItemHover:function(item){if(this.isActive){this.focusChild(item);if(this.focusedChild.popup&&!this.focusedChild.disabled&&!this.hover_timer){this.hover_timer=setTimeout(dojo.hitch(this,"_openPopup"),this.popupDelay);}}if(this.focusedChild){this.focusChild(item);}this._hoveredChild=item;},_onChildBlur:function(item){this._stopPopupTimer();item._setSelected(false);var _1f7=item.popup;if(_1f7){this._stopPendingCloseTimer(_1f7);_1f7._pendingClose_timer=setTimeout(function(){_1f7._pendingClose_timer=null;if(_1f7.parentMenu){_1f7.parentMenu.currentPopup=null;}dijit.popup.close(_1f7);},this.popupDelay);}},onItemUnhover:function(item){if(this.isActive){this._stopPopupTimer();}if(this._hoveredChild==item){this._hoveredChild=null;}},_stopPopupTimer:function(){if(this.hover_timer){clearTimeout(this.hover_timer);this.hover_timer=null;}},_stopPendingCloseTimer:function(_1f8){if(_1f8._pendingClose_timer){clearTimeout(_1f8._pendingClose_timer);_1f8._pendingClose_timer=null;}},_stopFocusTimer:function(){if(this._focus_timer){clearTimeout(this._focus_timer);this._focus_timer=null;}},_getTopMenu:function(){for(var top=this;top.parentMenu;top=top.parentMenu){}return top;},onItemClick:function(item,evt){if(item.disabled){return false;}if(typeof this.isShowingNow=="undefined"){this._markActive();}this.focusChild(item);if(item.popup){this._openPopup();}else{this.onExecute();item.onClick(evt);}},_openPopup:function(){this._stopPopupTimer();var _1f9=this.focusedChild;if(!_1f9){return;}var _1fa=_1f9.popup;if(_1fa.isShowingNow){return;}if(this.currentPopup){this._stopPendingCloseTimer(this.currentPopup);dijit.popup.close(this.currentPopup);}_1fa.parentMenu=this;_1fa.from_item=_1f9;var self=this;dijit.popup.open({parent:this,popup:_1fa,around:_1f9.domNode,orient:this._orient||(this.isLeftToRight()?{"TR":"TL","TL":"TR","BR":"BL","BL":"BR"}:{"TL":"TR","TR":"TL","BL":"BR","BR":"BL"}),onCancel:function(){self.focusChild(_1f9);self._cleanUp();_1f9._setSelected(true);self.focusedChild=_1f9;},onExecute:dojo.hitch(this,"_cleanUp")});this.currentPopup=_1fa;_1fa.connect(_1fa.domNode,"onmouseenter",dojo.hitch(self,"_onPopupHover"));if(_1fa.focus){_1fa._focus_timer=setTimeout(dojo.hitch(_1fa,function(){this._focus_timer=null;this.focus();}),0);}},_markActive:function(){this.isActive=true;dojo.addClass(this.domNode,"dijitMenuActive");dojo.removeClass(this.domNode,"dijitMenuPassive");},onOpen:function(e){this.isShowingNow=true;this._markActive();},_markInactive:function(){this.isActive=false;dojo.removeClass(this.domNode,"dijitMenuActive");dojo.addClass(this.domNode,"dijitMenuPassive");},onClose:function(){this._stopFocusTimer();this._markInactive();this.isShowingNow=false;this.parentMenu=null;},_closeChild:function(){this._stopPopupTimer();if(this.focusedChild){this.focusedChild._setSelected(false);this.focusedChild._onUnhover();this.focusedChild=null;}if(this.currentPopup){dijit.popup.close(this.currentPopup);this.currentPopup=null;}},_onItemFocus:function(item){if(this._hoveredChild&&this._hoveredChild!=item){this._hoveredChild._onUnhover();}},_onBlur:function(){this._cleanUp();this.inherited(arguments);},_cleanUp:function(){this._closeChild();if(typeof this.isShowingNow=="undefined"){this._markInactive();}}});dojo.declare("dijit.Menu",dijit._MenuBase,{constructor:function(){this._bindings=[];},templateString:dojo.cache("dijit","templates/Menu.html","<table class=\"dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable\" waiRole=\"menu\" tabIndex=\"${tabIndex}\" dojoAttachEvent=\"onkeypress:_onKeyPress\">\n\t<tbody class=\"dijitReset\" dojoAttachPoint=\"containerNode\"></tbody>\n</table>\n"),targetNodeIds:[],contextMenuForWindow:false,leftClickToOpen:false,refocus:true,_contextMenuWithMouse:false,postCreate:function(){if(this.contextMenuForWindow){this.bindDomNode(dojo.body());}else{dojo.forEach(this.targetNodeIds,this.bindDomNode,this);}var k=dojo.keys,l=this.isLeftToRight();this._openSubMenuKey=l?k.RIGHT_ARROW:k.LEFT_ARROW;this._closeSubMenuKey=l?k.LEFT_ARROW:k.RIGHT_ARROW;this.connectKeyNavHandlers([k.UP_ARROW],[k.DOWN_ARROW]);},_onKeyPress:function(evt){if(evt.ctrlKey||evt.altKey){return;}switch(evt.charOrCode){case this._openSubMenuKey:this._moveToPopup(evt);dojo.stopEvent(evt);break;case this._closeSubMenuKey:if(this.parentMenu){if(this.parentMenu._isMenuBar){this.parentMenu.focusPrev();}else{this.onCancel(false);}}else{dojo.stopEvent(evt);}break;}},_iframeContentWindow:function(_1fb){var win=dijit.getDocumentWindow(this._iframeContentDocument(_1fb))||this._iframeContentDocument(_1fb)["__parent__"]||(_1fb.name&&dojo.doc.frames[_1fb.name])||null;return win;},_iframeContentDocument:function(_1fc){var doc=_1fc.contentDocument||(_1fc.contentWindow&&_1fc.contentWindow.document)||(_1fc.name&&dojo.doc.frames[_1fc.name]&&dojo.doc.frames[_1fc.name].document)||null;return doc;},bindDomNode:function(node){node=dojo.byId(node);var cn;if(node.tagName.toLowerCase()=="iframe"){var _1fd=node,win=this._iframeContentWindow(_1fd);cn=dojo.withGlobal(win,dojo.body);}else{cn=(node==dojo.body()?dojo.doc.documentElement:node);}var _1fe={node:node,iframe:_1fd};dojo.attr(node,"_dijitMenu"+this.id,this._bindings.push(_1fe));var _1ff=dojo.hitch(this,function(cn){return [dojo.connect(cn,(this.leftClickToOpen)?"onclick":"oncontextmenu",this,function(evt){this._openMyself(evt,cn,_1fd);}),dojo.connect(cn,"onkeydown",this,"_contextKey"),dojo.connect(cn,"onmousedown",this,"_contextMouse")];});_1fe.connects=cn?_1ff(cn):[];if(_1fd){_1fe.onloadHandler=dojo.hitch(this,function(){var win=this._iframeContentWindow(_1fd);cn=dojo.withGlobal(win,dojo.body);_1fe.connects=_1ff(cn);});if(_1fd.addEventListener){_1fd.addEventListener("load",_1fe.onloadHandler,false);}else{_1fd.attachEvent("onload",_1fe.onloadHandler);}}},unBindDomNode:function(_200){var node;try{node=dojo.byId(_200);}catch(e){return;}var _201="_dijitMenu"+this.id;if(node&&dojo.hasAttr(node,_201)){var bid=dojo.attr(node,_201)-1,b=this._bindings[bid];dojo.forEach(b.connects,dojo.disconnect);var _202=b.iframe;if(_202){if(_202.removeEventListener){_202.removeEventListener("load",b.onloadHandler,false);}else{_202.detachEvent("onload",b.onloadHandler);}}dojo.removeAttr(node,_201);delete this._bindings[bid];}},_contextKey:function(e){this._contextMenuWithMouse=false;if(e.keyCode==dojo.keys.F10){dojo.stopEvent(e);if(e.shiftKey&&e.type=="keydown"){var _203={target:e.target,pageX:e.pageX,pageY:e.pageY};_203.preventDefault=_203.stopPropagation=function(){};window.setTimeout(dojo.hitch(this,function(){this._openMyself(_203);}),1);}}},_contextMouse:function(e){this._contextMenuWithMouse=true;},_openMyself:function(e,node,_204){if(this.leftClickToOpen&&e.button>0){return;}dojo.stopEvent(e);var x,y;if(dojo.isSafari||this._contextMenuWithMouse){x=e.pageX;y=e.pageY;if(_204){var od=e.target.ownerDocument,ifc=dojo.position(_204,true),win=this._iframeContentWindow(_204),_205=dojo.withGlobal(win,"_docScroll",dojo);var cs=dojo.getComputedStyle(_204),tp=dojo._toPixelValue,left=(dojo.isIE&&dojo.isQuirks?0:tp(_204,cs.paddingLeft))+(dojo.isIE&&dojo.isQuirks?tp(_204,cs.borderLeftWidth):0),top=(dojo.isIE&&dojo.isQuirks?0:tp(_204,cs.paddingTop))+(dojo.isIE&&dojo.isQuirks?tp(_204,cs.borderTopWidth):0);x+=ifc.x+left-_205.x;y+=ifc.y+top-_205.y;}}else{var _206=dojo.position(e.target,true);x=_206.x+10;y=_206.y+10;}var self=this;var _207=dijit.getFocus(this);function _208(){if(self.refocus){dijit.focus(_207);}dijit.popup.close(self);};dijit.popup.open({popup:this,x:x,y:y,onExecute:_208,onCancel:_208,orient:this.isLeftToRight()?"L":"R"});this.focus();this._onBlur=function(){this.inherited("_onBlur",arguments);dijit.popup.close(this);};},uninitialize:function(){dojo.forEach(this._bindings,function(b){if(b){this.unBindDomNode(b.node);}},this);this.inherited(arguments);}});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.w.DropDownSelect"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.w.DropDownSelect"]=true);dojo.provide("alp.util.w.DropDownSelect");dojo.declare("alp.util.w.DropDownSelect",[dojox.form._FormSelectWidget,alp.util.w._HasDropDown],{attributeMap:dojo.mixin(dojo.clone(dojox.form._FormSelectWidget.prototype.attributeMap),{value:"valueNode",name:"valueNode"}),baseClass:"dojoxDropDownSelect",templateString:"<table class='dijit dijitReset dijitInline dijitLeft'\n\tdojoAttachPoint=\"dropDownNode,tableNode\" cellspacing='0' cellpadding='0' waiRole=\"presentation\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"\n\t><tbody waiRole=\"presentation\"><tr waiRole=\"presentation\"\n\t\t><td class=\"dijitReset dijitStretch dijitButtonContents dijitButtonNode\" \n\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"  dojoAttachPoint=\"containerNode,popupStateNode\" id=\"${id}_label\"></span\n\t\t\t><input type=\"hidden\" ${nameAttrSetting} dojoAttachPoint=\"valueNode\" value=\"${value}\" />\n\t\t</td><td class=\"dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton\" \n\t\t\t\tdojoAttachPoint=\"focusNode,titleNode\" waiRole=\"button\" waiState=\"haspopup-true,labelledby-${id}_label\"\n\t\t\t><div class=\"dijitReset dijitArrowButtonInner\">&thinsp;</div\n\t\t\t><div class=\"dijitReset dijitArrowButtonChar\" waiRole=\"presentation\">&#9660;</div\n\t\t></td\n\t></tr></tbody\n></table>\n",attributeMap:dojo.mixin(dojo.clone(dojox.form._FormSelectWidget.prototype.attributeMap),{style:"tableNode"}),required:false,state:"",tooltipPosition:[],emptyLabel:"",_isLoaded:false,_childrenLoaded:false,_fillContent:function(){this.inherited(arguments);if(this.options.length&&!this.value){var si=this.srcNodeRef.selectedIndex;this.value=this.options[si!=-1?si:0].value;}this.dropDown=new dijit.Menu();dojo.addClass(this.dropDown.domNode,this.baseClass+"Menu");},_getMenuItemForOption:function(_209){if(!_209.value){return new dijit.MenuSeparator();}else{var _20a=dojo.hitch(this,"_setValueAttr",_209);return new dijit.MenuItem({option:_209,label:_209.label,onClick:_20a,disabled:_209.disabled||false});}},_addOptionItem:function(_20b){this.dropDown.addChild(this._getMenuItemForOption(_20b));},_getChildren:function(){return this.dropDown.getChildren();},_loadChildren:function(){this.inherited(arguments);var len=this.options.length;this._isLoaded=false;this._childrenLoaded=true;if(!this._iReadOnly){this.attr("readOnly",(len===1));delete this._iReadOnly;}if(!this._iDisabled){this.attr("disabled",(len===0));delete this._iDisabled;}this._setValueAttr(this.value);},_setValueAttr:function(_20c){this.inherited(arguments);dojo.attr(this.valueNode,"value",this.attr("value"));},_setDisplay:function(_20d){this.containerNode.innerHTML="<span class=\" "+this.baseClass+"Label\">"+(_20d||this.emptyLabel||"&nbsp;")+"</span>";this._layoutHack();},validate:function(_20e){var _20f=this.isValid(_20e);this.state=_20f?"":"Error";this._setStateClass();dijit.setWaiState(this.focusNode,"invalid",_20f?"false":"true");var _210=_20f?"":this._missingMsg;if(this._message!==_210){this._message=_210;dijit.hideTooltip(this.domNode);if(_210){dijit.showTooltip(_210,this.domNode,this.tooltipPosition);}}return _20f;},isValid:function(_211){return (!this.required||!(/^\s*$/.test(this.value)));},reset:function(){this.inherited(arguments);dijit.hideTooltip(this.domNode);this.state="";this._setStateClass();delete this._message;},postMixInProperties:function(){this.inherited(arguments);this._missingMsg=dojo.i18n.getLocalization("dijit.form","validate",this.lang).missingMessage;},postCreate:function(){this.inherited(arguments);if(dojo.attr(this.srcNodeRef,"disabled")){this.attr("disabled",true);}if(this.tableNode.style.width){dojo.addClass(this.domNode,this.baseClass+"FixedWidth");}},startup:function(){if(this._started){return;}if(!this.dropDown){var _212=dojo.query("[widgetId]",this.dropDownContainer)[0];this.dropDown=dijit.byNode(_212);delete this.dropDownContainer;}this.inherited(arguments);},_onMenuMouseup:function(e){var _213=this.dropDown,t=e.target;if(_213.onItemClick){var _214;while(t&&!(_214=dijit.byNode(t))){t=t.parentNode;}if(_214&&_214.onClick&&_214.getParent){_214.getParent().onItemClick(_214,e);}}},isLoaded:function(){return this._isLoaded;},loadDropDown:function(_215){this._loadChildren();this._isLoaded=true;_215();},_setReadOnlyAttr:function(_216){this._iReadOnly=_216;if(!_216&&this._childrenLoaded&&this.options.length===1){return;}this.readOnly=_216;},_setDisabledAttr:function(_217){this._iDisabled=_217;if(!_217&&this._childrenLoaded&&this.options.length===0){return;}this.inherited(arguments);},uninitialize:function(_218){if(this.dropDown){this.dropDown.destroyRecursive(_218);delete this.dropDown;}this.inherited(arguments);}});}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3._core"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3._core"]=true);dojo.provide("alp._gmap2_3._core");(function(){var AG=alp._gmap2_3;AG.V2=function(v){return (v||AG.v())==AG.V2;};AG.V2.valueOf=function(){return 2;};AG.V2.toString=null;AG.V3=function(v){return (v||AG.v())==AG.V3;};AG.V3.valueOf=function(){return 3;};AG.V3.toString=null;AG.v=function(){var gm=dojo.getObject("google.maps");if(gm&&/^3\./.test(gm.version)&&gm.Map&&gm.MVCObject){return (AG.v=function(){return AG.V3;})();}if(gm&&gm.Map2&&typeof GMap2==="function"){return (AG.v=function(){return AG.V2;})();}console.error("alp._gmap2_3.v() could not determine the google maps version for gm:",gm);};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3"]=true);dojo.provide("alp._gmap2_3");}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.digitize.const"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.digitize.const"]=true);dojo.provide("alp._gmap2_3.digitize.const");(function(){var ad=alp._gmap2_3.digitize;ad.ADDRESS=function(){return "address";};ad.DATATYPE_NAME=function(){return "datatype_name";};ad.DEFAULT_NETWORK=function(){return "default_network";};ad.DURATION_MS=function(){return "duration_ms";};ad.DURATION_MS_VALUE=function(){return "value_ms";};ad.DURATION_MS_FLATSPEEDKMH=function(){return "flat_speed_kmh";};ad.EXTENSION=function(){return "extension";};ad.GEO_XY=function(){return "geo_xy";};ad.NEXTLEG=function(){return "nextleg";};ad.NEXTLEG_ETC=function(){return [ad.SPEED_KMH(),ad.KSF(),ad.PUBLIC_TRANSPORT(),ad.PT_RAIL_ONLY(),ad.ROUTING_ENGINE(),ad.ROUTING_NETWORK(),ad.PT_WITH_BIKE()];};ad.PT_RAIL_ONLY=function(){return "railonly";};ad.PT_WITH_BIKE=function(){return "withbike";};ad.PUBLIC_TRANSPORT=function(){return "publictransport";};ad.PUBLIC_TRANSPORT_STEP_ARR=function(){return "publictransport_steps";};ad.REVERSE_FEATURE=function(){return "reverse_feature";};ad.ROUTING_ENGINE=function(){return "routingengine";};ad.ROUTING_NETWORK=function(){return "routingnetwork";};ad.TIME_END=function(){return "time_end";};ad.TIME_START=function(){return "time_start";};ad.PUBLIC_TRANS_NONE=function(){return "none";};ad.PUBLIC_TRANS_SHORT=function(){return "short";};ad.PUBLIC_TRANS_FAST=function(){return "fast";};ad.PUBLIC_TRANS_SIMPLE=function(){return "simple";};ad.PUBLIC_TRANS=function(){return [ad.PUBLIC_TRANS_NONE(),ad.PUBLIC_TRANS_SHORT(),ad.PUBLIC_TRANS_FAST(),ad.PUBLIC_TRANS_SIMPLE()];};ad.KSF=function(){return "ksf";};ad.KSF_NETWORK=function(){return "network";};ad.KSF_SHORT=function(){return "short";};ad.KSF_FAST=function(){return "fast";};ad.KSF_FLAT=function(){return "flat";};ad.KSF_ARR=function(){return [ad.KSF_NETWORK(),ad.KSF_SHORT(),ad.KSF_FAST(),ad.KSF_FLAT()];};ad.KSF_DEFAULT=ad.KSF_NETWORK;ad.SPEED_KMH=function(){return "speed_kmh";};ad.EVENT_MAP_CLICK=function(){return "/alp/_gmap2_3/digitize/EditController/map/event/click";};ad.EVENT_MAP_CONTEXT_MENU=function(){return "/alp/_gmap2_3/digitize/EditController/event/mapContextMenu";};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.gmap.getCopyrightsFun"]){typeof dojo==="undefined"||(dojo._hasResource["alp.gmap.getCopyrightsFun"]=true);dojo.provide("alp.gmap.getCopyrightsFun");alp.gmap.getCopyrightsFun=function(_219){if(!_219){console.error("alp.gmap.getCopyrightsFun( layerlist ): wrong layerlist: ",_219);return function(){return [];};}var me=alp.gmap.getCopyrightsFun;var garr=me._garr;if((!garr)||(garr.length<1)){garr=alp.util.safeConcat.apply(this,dojo.map(["G_NORMAL_MAP","G_SATELLITE_MAP","G_HYBRID_MAP","G_PHYSICAL_MAP"],function(_21a){var _21b=dojo.global[_21a];return _21b&&_21b.getTileLayers();}));me._garr=garr;}return function(_21c,zoom){var args=arguments;var ret=[];dojo.forEach(_219,function(_21d){var s=_21d.getCopyright.apply(_21d,args);if((!s)&&(-1<dojo.indexOf(garr,_21d))){for(var b=0;(!s)&&b<garr.length;b++){var _21e=garr[b];s=_21e&&_21e.getCopyright.apply(_21e,args);}}if(s){ret.push(s);}});var a=0;while(a<ret.length){var _21f=false;for(var b=0;(!_21f)&&b<ret.length;b++){if(b===a){continue;}if(!(ret[a].copyrightTexts&&ret[b].copyrightTexts)){continue;}_21f=(b!==a)&&(-1<ret[b].copyrightTexts[0].search(ret[a].copyrightTexts[0]));}if(_21f){ret.splice(a,1);continue;}a++;}return ret;};};}if(typeof dojo==="undefined"||!dojo._hasResource["alp.data.state"]){typeof dojo==="undefined"||(dojo._hasResource["alp.data.state"]=true);dojo.provide("alp.data.state");(function(){var _220=alp.util.encQueryToObject().asynctrace;dojo.declare("alp.data.State",alp.util.Updater,{is_same:dojun.lambda("==="),init_value:undefined,init_silent:true,init_inactive:false,constrain_def:dojun.lambda("x"),constrain_undef:dojun.lambda("x"),_current:undefined,constructor:function(opts){dojo.mixin(this,opts);if(this.constrain_all){this.constrain_def=this.constrain_undef=this.constrain_all;}if(this.init_inactive){this.setUpdateActive(this.declaredClass,false);}this.set(this.init_value,this.init_silent);},bind_to:function(_221,opts){var me=this,_222=opts&&opts.do_not_copy,_223=opts&&opts.loose,_224=opts&&opts.delay_ms;if(!_222){_221.set(me.get());}if(!(_223||(_221 instanceof eval(me.declaredClass)))){throw new Error(me.declaredClass+".bind_to(): incompatible other class \""+_221.declaredClass+"\"");}return (null==_224)?me.entered_cb(me,_225):dojo.connectLimited(-Math.abs(_224),me,"entered",_225);function _225(){_221.set(me.get());};},unbind:function(_226){dojo.disconnect(_226);},constrain:function(){this.set(this.get());},is:function(_227){return this.is_same(this._current,_227);},left_cb:function(){return dojo.connect(this,"left",dojo.hitch.apply(dojo,arguments));},left_v_cb:function(_228){var _229=dojo.hitch.apply(dojo,Array.prototype.slice.call(arguments,1));return dojo.connect(this,"left",this,function(_22a,_22b){if(this.is_same(_228,_22a)){_229.call(null,_22b);}});},entered_cb:function(){return dojo.connect(this,"entered",dojo.hitch.apply(dojo,arguments));},entered_cb_init:function(){var cb=dojo.hitch.apply(dojo,arguments);cb(this.get());return dojo.connect(this,"entered",cb);},entered_v_cb:function(_22c){var _22d=dojo.hitch.apply(dojo,Array.prototype.slice.call(arguments,1));return dojo.connect(this,"entered",this,function(_22e,_22f){if(this.is_same(_22c,_22e)){_22d.call(null,_22f);}});},changed_cb:function(){return dojo.connect(this,"changed",dojo.hitch.apply(dojo,arguments));},changed_cb_init:function(){var cb=dojo.hitch.apply(dojo,arguments);cb(this.get());return dojo.connect(this,"changed",cb);},changed_v_cb:function(_230){var _231=dojo.hitch.apply(dojo,Array.prototype.slice.call(arguments,1));return dojo.connect(this,"changed",this,function(_232){if(this.is_same(_230,_232)){_231.call();}});},changed_cb_once:function(){var cb=dojo.hitch.apply(dojo,arguments),h=this.changed_cb(function(){dojo.disconnect(h);cb.apply(null,arguments);});},updateImpl:function(_233,_234){this.tell_it(_233,_234);},tell_it:function(_235,_236){var last=this._last_emitted,c=this._emitted_once&&this.is_same(last,this._current);alp.util.console(1,"log",this.declaredClass+".tell_it(",_235,"): this.is_same( this._last_emitted, this._current ): ",c,this._emitted_once,this._last_emitted,this._current);if(!c&&!_235){this._last_emitted=this._current;this._emitted_once=true;this._left(last,this._current,_236);this._entered(this._current,last,_236);}},get:function(){return this._current;},has_selection:function(){return this._current!==undefined;},unset:function(){return this.set();},set:function(_237,_238){_237=this[(_237===undefined)?"constrain_undef":"constrain_def"](_237,this._current);if(this.is_same(_237,this._current)){return false;}this._current=_237;this.update("me.set( "+_237+", "+_238+" )",_238,_220&&alp.util.callstack(this.set));return true;},left:function(_239,_23a,_23b){alp.util.console(1,"log",this.declaredClass+".left( previous_value, value ): previous_value:",_239,", value:",_23a);},entered:function(_23c,_23d,_23e){this.changed(_23c,_23e);alp.util.console(1,"log",this.declaredClass+".entered( value, previous_value ): value:",_23c,", previous_value:",_23d);},changed:function(_23f,_240){},_left:alp.util.asyncHitch("left"),_entered:alp.util.asyncHitch("entered")});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.compat.binary"]){typeof dojo==="undefined"||(dojo._hasResource["alp.compat.binary"]=true);dojo.provide("alp.compat.binary");dojo.provide("dojox.io.binary");(function(){if(alp.util.likeIE_vbasic()){var scr=dojo.doc.createElement("script");scr.type="text/vbscript";scr.text="Function dojox_io_binary__ieGetByte(binaryData, index) \n                        dojox_io_binary__ieGetByte = AscB(MidB(binaryData, index+1, 1)) \n                    End Function \n                                        Function dojox_io_binary__ieLength(binaryData) \n                        dojox_io_binary__ieLength = LenB(binaryData) \n                    End Function\n";dojo.doc.getElementsByTagName("head")[0].appendChild(scr);dojox.io.binary.BinaryObject=function(xhr){var d=xhr.responseBody;this.length=dojox_io_binary__ieLength(d);this.getByte=function(_241){return dojox_io_binary__ieGetByte(d,_241);};};}else{dojox.io.binary.BinaryObject=function(xhr){var d=xhr.responseText;this.length=d.length;this.getByte=function(_242){return d.charCodeAt(_242)&255;};};}dojo._contentHandlers.binary=function(xhr){return new dojox.io.binary.BinaryObject(xhr);};dojox.io.binary.xhrGet=function(args){dojo.mixin(args,{handleAs:"binary",headers:dojo.mixin(args.headers||{},{"Accept-Charset":"x-user-defined"})});return dojo.xhrGet(args);};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.gmap.layermask"]){typeof dojo==="undefined"||(dojo._hasResource["alp.gmap.layermask"]=true);dojo.provide("alp.gmap.layermask");(function(){alp.gmap.layermask=alp.util.cache_transform(function(_243,_244,opts){return new _245(_243,_244,opts);});alp.gmap.layermask.NONE=0;alp.gmap.layermask.TRANSPARENT=1;alp.gmap.layermask.OPAQUE=2;var _246=alp.gmap.layermask;function _245(_247,_248,opts){this._opts=opts||{};this._strict=this._opts&&this._opts.strict;if(_247==null){_247=_246.OPAQUE;}if(typeof _247==="number"){this.at=function(){return _247;};this.init_dfrd().callback(true);return this;}var url=_247;var _249=dojo.hitch(this,function(){this.init_dfrd().callback(true);});if(_248=="binary"){dojox.io.binary.xhrGet({url:url,load:dojo.hitch(this,function(data,_24a){this._maskData=new alp.gmap._BinaryMergeLayerData(data);}),handle:_249});}else{if(_248=="json"){dojo.xhrGet({url:url,handleAs:"json",load:dojo.hitch(this,function(data,_24b){this._maskData=new alp.gmap._JsonMergeLayerData(data);}),handle:_249});}else{if(_248=="jsonp"){dojo.io.script.get({url:url,callbackParamName:"callback",load:dojo.hitch(this,function(data,_24c){this._maskData=new alp.gmap._JsonMergeLayerData(data);}),handle:_249});}else{throw new Error("Unsupported mask format: "+_248);}}}};_245.prototype.is_initialized=function(){return this._maskData&&(this.init_dfrd().fired===0);};_245.prototype.init_dfrd=function(){return (this._init_dfrd=this._init_dfrd||new alp.util.SafeDeferred());};_245.prototype.init_cb=alp.util.dfrd_cb("init_dfrd");_245.prototype.at=function(x,y,z){if(!(this._maskData&&this._maskData.contains(x,y,z))){return _246.NONE;}if((!this._strict)&&this._maskData.contains(x,y,z,true)){return _246.TRANSPARENT;}return _246.OPAQUE;};})();dojo.declare("alp.gmap._AbstractMergeLayerData",null,{contains:function(x,y,z,_24d){throw new Error(this.declaredClass+".contains() not implemented (abstract class).");},_dilerocontains_dxy:[[-2,-2],[2,2],[-2,2],[2,-2],[-2,-1],[2,1],[-2,1],[2,-1],[-1,-2],[1,2],[-1,2],[1,-2],[-2,0],[2,0],[0,-2],[0,2],[-1,-1],[1,1],[-1,1],[1,-1],[-1,0],[1,0],[0,-1],[0,1],[0,0]],_dilerocontains:function(x,y,z,_24e,_24f){var a,dxy;for(a=0;a<this._dilerocontains_dxy.length;a++){dxy=this._dilerocontains_dxy[a];if(this.contains(x+dxy[0],y+dxy[1],z,_24e)===_24f){return _24f;}}return !_24f;},dilatedcontains:function(x,y,z,_250){return this._dilerocontains(x,y,z,_250,true);},erodedcontains:function(x,y,z,_251){return this._dilerocontains(x,y,z,_251,false);}});dojo.declare("alp.gmap._JsonMergeLayerData",alp.gmap._AbstractMergeLayerData,{constructor:function(_252){this._data=_252;},contains:function(x,y,z,_253){var _254,o;if(_253===false){return this.contains(x,y,z)&&(!this.contains(x,y,z,true));}if(_253===undefined){o=this._data.all;}if(_253===true){o=this._data.transp;}if(z in o){if(typeof o[z]==="number"){_254=Math.pow(2,o[z]-z);x=Math.floor(x*_254);y=Math.floor(y*_254);z=o[z];}if(y in o[z]){var row=o[z][y];var _255=row.length;for(var i=0;i<_255;i++){var c=row[i];if((c[0]<=x)&&(x<=c[1])){return true;}}}}else{if(_253===true){return this.contains(x,y,z)&&(!this.erodedcontains(x,y,z));}}return false;}});dojo.declare("alp.gmap._BinaryMergeLayerData",alp.gmap._AbstractMergeLayerData,{constructor:function(_256){var _257,c,_258,_259,i,_25a,_25b,zoom;this._data=_256;_258="\n".charCodeAt(0);_257="";for(i=0;i<this._data.length;i++){c=this._data.getByte(i);if(c===_258){_25a=i+1;break;}_257+=String.fromCharCode(c);}if(_25a===undefined){throw new Error("Could not find the end of the header.");}var _25c=eval("("+_257+")");this._nbits=_25c.nbits;this._nx=[];this._xmin=[];this._ymin=[];this._xmax=[];this._ymax=[];this._firstbyte=[];this._extra_z={};for(i=0;i<_25c.domain.length;i++){zoom=_25c.domain[i][0];if(typeof _25c.domain[i][1]==="number"){this._extra_z[zoom]=_25c.domain[i][1];}else{_25b=_25c.domain[i][1];this._xmin[zoom]=_25b[0];this._ymin[zoom]=_25b[1];this._xmax[zoom]=_25b[2];this._ymax[zoom]=_25b[3];this._nx[zoom]=_25b[2]-_25b[0]+1;this._firstbyte[zoom]=_25a;_25a+=_25c.domain[i][3];}}if(_25a!==this._data.length){throw new Error("Inconsistent binData.length  ("+this._data.length+") and nbytes ("+_25a+") !");}},_bit:function(x,y,z,_25d){var _25e,_25f,_260;_25e=2*((y-this._ymin[z])*this._nx[z]+(x-this._xmin[z]))+(_25d?1:0);_25f=Math.floor(_25e/this._nbits);_260=this._nbits-1-(_25e%this._nbits);return (0!==(this._data.getByte(this._firstbyte[z]+_25f)&(1<<_260)));},contains:function(x,y,z,_261){var a,_262;if(_261===false){return this.contains(x,y,z)&&(!this.contains(x,y,z,true));}if(z in this._extra_z){_262=Math.pow(2,this._extra_z[z]-z);x=Math.floor(x*_262);y=Math.floor(y*_262);z=this._extra_z[z];}if(!this._nx[z]){return false;}if(x<this._xmin[z]){return false;}if(x>this._xmax[z]){return false;}if(y<this._ymin[z]){return false;}if(y>this._ymax[z]){return false;}if(_261===undefined){return this._bit(x,y,z,false);}return this._bit(x,y,z,false)&&(_261!==this._bit(x,y,z,true));}});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.gmap.mixtilelayer"]){typeof dojo==="undefined"||(dojo._hasResource["alp.gmap.mixtilelayer"]=true);dojo.provide("alp.gmap.mixtilelayer");(function(f){if(typeof GMap!=="undefined"){f.apply(this);}else{dojo["require"]("alp.google");alp.gmap_asyncdfrd().addCallback(this,f);}})(function(){if(typeof GTileLayer!=="function"){return;}dojo.declare("alp.gmap.MixTileLayer",GTileLayer,{ALP_BLANK_PNG:function(){return alp.cfg.blank_png();},ALP_TILE_NONE:0,ALP_TILE_TRANSPARENT:1,ALP_TILE_OPAQUE:2,_ALP_TILE_TRANSPARENT_2:"1.1",constructor:function(_263,_264,_265,_266){var _267=this.declaredClass+".constructor()";_266=dojo.mixin({alp_mix_tile_url:alp.cfg.mix_tile_url()},_266);if(!(_266&&_266.alp_info_arr)){console.error(_267+" is missing mandatory options.alp_info_arr");return;}this._alp_options=_266;this._alp_info_arr=_266.alp_info_arr;this._alp_mix_tile_url=_266.alp_mix_tile_url;this._alp_no_heuristic=_266.alp_no_heuristic;this._alp_blank_png=this.ALP_BLANK_PNG();this._alp_glm=alp.gmap.layermask;this._alp_mask=dojo.map(this._alp_info_arr,function(info){return this._alp_glm(info.mask_url,info.mask_format);},this);this._alp_loaded=new Array(this._alp_mask.length);this._alp_n_loaded=0;dojo.forEach(this._alp_mask,function(o,ind){o.init_cb(this,function(){this._alp_loaded[ind]=true;this._alp_n_loaded++;this._alp_one_mask_loaded();if(this._alp_n_loaded===this._alp_mask.length){this.alp_init_dfrd().callback(true);this._alp_all_masks_loaded();this._alp_getTileUrl=alp.util.cache_transform(this._alp_getTileUrl,function(tile,zoom){return [tile&&tile.x,tile&&tile.y,zoom].join("_");});var _268=function(x,y,z){return [x,y,z].join("_");};this._alp_at=alp.util.cache_transform(this._alp_at,_268);this._alp_one_at=alp.util.cache_transform(this._alp_one_at,_268);}});},this);},getTileUrl:function(tile,zoom){return this._alp_getTileUrl(tile,zoom);},_alp_getTileUrl:function(tile,zoom){if((this._alp_n_loaded<1)||(zoom<this.minResolution())||(zoom>this.maxResolution())){return this._alp_blank_png;}var base=[],_269=[];for(var a=0;a<this._alp_mask.length;a++){if(!this._alp_loaded[a]){continue;}var _26a=this._alp_mask[a].at(tile.x,tile.y,zoom);if(_26a===this._alp_glm.TRANSPARENT){_269.push(a);continue;}if(_26a===this._alp_glm.OPAQUE){_269=[];base=[a];continue;}}var pile=base.concat(_269);if(pile.length<1){return this._alp_blank_png;}if(this._alp_n_loaded<this._alp_mask.length){pile=pile.slice(0,1);}if(pile.length<2){return this._alp_info_arr[pile[0]].getTileUrl(tile,zoom);}var _26b=dojo.map(pile,function(a){return this._alp_info_arr[a].mixname;},this);return this._alp_mix_tile_url(_26b,tile,zoom);},alp_are_all_masks_loaded:function(){return this.alp_is_initialized();},alp_is_initialized:function(){return (this._alp_n_loaded===this._alp_mask.length)&&(this.alp_init_dfrd().fired===0);},alp_init_dfrd:function(){return (this._alp_init_dfrd=this._alp_init_dfrd||new alp.util.SafeDeferred());},alp_init_cb:alp.util.dfrd_cb("alp_init_dfrd"),alp_info_arr:function(){return [].concat(this._alp_info_arr||[]);},alp_at:function(x,y,z){return this._alp_at(x,y,z);},_alp_at:function(x,y,z){var _26c=this._alp_one_at(x,y,z);if((_26c!==this._ALP_TILE_TRANSPARENT_2)||this._alp_no_heuristic){return _26c>>0;}var m,left,_26d,top,_26e;m=(1<<z)-1;left=Math.max(0,x-1);_26d=Math.min(m,x+1);top=Math.max(0,y-1);_26e=Math.min(m,y+1);for(var x2=left;x2<=_26d;x2++){for(var y2=top;y2<=_26e;y2++){if((x2===x)&&(y2===y)){continue;}if(this._alp_one_at(x2,y2,z)<this._ALP_TILE_TRANSPARENT_2){return this.ALP_TILE_TRANSPARENT;}}}return this.ALP_TILE_OPAQUE;},_alp_one_at:function(x,y,z){var ret=this.ALP_TILE_NONE;if((this._alp_n_loaded<1)||(z<this.minResolution())||(z>this.maxResolution())){return ret;}for(var a=0;a<this._alp_mask.length;a++){if(!this._alp_loaded[a]){continue;}switch(this._alp_mask[a].at(x,y,z)){case this._alp_glm.TRANSPARENT:if((ret<this.ALP_TILE_TRANSPARENT)||(this._alp_no_heuristic)){ret=this.ALP_TILE_TRANSPARENT;}else{if(ret<this.ALP_TILE_OPAQUE){ret=this._ALP_TILE_TRANSPARENT_2;}else{throw new Error("alp.gmap.MixTileLayer has a bug!");}}break;case this._alp_glm.OPAQUE:return this.ALP_TILE_OPAQUE;}}return ret;},alp_one_mask_loaded:function(){},alp_all_masks_loaded:function(){},_alp_one_mask_loaded:alp.util.asyncHitch("alp_one_mask_loaded"),_alp_all_masks_loaded:alp.util.asyncHitch("alp_all_masks_loaded")});dojo.declare("alp.gmap.MixLayerInfo",null,{constructor:function(_26f){dojo.mixin(this,_26f);if(!this.mixname){var arr=dojun.filter((new dojo._Url(this.getTileUrl({x:0,y:0},0))).path.split("/"),"!!");arr.pop();arr.pop();arr.pop();this.mixname=arr.join("_");}}});});}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.util"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.util"]=true);dojo.provide("alp._gmap2_3.util");(function(){var AG=alp._gmap2_3,AU=alp.util,_270=Math.PI/180,_271=180/Math.PI;AG.getNorthHeading=_272;AG.getNorthHeadingXYXY=_273;AG.latlng2xy=alp.util.mapflex("elt instanceof google.maps.LatLng","[ elt.lng(), elt.lat() ]");AG.xy2latlng=alp.util.mapflex("typeof elt[0] === 'number'","new google.maps.LatLng( elt[1], elt[0] )");function _272(xy0,xy1){if(xy0.length!==2&&"lat" in xy0&&"lng" in xy0){xy0=[AU.fun_or_not(xy0,"lng"),AU.fun_or_not(xy0,"lat")];}if(xy1.length!==2&&"lat" in xy1&&"lng" in xy1){xy1=[AU.fun_or_not(xy1,"lng"),AU.fun_or_not(xy1,"lat")];}return _273(xy0[0],xy0[1],xy1[0],xy1[1]);};function _273(x0,y0,x1,y1){var lat0=_270*y0,lng0=_270*x0,lat1=_270*y1,lng1=_270*x1,_274=lng1-lng0,_275=Math.cos(lat1),_276=_271*Math.atan2(Math.sin(_274)*_275,Math.cos(lat0)*Math.sin(lat1)-Math.sin(lat0)*_275*Math.cos(_274));while(_276>360){_276-=360;}while(_276<0){_276+=360;}return _276;};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.latlng"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.latlng"]=true);dojo.provide("alp._gmap2_3.latlng");(function(){var AG=alp._gmap2_3,gm=google.maps,_277=gm.LatLng&&gm.LatLng.prototype;var m="distanceFrom",_278=alp.util.angle_rad;_277[m]||(_277[m]=function(_279,_27a){var me=this,th1=_278(_279.lng()-me.lng()),ph0=_278(me.lat()),ph1=_278(_279.lat()),M=Math,dx=M.cos(th1)*M.cos(ph1)-M.cos(ph0),dy=M.sin(th1)*M.cos(ph1),dz=M.sin(ph1)-M.sin(ph0),d=M.sqrt(dx*dx+dy*dy+dz*dz),half=M.asin(d/2);return 2*half*(_27a||6378137);});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.overlay"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.overlay"]=true);dojo.provide("alp._gmap2_3.overlay");(function(){var AG=alp._gmap2_3,gm=google.maps,_27b=gm.Overlay&&gm.Overlay.prototype,m,_27c;AG.overlay._install=function(){if(AG.V2()&&_27b&&!_27b.setMap&&!_27b.getMap){m="setMap";_27b[m]=function(map){this.alpMapSt_().set(map);};m="getMap";_27b[m]=function(){return this.alpMapSt_().get();};_27b.alpMapSt_=function(){var me=this,ret=new alp.data.State(),_27d;me.alpMapSt_=function(){return ret;};if(me instanceof gm.Polyline){_27e=alp.util.ratelimit_fun(397,_27e);}ret.entered_cb(_27e);return me.alpMapSt_();function _27e(_27f,_280){if(_280){_280.removeOverlay(me);if(_27d){GEvent.removeListener(_27d);}_27d=null;}if(_27f){_27f.addOverlay(me);_27d=GEvent.addListener(_27f,"singlerightclick",function(_281,src,_282){if(_282===me){GEvent.trigger(me,"singlerightclick",_281,src,_282);}});}};};dojun.forIn(dojun.filterIn(gm,"v->v && v.prototype instanceof GOverlay"),function(_283,k){var _284=_283.prototype;(function(){var m="initialize",_27c=_284[m];if(_27c){_284[m]=function(map){this.alpMapSt_().set(map,true);return _27c.apply(this,arguments);};}})();(function(){var m="remove",_27c=_284[m];if(_27c){_284[m]=function(){this.alpMapSt_().set(null,true);return _27c.apply(this,arguments);};}})();});}AG.overlay._install=function(){};};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.polyline"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.polyline"]=true);dojo.provide("alp._gmap2_3.polyline");(function(){var AG=alp._gmap2_3,gm=google.maps,_285=gm.Polyline.prototype,m,_286;AG.overlay._install();m="fromEncoded";gm.Polyline[m]||(gm.Polyline[m]=function(_287){var o=AG.decodePolyline(_287);return AG.polyline_gen({path:alp._gmap2_3.xy2latlng(o.xy)});});m="getLength";_285[m]||(_285[m]=function(){return AG.pathLength(this.getPath());});AG.pathLength=_288;m="getBounds";_285[m]||(_285[m]=_289);function _289(){var p=this.getPath(),n=p.getLength(),a=p.getAt(0),b=p.getAt(1),_28a=new gm.LatLngBounds(a,b);for(var i=2,n=p.length;i<n;i++){_28a=_28a.extend(p.getAt(i));}return _28a;};m="getVertexCount";_285[m]||(_285[m]=_28b);function _28b(){return this.getPath().getLength();};AG.polyline_gen=_28c;if(AG.V2()&&_285.getVertex&&_285.getVertexCount){_285.getPath=_285.getPath||_28d;}if(AG.V2()&&_285.getVertex&&_285.deleteVertex&&_285.insertVertex){_285.setPath=_285.setPath||_28e;}AG.decodePolyline=_28f;AG.encodePolyline=_290;AG.simplify_path=_291;function _288(path){var ret=0,last;for(var a=path.length;a--;){var next=path[a];if(last){ret+=last.distanceFrom(next);}last=next;}return ret;};function _28c(opts){if(AG.V3()){return new gm.Polyline(opts);}if(AG.V2()){var ret=new gm.Polyline((opts&&opts.path)||[],opts&&opts.strokeColor,opts&&opts.strokeWeight,opts&&opts.strokeOpacity,opts),map=opts&&opts.map;if(map){ret.setMap(map);}return ret;}};function _28d(){var me=this,n=me.getVertexCount(),ret=new Array(n);while(n--){ret[n]=me.getVertex(n);}ret.getLength=function(){return ret.length;};ret.getAt=function(a){return ret[a];};return ret;};function _28e(path){var me=this,n=me.getVertexCount(),p=path.length,a,v;for(a=0;a<p;a++){v=path[a];if(a>=n){me.insertVertex(a,v);}else{if(!v.equals(me.getVertex(a))){me.insertVertex(a,v);me.deleteVertex(a+1);}}}for(a=p;a<n;a++){me.deleteVertex(p);}};function _28f(_292){var _293=false,_294="alp.gmap.decodePolyline";dojo.forEach(["levels","points"],function(s){if(_292[s]==null){console.error(_294+"( encPolyline ): missing field \""+s+"\" for encPolyline: ",_292);_293=true;}});if(_293){return [];}var _295=function(s){return s?s.length:0;},np=_295(_292.levels),xy=new Array(np),_296=new Array(np),ret={xy:xy,levels:_296,zoomFactor:_292.zoomFactor,numLevels:_292.numLevels};if(!(np>0)){return ret;}for(var s=_292.points,c=_295(s),f=0,g=0,h=0,k=0;f<c;++k){var n=1,p=0,q;do{q=s.charCodeAt(f++)-63-1;n+=q<<p;p+=5;}while(q>=31);g+=n&1?~(n>>1):n>>1;n=1;p=0;do{q=s.charCodeAt(f++)-63-1;n+=q<<p;p+=5;}while(q>=31);h+=n&1?~(n>>1):n>>1;xy[k]=[h*0.00001,g*0.00001];}for(var s=_292.levels,f=0;f<np;++f){_296[f]=s.charCodeAt(f)-63;}return ret;};function _290(o){var xy=o.xy,_297=o.levels,ret=alp.at(o,["zoomFactor","numLevels"]),last=[0,0],np=xy.length,_298=new Array(12*np);for(var i=0,k=0;i<np;i++){var one=xy[i],_299=[one[0]-last[0],one[1]-last[1]];for(var j=2;j--;){var v=Math.round(_299[j]*100000),v2=v<0?~(v<<1):v<<1;while(v2>=32){_298[k++]=63+(32|v2&31);v2>>=5;}_298[k++]=63+(v2&31);}last=one;}_298.length=k;ret.points=alp.util.str.fromCharCode(_298);if(!_297){ret.levels=alp.util.str.repli("B",np);}else{var _29a=new Array(np);for(var i=np;i--;){_29a[i]=63+_297[i];}ret.levels=alp.util.str.fromCharCode(_29a);}var s="zoomFactor";if(ret[s]==null){ret[s]=4;}s="numLevels";if(ret[s]==null){ret[s]=9;}return ret;};function _291(a,_29b,_29c){if(a instanceof gm.Polyline){a=a.getPath();}return AG.xy2latlng(alp.util.simplifyGeom(AG.latlng2xy(a),_29b,_29c));};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.gmap.polyline"]){typeof dojo==="undefined"||(dojo._hasResource["alp.gmap.polyline"]=true);dojo.provide("alp.gmap.polyline");(function(f){if(typeof GMap!=="undefined"){f.apply(this);}else{dojo["require"]("alp.google");alp.gmap_asyncdfrd().addCallback(this,f);}})(function(){dojo.forEach(["pathLength","decodePolyline","polyline_gen","simplify_path"],function(_29d){alp.gmap[_29d]=alp._gmap2_3[_29d];});});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.gmap._util"]){typeof dojo==="undefined"||(dojo._hasResource["alp.gmap._util"]=true);dojo.provide("alp.gmap._util");(function(f){if(typeof GMap!=="undefined"){f.apply(this);}else{dojo["require"]("alp.google");alp.gmap_asyncdfrd().addCallback(this,f);}})(function(){var AG=alp._gmap2_3,AU=alp.util;if(typeof G_API_VERSION!=="undefined"){alp.gmap.refresh=function(gmap){alp.util.conlog("alp.gmap.refresh(gmap) starts on gmap:",gmap);var c=gmap.getCenter();gmap.setCenter(new GLatLng(c.lat()+1e-9,c.lng()+1e-9));alp.util.conlog("alp.gmap.refresh(gmap) done with gmap:",gmap);};alp.gmap.xy2latlng=AG.xy2latlng;alp.gmap.latlng2xy=AG.latlng2xy;if(typeof GMapType!=="undefined"){alp.gmap.equalGMapTypes=function(mt1,mt2){if(!(mt1&&mt1.getName&&mt1.getUrlArg)){return false;}if(!(mt2&&mt2.getName&&mt2.getUrlArg)){return false;}return (mt1.getName()===mt2.getName())&&(mt1.getUrlArg()===mt2.getUrlArg());};alp.gmap.mapTypeIndex=function(gmap,mt){if(mt===undefined){return alp.gmap.mapTypeIndex(gmap,gmap.getCurrentMapType()||true);}return dojo.indexOf(gmap.getMapTypes(),mt);};alp.gmap.setMapType=function(gmap,_29e){_29e=AU.fun_or_not(_29e);var mt;if(/^\d+$/.test(_29e)||typeof _29e==="number"){mt=gmap.getMapTypes()[~~_29e];}else{var name=_29e&&_29e.toLowerCase&&_29e.toLowerCase(),mt=alp.gmap.getMapType(gmap.getMapTypes(),_29e);}if(mt&&mt!==gmap.getCurrentMapType()){gmap.setMapType(mt);}return mt||false;};alp.gmap.getMapType=function(_29f,_2a0){_2a0=AU.fun_or_not(_2a0);var name=_2a0&&_2a0.toLowerCase&&_2a0.toLowerCase();var ret=alp.util.or(_29f,function(mt,_2a1){if((_2a1===_2a0)||(mt.getName().toLowerCase()===name)||alp.gmap.equalGMapTypes(mt,_2a0)){return mt;}return false;});if(ret){return ret;}var aus=alp.util.str,best=null,arr=dojo.map(_29f,function(mt,_2a2){var _2a3=mt.getName().toLowerCase(),o={mt:mt,index:_2a2,edis:Math.min(aus.edit_distance_levenshtein(name,_2a3),aus.edit_distance_levenshtein(_2a3,name),-1<name.indexOf(_2a3)?1:+Infinity,-1<_2a3.indexOf(name)?1:+Infinity)};if(!best||o.edis<best.edis){best=o;}return o;});if(best){return best.mt;}return false;};alp.gmap.setGMapTypes=function(gmap,_2a4){var _2a5=gmap.getMapTypes(),mt;if(!alp.util.equal_array(_2a4,_2a5)){while((mt=_2a5.pop())){gmap.removeMapType(mt);}dojo.forEach(_2a4,dojo.hitch(gmap,"addMapType"));}};}if(typeof GProjection!=="undefined"){alp.gmap.equalGProjection=function(_2a6,_2a7){if(!(_2a6&&_2a7)){return false;}var _2a8=new GLatLng(47.12345,10.25645);var zoom=10;try{var _2a9=_2a6.fromLatLngToPixel(_2a8,zoom);var _2aa=_2a7.fromLatLngToPixel(_2a8,zoom);if(!_2a9.equals(_2aa)){return false;}if(!_2a6.fromPixelToLatLng(_2a9,zoom).equals(_2a7.fromPixelToLatLng(_2a9,zoom))){return false;}if(_2a6.getWrapWidth(zoom)!=_2a7.getWrapWidth(zoom)){return false;}return true;}catch(e){console.error("alp.gmap.equalGProjection(",_2a6,",",_2a7,"): caught e:",e);return false;}};}dojo.mixin(dojo.getObject("alp.gmap.gtilelayer",true),{g_hybrid:function(){var mt=dojo.global.G_HYBRID_MAP;var arr=mt&&mt.getTileLayers();var tl=arr&&(arr.length>0)&&arr[arr.length-1];return tl;},g_normal:function(){var mt=dojo.global.G_NORMAL_MAP;var arr=mt&&mt.getTileLayers();var tl=arr&&(arr.length>0)&&arr[0];return tl;},g_physical:function(){var mt=dojo.global.G_PHYSICAL_MAP;var arr=mt&&mt.getTileLayers();var tl=arr&&(arr.length>0)&&arr[0];return tl;},g_satellite:function(){var mt=dojo.global.G_SATELLITE_MAP;var arr=mt&&mt.getTileLayers();var tl=arr&&(arr.length>0)&&arr[0];return tl;}});if(typeof GIcon!=="undefined"){alp.gmap.icons=(function(){var _2ab,_2ac,n,p,_2ad,_2ae,icon;_2ac=10;function _2af(n){return alp.util.absUrlString("alp.gmap.resources","images/bubble_"+(n+1));};function url(n){return _2af(n)+".gif";};function _2b0(n){return _2af(n)+"_transp.png";};_2ad=[[24,24],[30,30],[40,40],[54,54],[65,65]];_2ae=[];for(n=0;n<_2ad.length;n++){icon=new GIcon(G_DEFAULT_ICON);icon.image=url(n);icon.shadow="";icon.iconSize=new GSize(_2ad[n][0],_2ad[n][1]);icon.iconAnchor=new GPoint(Math.ceil(_2ad[n][0]/2),Math.ceil(_2ad[n][1]/2));icon.imageMap=[];for(p=0;p<_2ac;p++){_2ab=2*Math.PI*p/_2ac;icon.imageMap.push(_2ad[n][0]*(1+Math.cos(_2ab)));icon.imageMap.push(_2ad[n][1]*(1+Math.sin(_2ab)));}icon.transparent=_2b0(n);var _2b1=new GSize(-icon.iconAnchor.x,-icon.iconAnchor.y);_2ae.push({icon:icon,labelOffset:_2b1});}var _2b2=alp.util.cache_transform(function(n,_2b3,_2b4,size){var o=alp.cfg.ooi_a_1_icon.apply(alp.cfg,arguments),icon=new GIcon(G_DEFAULT_ICON);icon.image=o.url;icon.shadow=o.shadow_url;icon.iconSize=new GSize(o.xy[0],o.xy[1]);icon.iconAnchor=new GPoint(o.anchor_xy[0],o.anchor_xy[1]);icon.shadowSize=new GSize(o.shadow_xy[0],o.shadow_xy[1]);icon.transparent=o.transp_url;icon.imageMap=o.im;return icon;});return {clusterMarkers:_2ae,ooi_a_1_gen:_2b2};})();}alp.gmap.isInfoWindowNode=function(o){return o&&alp.util.and(["disableMaximize","enableMaximize","getContentContainers","getPixelOffset","getPoint","getSelectedTab","getTabs","maximize","selectTab","show"],function(s){return typeof o[s]==="function";});};(function(){alp.gmap.Button=function(html,_2b5,_2b6,_2b7){this._alpHtml=html;this._alpOnclick=_2b5;this._alpContainerDivClass=_2b6||"alpBContainer";this._alpButtonDivClass=_2b7||"alpButton";};alp.gmap.Button.prototype=new GControl();alp.gmap.Button.prototype.initialize=function(map){var _2b8=document.createElement("div");var _2b9=document.createElement("div");this.setButtonStyle_(_2b9);if(this._alpOnclick){GEvent.addDomListener(_2b9,"click",this._alpOnclick);}_2b8.appendChild(_2b9);_2b9.innerHTML=this._alpHtml;map.getContainer().appendChild(_2b8);alp.util.setClass(_2b8,this._alpContainerDivClass,true);alp.util.setClass(_2b9,this._alpButtonDivClass,true);this._alpContainerNode=_2b8;this._alpButtonNode=_2b9;return _2b8;};alp.gmap.Button.prototype.getDefaultPosition=function(){return new GControlPosition(G_ANCHOR_TOP_LEFT,new GSize(7,7));};alp.gmap.Button.prototype.setButtonStyle_=function(_2ba){_2ba.style.textDecoration="underline";_2ba.style.color="#0000cc";_2ba.style.backgroundColor="white";_2ba.style.font="small Arial";_2ba.style.border="1px solid black";_2ba.style.padding="2px";_2ba.style.marginBottom="3px";_2ba.style.textAlign="center";_2ba.style.width="6em";_2ba.style.cursor="pointer";};})();}});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.gmap.mixmaptype"]){typeof dojo==="undefined"||(dojo._hasResource["alp.gmap.mixmaptype"]=true);dojo.provide("alp.gmap.mixmaptype");(function(f){if(typeof GMap!=="undefined"){f.apply(this);}else{dojo["require"]("alp.google");alp.gmap_asyncdfrd().addCallback(this,f);}})(function(){if(typeof GMapType!=="function"){return;}dojo.declare("alp.gmap.MixMapType",GMapType,{ALP_BLANK_PNG:function(){return alp.cfg.blank_png();},constructor:function(_2bb,_2bc,name,opts){this._alp_layers=_2bb;this._alp_blank_png=this.ALP_BLANK_PNG();this._alp_gmap=new alp.data.State({init_inactive:true});var _2bd=dojun.map(_2bb,"x->x instanceof alp.gmap.MixTileLayer");if(!alp.util.or(_2bd)){return;}for(var a=0;a<_2bb.length;a++){var _2be=_2bb[a];if(_2bd[a]){dojo.connectLimited(-567,this,"alp_gmap_should_refresh",this,function(){alp.util.conlog(this.declaredClass+" tries to refresh the GMap2...");var gmap=this._alp_gmap.isUpdateActive()&&this._alp_gmap.get();if(gmap){alp.gmap.refresh(gmap);}else{this._alp_gmap.entered_cb(function(gmap){if(gmap){alp.gmap.refresh(gmap);}});}});_2be.alp_init_cb(this,"_alp_gmap_should_refresh");dojo.connect(_2be,"alp_one_mask_loaded",this,"_alp_gmap_should_refresh");continue;}if(!_2bd[a+1]){continue;}var _2bf=dojo.hitch(_2be,_2be.getTileUrl);_2be.getTileUrl=(function(next,self){return function(tile,zoom){for(var c=next;c<_2bb.length;c++){if(!_2bd[c]){continue;}var _2c0=_2bb[c];if(!_2c0.alp_is_initialized()){return self._alp_blank_png;}if(_2c0.alp_at(tile.x,tile.y,zoom)===_2c0.ALP_TILE_OPAQUE){return _2c0.getTileUrl(tile,zoom);}}return _2bf(tile,zoom);};})(a+1,this);}},alp_set_gmap:function(gmap){var _2c1=this.declaredClass+".alp_set_gmap()";alp.util.conlog(_2c1,"gmap:",gmap);this._alp_gmap.setUpdateActive(_2c1,!!gmap);this._alp_gmap.set(gmap);this._alp_gmap_should_refresh();},alp_refresh:function(){this._alp_gmap_should_refresh();},alp_gmap_should_refresh:function(){},_alp_gmap_should_refresh:alp.util.asyncHitch("alp_gmap_should_refresh")});});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.cfg"]){typeof dojo==="undefined"||(dojo._hasResource["alp.cfg"]=true);dojo.provide("alp.cfg");alp.installLocalization("alp","cfg");(function(){var _2c2,_2c3,_2c4={},_2c5=window.location.protocol;dojo.mixin(alp.cfg,{app:function(){var _2c6=dojo.getObject("alpregioConfig.proj"),_2c7=dojo.getObject("oa_v2")&&"outdooractive",_2c8=dojo.getObject("alpcms")&&"alpcms",api=dojo.getObject("alp.gmap.api")&&"alp.gmap.api",api3=dojo.getObject("alp.gmap3.api")&&"alp.gmap3.api";return (_2c6&&("alpregio."+_2c6))||_2c7||_2c8||api||api3||"other";},blank_png:function(){var ret=dojo.moduleUrl("alp.gmap","resources/images/blank.png").toString();return (alp.cfg.blank_png=function(){return ret;})();},button:function(){return {manual_off:{url:alp.util.absUrlString("alp._gmap2_3.digitize.resources","images/manual_off_42.png"),width:42,height:42},manual_on:{url:alp.util.absUrlString("alp._gmap2_3.digitize.resources","images/manual_on_42.png"),width:42,height:42},powered_by_oa:{url:alp.util.absUrlString("alp","images/powered_by_oa.png"),width:145,height:31,style:"border: none 0px transparent",alt:"Powered by outdooractive.com",title:"Powered by outdooractive.com",href:_2c5+"//www.outdooractive.com",target:"_blank"},routed_off:{url:alp.util.absUrlString("alp._gmap2_3.digitize.resources","images/routed_auto_off_42.png"),width:42,height:42},routed_on:{url:alp.util.absUrlString("alp._gmap2_3.digitize.resources","images/routed_auto_on_42.png"),width:42,height:42},segment_network_off:{url:alp.util.absUrlString("alp","images/mg_segment_property_215px_off.png"),width:215,height:27,text:null},segment_network_on:{url:alp.util.absUrlString("alp","images/mg_segment_property_215px_on.png"),width:215,height:27,text:null},segment_fast_off:{url:alp.util.absUrlString("alp","images/mg_segment_property_off.png"),width:65,height:27,text:function(){return alp.cfg.i18n.segmentPropertyFast;}},segment_fast_on:{url:alp.util.absUrlString("alp","images/mg_segment_property_on.png"),width:65,height:27,text:function(){return alp.cfg.i18n.segmentPropertyFast;}},segment_flat_off:{url:alp.util.absUrlString("alp","images/mg_segment_property_off.png"),width:65,height:27,text:function(){return alp.cfg.i18n.segmentPropertyFlat;}},segment_flat_on:{url:alp.util.absUrlString("alp","images/mg_segment_property_on.png"),width:65,height:27,text:function(){return alp.cfg.i18n.segmentPropertyFlat;}},segment_short_off:{url:alp.util.absUrlString("alp","images/mg_segment_property_off.png"),width:65,height:27,text:function(){return alp.cfg.i18n.segmentPropertyShort;}},segment_short_on:{url:alp.util.absUrlString("alp","images/mg_segment_property_on.png"),width:65,height:27,text:function(){return alp.cfg.i18n.segmentPropertyShort;}}};},cluster_markers:function(_2c9){var n,o,p,_2ca,_2cb,size,_2cc;function _2cd(n){return alp.util.absUrlString("alp.gmap.resources","images/bubble_"+(n+1)+(_2c9?("_"+_2c9):""));};function _2ce(n){return _2cd(n)+".gif";};_2ca=[[24,24],[30,30],[40,40],[54,54],[65,65]];n=_2ca.length;_2cb=new Array(n);while(n--){size=_2ca[n];_2cc=dojun.map(size,">>1");_2cb[n]=alp.cfg._ooi_normalize_xy({url:_2ce(n),xy:size,anchor_xy:_2cc,shape:{type:"circle",coords:_2cc.concat(_2cc[0])}});_2cb[n].label_offset_y=0;}return _2cb;},css:{map_iw:function(){var _2cf="div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td".split(","),f=function(s){return dojun.map(_2cf,"\""+s+" \"+").join(",");},_2d0=[f(".result-snippet"),f(".js-cv-iw")].join(",");return _2d0+"{margin:0;padding:0;border:0;outline:0;vertical-align:baseline;background:transparent}"+".result-snippet .icon { left: 0px; top: 0px; margin: 0px; position : absolute; }"+".js-cv-iw .icon .icon { left: 0px; top: 0px; margin: 0px; position : absolute; }"+".result-snippet .fl { float: left }"+".js-cv-iw .fl { float: left }"+".col {display:inline; float:left; margin-right:14px;}"+".s4 {color: #666666; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; line-height: 14px}"+".s5 {color:#666666; font-family:Arial,Helvetica,sans-serif; font-size:11px; font-weight:bold; line-height:14px;}"+".s6 {color:#666666; font-family:Arial,Helvetica,sans-serif; font-size:11px; font-weight:normal; line-height:14px;}"+".snippet, #snippet { overflow: hidden; cursor:pointer; }"+".snippet.highlight, #snippet.highlight { background-color: #acbe00; }"+".snippet img, #snippet img {display: block}"+".snippet .imageplace, #snippet .imageplace {height: 80px; width: 80px}"+".snippet .memberimageplace, #snippet .memberimageplace {height: 95px; width: 80px}"+".snippet .col, #snippet .col {position: relative}"+".snippet .col.nopadding, #snippet .col.nopadding {margin:0px !important}"+".snippet .icon, #snippet .icon {position: absolute; top: 0px; left: 0px; z-index:1; margin:0px !important}"+".snippet .text, #snippet .text {float:left; display: inline; margin: 0 0 0 16px; width: 208px}"+".snippet .titlelink, .snippet .morelink, #snippet .titlelink, #snippet .morelink {color: #666666;}"+".snippet .titlelink, #snippet .titlelink {text-decoration: none}"+".snippet.highlight .titlelink, .snippet.highlight .morelink, #snippet.highlight .titlelink, #snippet.highlight .morelink {color: #333333;}"+".snippet .title, #snippet .title {height: 27px; margin: 0px; margin-bottom: 2px; overflow: hidden}"+""+"#smallsnippet {position: relative; height:55px; width:55px}"+".iw-line {border-top:1px solid #ACACAC; margin:4px 0; width: 310px}"+""+".snippet .quick, #snippet .quick {margin: 0px !important}"+".snippet .quick .arrow-up, #snippet .quick .arrow-up { border: 0; float: left; height:3px; margin: 5px 4px 3px 4px; overflow: hidden; width:5px; }"+".snippet .quick .arrow-down, #snippet .quick .arrow-down {border: 0; float: left; height:3px; margin: 6px 4px 2px 4px; overflow: hidden; width:5px; }"+".snippet.highlight .quick .arrow-up, #snippet.highlight .quick .arrow-up {background: url(\""+_2c5+"//www.outdooractive.com/res/s_de_misc.png?@ts@\") no-repeat scroll 0 -807px; border: 0; float: left; height:3px; margin: 5px 4px 3px 4px; overflow: hidden; width:5px; }"+".snippet.highlight .quick .arrow-down, #snippet.highlight .quick .arrow-down {background: url(\""+_2c5+"://www.outdooractive.com/res/s_de_misc.png?@ts@\") no-repeat scroll 0 -815px; border: 0; float: left; height:3px; margin: 6px 4px 2px 4px; overflow: hidden; width:5px; }"+".snippet .quick img, #snippet .quick img {display: inline !important}"+".snippet.highlight .s5, .snippet.highlight .s6, #snippet.highlight .s5, #snippet.highlight .s6 {color: #333333}"+".snippet .rating, #content .snippet .rating, #snippet .rating, #content #snippet .rating {background: url(\""+_2c5+"://www.outdooractive.com/res/s_de_misc.png?@ts@\") no-repeat scroll 0 -15px; cursor: pointer; float:left; height: 10px; margin-left: 5px; margin-top: 2px; width: 55px; overflow: hidden}"+".snippet.highlight .rating, #content .snippet.highlight .rating, #snippet.highlight .rating, #content #snippet.highlight .rating {background: url(\""+_2c5+"://www.outdooractive.com/res/s_de_misc.png?@ts@\") no-repeat scroll 1px -15px; cursor: pointer; float:left; height: 10px; margin-left: 5px; margin-top: 2px; width: 55px; overflow: hidden}"+".snippet .shorttext, #snippet .shorttext {width: 208px}"+".snippet .shorttext.marg, #snippet .shorttext.marg {margin-top:10px}"+".snippet .ratingline, #snippet .ratingline {padding-top:8px}"+".addressbox {height:45px; width:140px; float:left; padding: 2px 4px; border: 1px solid #D9D9D9}"+".detaillink {float:right; margin-top:37px}"+".telefone-icon {float:left; padding:6px 3px 0 0}"+".telefone-nr {float:left; padding-top:3px}"+".quicktourdesc-clusteriw { cursor: pointer; margin-bottom: 5px}"+".clusteriw-tours-snippet {height: auto !important; background-color: #ffffff !important; cursor: pointer; margin-bottom : 5px; }"+".clusteriw-pois-snippet {height: auto !important; background-color: #ffffff !important; margin-bottom : 5px; }"+".clusteriw-pois-snippet .text{height: 49px; width:238px;}"+".clusteriw-pois-snippet .title{margin-bottom:5px !important; height:14px !important}"+".clusteriw-tours-snippet .text {width:213px}";},table_select:function(){return ".js-table-cont { background-color:white; } "+".js-row-selected { background-color:lightblue; } "+".js-table-cont .js-table-row img { vertical-align : sub; margin-top : 2px ; } ";}},datatype:function(){var _2d1=function(){return alp.cfg.i18n["datatype_"+this.name];};var ret=_2d2();dojun.forIn(ret,function(v,k){if(!/^_/.test(k)){v.name=k;v.title=function(){return alp.cfg.i18n["datatype_"+k];};}});return ret;function _2d2(){return {_default:"hikingTourTrail",_keys:function(){return dojun.filter(dojun.keys(this),function(s){return !/^_/.test(s);});},alpineTour:{iconUrl:_2c5+"//www.outdooractive.com/res/small/alpineTour.png",id:"12510",default_network:"hiking",speed_kmh:{min:2,max:6},travelMode:"WALKING"},canyoning:{iconUrl:_2c5+"//www.outdooractive.com/res/small/canyoning.png",id:"12280",default_network:"hiking",speed_kmh:{min:2,max:4},travelMode:"WALKING"},carriageRideTour:{iconUrl:_2c5+"//www.outdooractive.com/res/small/carriageRideTour.png",id:"12370",default_network:"hiking",speed_kmh:{min:3,max:9},travelMode:"DRIVING"},cityTrail:{iconUrl:_2c5+"//www.outdooractive.com/res/small/cityTrail.png",id:"12220",default_network:"hiking",speed_kmh:{min:2,max:6},travelMode:"WALKING"},cycling:{iconUrl:"http://res.oastatic.com/icons/alpstein/cycling/crimson/cycling.standard.png",id:"12030",default_network:"cycling",speed_kmh:{min:5,max:25},travelMode:"BICYCLING"},hikingTourTrail:{iconUrl:"http://res.oastatic.com/icons/alpstein/hikingTourTrail/green_chili/hikingTourTrail.standard.png",id:"12000",default_network:"hiking",speed_kmh:{min:2,max:6},travelMode:"WALKING"},horsebackRidingTour:{iconUrl:_2c5+"//www.outdooractive.com/res/small/horsebackRidingTour.png",id:"12360",default_network:"hiking",speed_kmh:{min:3,max:7},travelMode:"WALKING"},inlineSkating:{iconUrl:_2c5+"//www.outdooractive.com/res/small/inlineSkating.png",id:"12080",default_network:"hiking",speed_kmh:{min:5,max:15},travelMode:"WALKING"},kayak:{iconUrl:_2c5+"//www.outdooractive.com/res/small/kayak.png",id:"12290",default_network:"hiking",speed_kmh:{min:4,max:10},travelMode:"WALKING"},longDistanceCyclingTrack:{iconUrl:"http://res.oastatic.com/icons/alpstein/longDistanceCyclingTrack/maroon/longDistanceCyclingTrack.standard.png",id:"13550",default_network:"longDistanceCycling",speed_kmh:{min:5,max:25},travelMode:"BICYCLING"},longDistanceHikingTrail:{iconUrl:"http://res.oastatic.com/icons/alpstein/longDistanceHikingTrail/olive/longDistanceHikingTrail.standard.png",id:"12400",default_network:"longDistanceHiking",speed_kmh:{min:2,max:6},travelMode:"WALKING"},mountainbiking:{iconUrl:_2c5+"//www.outdooractive.com/res/small/mountainbiking.png",id:"12060",default_network:"cycling",speed_kmh:{min:6,max:18},travelMode:"WALKING"},mountaineering:{iconUrl:_2c5+"//www.outdooractive.com/res/small/mountaineering.png",id:"12050",default_network:"hiking",speed_kmh:{min:2,max:5},travelMode:"WALKING"},nordicwalkingTrail:{iconUrl:_2c5+"//www.outdooractive.com/res/small/nordicwalkingTrail.png",id:"13000",default_network:"hiking",speed_kmh:{min:3,max:7},travelMode:"WALKING"},pilgrimTrack:{iconUrl:_2c5+"//www.outdooractive.com/res/small/pilgrimTrack.png",id:"12410",default_network:"hiking",speed_kmh:{min:2,max:6},travelMode:"WALKING"},racingBike:{iconUrl:_2c5+"//www.outdooractive.com/res/small/racingBike.png",id:"12070",default_network:"cycling",speed_kmh:{min:10,max:30},travelMode:"BICYCLING"},running:{iconUrl:_2c5+"//www.outdooractive.com/res/small/running.png",id:"12150",default_network:"hiking",speed_kmh:{min:4,max:10},travelMode:"WALKING"},skiFreeride:{iconUrl:_2c5+"//www.outdooractive.com/res/small/skiFreeride.png",id:"12040",default_network:"hiking",speed_kmh:{min:2,max:6},travelMode:"WALKING"},skijoering:{iconUrl:_2c5+"//www.outdooractive.com/res/small/skijoering.png",id:"12390",default_network:"hiking",speed_kmh:{min:3,max:7},travelMode:"WALKING"},skitour:{iconUrl:_2c5+"//www.outdooractive.com/res/small/skitour.png",id:"12010",default_network:"hiking",speed_kmh:{min:2,max:6},travelMode:"WALKING"},skitrailCrosscountry:{iconUrl:_2c5+"//www.outdooractive.com/res/small/skitrailCrosscountry.png",id:"5610",default_network:"hiking",speed_kmh:{min:3,max:7},travelMode:"WALKING"},sledging:{iconUrl:_2c5+"//www.outdooractive.com/res/small/sledging.png",id:"12090",default_network:"hiking",speed_kmh:{min:2,max:6},travelMode:"WALKING"},sleigh:{iconUrl:_2c5+"//www.outdooractive.com/res/icons/alpstein/sleigh/maroon/sleigh.standard.png",id:"5083",default_network:"hiking",speed_kmh:{min:2,max:10},travelMode:"WALKING"},snowshoehiking:{iconUrl:_2c5+"//www.outdooractive.com/res/small/snowshoehiking.png",id:"12100",default_network:"hiking",speed_kmh:{min:2,max:6},travelMode:"WALKING"},themeTrail:{iconUrl:_2c5+"//www.outdooractive.com/res/small/themeTrail.png",id:"12200",default_network:"hiking",speed_kmh:{min:2,max:6},travelMode:"WALKING"},trailRunning:{iconUrl:_2c5+"//www.outdooractive.com/res/small/trailRunning.png",id:"12320",default_network:"hiking",speed_kmh:{min:4,max:10},travelMode:"WALKING"},transalpMountainbiking:{iconUrl:"http://res.oastatic.com/icons/alpstein/transalpMountainbiking/maroon/transalpMountainbiking.standard.png",id:"12020",default_network:"transalpMountainbiking",speed_kmh:{min:7,max:15},travelMode:"WALKING"},viaferrata:{iconUrl:_2c5+"//www.outdooractive.com/res/small/viaferrata.png",id:"12120",default_network:"hiking",speed_kmh:{min:1,max:5},travelMode:"WALKING"},waterHiking:{iconUrl:_2c5+"//www.outdooractive.com/res/small/waterHiking.png",id:"12300",default_network:"hiking",speed_kmh:{min:4,max:10},travelMode:"WALKING"},winterHiking:{iconUrl:_2c5+"//www.outdooractive.com/res/small/winterHiking.png",id:"12130",default_network:"hiking",speed_kmh:{min:2,max:6},travelMode:"WALKING"}};};},domains:function(){return [0,1,2,3];},ga_trackers:function(){return ["_gaq","pageTracker","rollupTracker"];},geocode_location_image:function(){var ret=[alp.util.absUrlString("alp.gmap.resources","images/geocode_location.png"),{width:19,height:32}];ret.url=ret[0];ret.size=ret[1];return ret;},geocode_location_shadow_image:function(){var ret=[alp.util.absUrlString("alp.gmap.resources","images/geocode_location.shadow.png"),{width:37,height:34}];ret.url=ret[0];ret.size=ret[1];return ret;},glayer_v2:function(){return {panoramio:"com.panoramio.all",webcam:"com.google.webcams",wikipedia:"org.wikipedia.de"};},image:function(){return {loadbar:{url:alp.util.absUrlString("alp.images","loadbar.gif"),width:128,height:15}};},iw_tmpl:function(){var ret={"ooi":"<div class=\"js-iw-snippet manual-ooi-cluster-iw-snippet js-cv-iw\">"+"__data.title__"+"<input type=\"hidden\" name=\"id-value\" value=\"__data.id__\">"+"</div><div class=\"clear\" style=\"clear : both;\"></div>"};ret.tour="<div class=\"js-iw-snippet js-iw-tour snippet\" style=\"overflow-y:auto; overflow-x: hidden; min-height: 90px; max-height: 150px; width: 330px; position: relative\">"+" <div class=\"js-cv-iw\">"+"  <input type=\"hidden\" name=\"id-value\" value=\"__data.id__\">"+"  <div class=\"col nopadding imageplace\">"+"    __(function () { var i = data.primaryImage[%27id%27]; return ( i && '<img style=\"height:80px; width:80px;\" src=\""+_2c5+"//www.outdooractive.com/img/t?i=' + i + '&w=80&h=80&fit=true\">') || ''; })()__"+"  </div>"+"    <div class=\"text\">"+"      <div class='shorttext s6'>__(data.category && data.category['name']) ||''__</div>"+"      <h3 class=\"s5\">"+"        <span class='title-value'>__data.title ||''__</span>"+"      </h3>"+"      <div class=\"quick s6\">"+"        <div class=\"fl\">__((data.length || 0) / 1000).toFixed(1)__ km | __alp.util.hmm((data.time && data.time.min) || 0)__ h |</div>"+"        <div class=\"arrow-up\"></div> <div class=\"fl\">__(data.elevation && data.elevation.ascent) || 0__ m |</div>"+"        <div class=\"arrow-down\"></div> <div class=\"fl\">__(data.elevation && data.elevation.descent) || 0__ m</div>"+"        <div class=\"clear\"></div>"+"\t   </div>"+"      <div class=\"clear\"></div>"+"    </div>"+"  </div>"+" </div>"+"<div class=\"clear nopadding\"></div>"+"</div>";ret.poi="<div class=\"js-iw-snippet js-iw-tour snippet\" style=\"overflow-y:auto; overflow-x: hidden; min-height: 90px; max-height: 150px; width: 330px; position: relative\">"+" <div class=\"js-cv-iw\">"+"  <input type=\"hidden\" name=\"id-value\" value=\"__data.id__\">"+"  <div class=\"col nopadding imageplace\">"+"    __(function () { var i = data.primaryImage[%27id%27]; return ( i && '<img style=\"height:80px; width:80px;\" src=\""+_2c5+"//www.outdooractive.com/img/t?i=' + i + '&w=80&h=80&fit=true\">') || ''; })()__"+"  </div>"+"  <div class=\"text\">"+"    <div class=\"title\">"+"      <h3 class=\"s5\"><span class=\"title-value\">__data.title ||\"\"__</span></h3>"+"    </div>"+"    <div class=\"addressbox s6\">"+"      __data.address['street'] ||''__ __data.address['housenumber'] ||''__<br />"+"      __data.address['zipcode'] ||''__ __data.address['town'] ||''__<br />"+"      __(function () { var p = data.phone; return (p && '<div class=\"telefone-icon\"><img alt=\"Telefon\" title=\"Telefon\" src=\""+_2c5+"//www.outdooractive.com/res/telefon.png\"/></div><span class=\"telefone-nr\">' + p + '</span>') || '';})()__"+"    </div>"+"  </div>"+"  <div class=\"clear\"></div>"+" </div>"+"</div>"+"<div class=\"clear nopadding\"></div>";return ret;},linref:function(){return {attributes:{availableKeys:[{id:"waytype",values:[{id:"0",color:"#909090"},{id:"1",color:"#000000"},{id:"2",color:"#00ff00"},{id:"3",color:"#ff0000"},{id:"4",color:"#0000ff"},{id:"5",color:"#ff7f00"},{id:"6",color:"#ffec01"}]}],newAttributes:false,newValues:false},profileNode:"attributeProfile"};},loading_css:function(){return [[".js-alp-x-loading",["background-color: white","border: 1px solid black","padding: 4px","z-index: 9999","-moz-box-shadow: 3px 3px 8px #333","-webkit-box-shadow: 3px 3px 8px #333","box-shadow: 3px 3px 8px #333"]]];},locale:function(){return dojo.locale||"de";},marker:{arrow:function(_2d3,_2d4){if(typeof _2d3==="object"){var _2d5=_2d3[0],_2d6=_2d3[1];return alp.cfg.marker.arrow(Math.atan2(_2d6.lat()-_2d5.lat(),_2d6.lng()-_2d5.lng()),_2d4);}_2d3=(5*Math.round((360+(Math.PI/2-_2d3)*(180/Math.PI))/5))%360;while(_2d3<0){_2d3+=360;}while(_2d3>=360){_2d3-=360;}return alp.cfg._ooi_normalize_xy({url:alp.util.absUrlString("alp._gmap2_3.digitize.resources","images/arrows/"+(_2d4?_2d4+"/":""))+dojo.string.pad(_2d3,3,"0")+".png",xy:[35,35],anchor_xy:[17,17]});},caticon:function(){return {width:21,height:24,anchor_x:6,anchor_y:23};},caticon_shadow:function(){return {url:"http://www.alpserver.de/icons/1.3/Standard/gshadow.png",width:31,height:24,anchor_x:6,anchor_y:23};},digitize_ghost:function(){return alp.cfg._ooi_normalize_xy({url:alp.util.absUrlString("alp._gmap2_3.digitize.resources","images/ghost-node.png"),xy:[9,9],anchor_xy:[5,5],shape:{type:"rect",coords:[0,0,8,8]}});},digitize_node:function(){return alp.cfg._ooi_normalize_xy({url:alp.util.absUrlString("alp._gmap2_3.digitize.resources","images/node.png"),xy:[23,23],anchor_xy:[11,11],shape:{type:"circle",coords:[11,11,11]}});},digitize_node_highlight:function(){return alp.cfg._ooi_normalize_xy({url:alp.util.absUrlString("alp._gmap2_3.digitize.resources","images/node-highlight.png"),xy:[23,23],anchor_xy:[11,11],shape:{type:"circle",coords:[11,11,11]}});},digitize_node_sel:function(){return alp.cfg._ooi_normalize_xy({url:alp.util.absUrlString("alp._gmap2_3.digitize.resources","images/node-sel.png"),xy:[21,21],anchor_xy:[10,10],shape:{type:"rect",coords:[0,0,20,20]}});},digitize_node_start:function(){return alp.cfg._ooi_normalize_xy({url:alp.util.absUrlString("alp._gmap2_3.digitize.resources","images/node-start.png"),xy:[15,15],anchor_xy:[7,7],shape:{type:"rect",coords:[0,0,14,14]}});},digitize_node_transparent:function(){return alp.cfg._ooi_normalize_xy({url:alp.util.absUrlString("alp._gmap2_3.digitize.resources","images/node-transparent.png"),xy:[9,9],anchor_xy:[5,5],shape:{type:"rect",coords:[0,0,8,8]}});},digitize_node_waypoint:function(){return alp.cfg._ooi_normalize_xy({url:alp.util.absUrlString("alp._gmap2_3.digitize.resources","images/node-waypoint.png"),xy:[21,21],anchor_xy:[10,10],shape:{type:"rect",coords:[0,0,20,20]}});},digitize_node_waypoint_sel:function(){return alp.cfg._ooi_normalize_xy({url:alp.util.absUrlString("alp._gmap2_3.digitize.resources","images/node-waypoint-sel.png"),xy:[21,21],anchor_xy:[10,10],shape:{type:"rect",coords:[0,0,20,20]}});},digitize_start:function(){return alp.cfg._ooi_normalize_xy({url:alp.util.absUrlString("alp._gmap2_3.digitize.resources","images/node-start.png"),xy:[15,15],anchor_xy:[7,7],shape:{type:"poly",coords:[2,2,12,2,12,12,2,12,2,2]}});},poi2tour_cat:function(){return alp.cfg._ooi_normalize_xy({xy:[21,24],anchor_xy:[5,24],shadow_url:alp.util.absUrlString("alp","images/poi2tour_cat_shadow.png"),shadow_xy:[31,24]});}},mix_tile_url:function(){var urls=dojo.map(alp.cfg.domains(),function(n){return _2c5+"//s"+n+".outdooractive.com/_mix";});var ext=".png";return function(arr,tile,zoom){var _2d7=zoom+"/"+tile.x+"/"+tile.y;var p=alp.util.knuthGolden(_2d7);return [urls[(p*urls.length)>>0],arr.join("."),_2d7+ext].join("/");};},ooi:function(){return {altmax:{from:"[name=\"altitude_max-value\"],[class=\"altitude_max-value\"]",what:"value"},altmin:{from:"[name=\"altitude_min-value\"],[class=\"altitude_min-value\"]",what:"value"},ascent:{from:"[name=\"logicalAscent-value\"],[class=\"logicalAscent-value\"]",what:"value"},condition:{from:"[name=\"condition-value\"],[class=\"condition-value\"]",what:"value"},datatypeid:{from:"[name=\"datatypeid-value\"],[class=\"datatypeid-value\"]",what:"value"},datatypename:{from:"[name=\"datatypename-value\"],[class=\"datatypename-value\"]",what:"value"},datatypetitle:{from:"[name=\"datatypetitle-value\"],[class=\"datatypetitle-value\"]",what:"value"},descent:{from:"[name=\"logicalDescent-value\"],[class=\"logicalDescent-value\"]",what:"value"},difficulty:{from:"[name=\"abstractDifficulty-value\"],[class=\"abstractDifficulty-value\"]",what:"value"},duration:{from:"[name=\"minTime-value\"],[class=\"minTime-value\"]",what:"value"},experience:{from:"[name=\"qualityOfExperience-value\"],[class=\"qualityOfExperience-value\"]",what:"value"},externalId:{from:"[name=\"externalId-value\"],[class=\"externalId-value\"]",what:"value"},externalSystem:{from:"[name=\"externalSystem-value\"],[class=\"externalSystem-value\"]",what:"value"},geojson:{from:"[name=\"geojson-value\"],[class=\"geojson-value\"]",what:"value"},geometry:{from:"[name=\"geometry-value\"],[class=\"geometry-value\"]",what:"value"},geometry_simplified:{from:"[name=\"geometry-simplified-value\"],[class=\"geometry-simplified-value\"]",what:"value"},id:{from:"[name=\"id-value\"],[class=\"id-value\"]",what:"value"},landscape:{from:"[name=\"landscape-value\"],[class=\"landscape-value\"]",what:"value"},length_km:{from:"[name=\"tourLength-km-value\"],[class=\"tourLength-km-value\"]",what:"value"},length_m:{from:"[name=\"tourLength-m-value\"],[class=\"tourLength-m-value\"]",what:"value"},maintype:{from:"[name=\"maintype-value\"],[class=\"maintype-value\"]",what:"value"},morelink:{from:".morelink-value a",what:"href"},technique:{from:"[name=\"technique-value\"],[class=\"technique-value\"]",what:"value"},title:{from:"[name=\"title-value\"],[class=\"title-value\"]",what:"value"}};},overlay_map_type_entries:function(_2d8){var _2d9=alp.cfg.datatype(),_2da=alp.util.str2arr(_2d8||_2d9._keys()),_2db={};dojo.forEach(_2da,function(_2dc){_2db[_2d9[_2dc].default_network]=1;});var gto=alp.cfg.gtilelayeroverlay,_2dd=dojun.filter(dojun.map(dojun.keys(_2db),function(n){var ov=gto[n];if(ov){return {name:n,ov:ov};}}),"!!");return dojo.map(_2dd,function(x){return {name:x.name,title:function(){return alp.cfg.i18n[x.name];},ov:alp.util.fun_or_not(x.ov)};});},_ooi_normalize_xy:function(o){if(o.size){o.xy=o.xy||o.size;}if(o.anchor){o.anchor_xy=o.anchor_xy||o.anchor;}if("xy" in o&&"anchor_xy" in o&&!("anchor_fraction" in o)){o.anchor_fraction=[o.anchor_xy[0]/o.xy[0],o.anchor_xy[1]/o.xy[1]];}dojo.forEach(["xy","anchor_xy","anchor_fraction","shadow_xy","size","anchor"],function(s){if(s in o){var q=o[s];q.x=q.width=q[0];q.y=q.height=q[1];}});if(o.im&&!o.shape){o.shape={coords:o.im,type:"poly"};}return o;},ooi_a_1_icon:function(n,_2de,_2df,size){_2df=(_2df||"green_chili").toLowerCase();size=(size||"big").toLowerCase();n=n%(_2de?99:26);var _2e0=(size==="big"),_2e1=(size==="round"),text=_2de?dojo.string.pad(""+(n+1),2,"0"):String.fromCharCode(n+("a".charCodeAt(0))),o={color:_2df,is_big:_2e0,size:(size==="round")?size:("map_"+size),text:text};o.xy=_2e0?[50,76]:(_2e1?[22,22]:[34,52]);o.anchor_xy=[(o.xy[0]>>1),_2e1?(o.xy[1]>>1):(o.xy[1]-1)];o.shadow_xy=_2e0?[84,76]:[58,52];if(_2e1){o.shape={type:"circle",coords:o.anchor_xy.concat(3+o.anchor_xy[0])};}alp.cfg._ooi_normalize_xy(o);o.url=dojo.string.substitute(alp.util.absUrlString("alp.gmap.resources","images/ooi_a_1_marker/${color}/img_${size}_${text}.png"),o);if(!_2e1){o.shadow_url=dojo.string.substitute(alp.util.absUrlString("alp.gmap.resources","images/ooi_a_1_marker.shadow.${size}.png"),o);}o.transp_url=dojo.string.substitute(alp.util.absUrlString("alp.gmap.resources","images/ooi_a_1_marker.transp.${size}.png"),o);if(!_2e1){var im=[o.anchor_xy[0]-4,o.anchor_xy[1]+4,o.anchor_xy[0]+4,o.anchor_xy[1]+4],_2e2=-0.5*Math.PI+0.3217505543966422,_2e3=1.5*Math.PI-0.3217505543966422,c=25,r=24,_2e4=10,a,_2e5;for(a=0;a<1+_2e4;a++){_2e5=_2e2+(_2e3-_2e2)*a/_2e4;im.push(Math.round(c+r*Math.cos(_2e5)));im.push(Math.round(c-r*Math.sin(_2e5)));}o.im=im;}return o;},ooi_single_default:function(){var ret={url:alp.util.absUrlStringJsBase("alp/gmap/resources/images/ooi_default.png"),xy:[21,24],anchor_xy:[5,23]};alp.cfg._ooi_normalize_xy(ret);return ret;},publictransport:function(){var ret=_2e6(),_2e7=alp.util.str.key_find_gen(ret,{excluded:"_find"});ret._find=_2e8;return ret;function _2e8(name){var key=name;while(1){key=_2e7(key);var x=ret[key];if(typeof x!=="string"){return key;}if(!x||x==key){console.error("alp.cfg.publictransport is buggy, name:",name,", key:",key,", x:",x);return key;}key=x;}};function _2e6(){return {"bus":{img:alp.util.absUrlString("alp/images","public_transport_bus.png"),img_title:"Bus",img_width:20,img_height:20,strokeColor:"#8a1b64"},"none":function(_2e9){var o=alp.cfg.datatype()[_2e9],_2ea=o&&o.default_network,s=_2ea&&_2ea.toLowerCase();if(!s){return;}if(-1<s.indexOf("hiking")){return {img:alp.util.absUrlString("alp/images","public_transport_none_hiking.png"),img_title:o.title(),img_width:22,img_height:22};}if(-1<s.indexOf("cycling")){return {img:alp.util.absUrlString("alp/images","public_transport_none_cycling.png"),img_title:o.title(),img_width:22,img_height:22};}},"regionalbahn":{img:alp.util.absUrlString("alp/images","public_transport_regionalbahn.png"),img_title:"Zug/Bahn",img_width:20,img_height:20,strokeColor:"#404040"},"regionalbus":"bus","s-bahn":{img:alp.util.absUrlString("alp/images","public_transport_s-bahn.png"),img_title:"S-Bahn",img_width:20,img_height:20,strokeColor:"#5da82c"},"schiff":{img:alp.util.absUrlString("alp/images","public_transport_schiff.png"),img_title:"Schiff",img_width:20,img_height:20,strokeColor:"#00738b"},"seilbahn":{img:alp.util.absUrlString("alp/images","public_transport_seilbahn.png"),img_title:"Seilbahn",img_width:20,img_height:20,strokeColor:"#303030"},"stadtbahn":"u-bahn","stadtbus":"bus","tram":{img:alp.util.absUrlString("alp/images","public_transport_tram.png"),img_title:"Tram",img_width:20,img_height:20,strokeColor:"#c10000"},"u-bahn":{img:alp.util.absUrlString("alp/images","public_transport_u-bahn.png"),img_title:"U-Bahn",img_width:20,img_height:20,strokeColor:"#009de2"}};};},publictransport_travel_mode_2_alpstein:function(){var ret=_2eb();_2ec(ret);_2ed(ret);_2ee(ret);return ret;function _2eb(){return [{id:"none","default":true,travel_mode:["","ALPSTEIN","ALPSTEIN_ROUTING","WALKING"]},{id:"mentz_pt_underground",iconid:"u-bahn",travel_mode:["MENTZ_PT_UNDERGROUND"]},{id:"mentz_pt_commutertrain",iconid:"s-bahn",travel_mode:["MENTZ_PT_COMMUTERTRAIN"]},{id:"mentz_pt_bus",iconid:"bus",travel_mode:["MENTZ_PT_BUS"]},{id:"mentz_pt_tram",iconid:"tram",travel_mode:["MENTZ_PT_TRAM"]},{id:"mentz_pt_lowplatformbus",iconid:"bus",travel_mode:["MENTZ_PT_LOWPLATFORMBUS"]},{id:"mentz_pt_train",iconid:"regionalbahn",travel_mode:["MENTZ_PT_TRAIN"]},{id:"mentz_pt_suspensionrailway",iconid:"regionalbahn",travel_mode:["MENTZ_PT_SUSPENSIONRAILWAY"]},{id:"mentz_pt_line_demandbus",iconid:"bus",travel_mode:["MENTZ_PT_LINE_DEMANDBUS"]},{id:"mentz_pt_cablerailway",iconid:"seilbahn",travel_mode:["MENTZ_PT_CABLERAILWAY"]},{id:"mentz_pt_ship",iconid:"schiff",travel_mode:["MENTZ_PT_SHIP"]},{id:"mentz_pt_rackrailway",iconid:null,travel_mode:["MENTZ_PT_RACKRAILWAY"]},{id:"mentz_pt_haengeseilbahn",iconid:"seilbahn",travel_mode:["MENTZ_PT_HAENGESEILBAHN"]},{id:"mentz_pt_museumrailway",iconid:null,travel_mode:["MENTZ_PT_MUSEUMRAILWAY"]},{id:"mentz_pt_plane",iconid:null,travel_mode:["MENTZ_PT_PLANE"]},{id:"mentz_pt_vienna_s_bahn",iconid:"s-bahn",travel_mode:["MENTZ_PT_VIENNA_S_BAHN"]},{id:"mentz_pt_area_demandbus",iconid:"bus",travel_mode:["MENTZ_PT_AREA_DEMANDBUS"]},{id:"mentz_pt_check_inout",iconid:null,travel_mode:["MENTZ_PT_CHECK_INOUT"]},{id:"mentz_pt_systemchange",iconid:null,travel_mode:["MENTZ_PT_SYSTEMCHANGE"]},{id:"mentz_pt_throughconnect",iconid:null,travel_mode:["MENTZ_PT_THROUGHCONNECT"]},{id:"mentz_pt_assuredconnect",iconid:null,travel_mode:["MENTZ_PT_ASSUREDCONNECT"]},{id:"mentz_pt_footpath",iconid:null,travel_mode:["MENTZ_PT_FOOTPATH"]},{id:"mentz_it_walk",iconid:null,travel_mode:["MENTZ_IT_WALK"]},{id:"mentz_it_park_bike",iconid:null,travel_mode:["MENTZ_IT_PARK_BIKE"]},{id:"mentz_it_carry_bike",iconid:null,travel_mode:["MENTZ_IT_CARRY_BIKE"]},{id:"mentz_it_kiss_ride",iconid:null,travel_mode:["MENTZ_IT_KISS_RIDE"]},{id:"mentz_it_park_ride",iconid:null,travel_mode:["MENTZ_IT_PARK_RIDE"]},{id:"mentz_it_taxi",iconid:null,travel_mode:["MENTZ_IT_TAXI"]},{id:"mentz_it_car",iconid:null,travel_mode:["MENTZ_IT_CAR"]},{id:"mentz_it_bike",iconid:null,travel_mode:["MENTZ_IT_BIKE"]}];};function _2ec(ret){var _2ef={};dojo.forEach(ret,function(b,ind){_2ef[b.id]=ind;});ret._id_2_index=function(id){return _2ef[id];};};function _2ed(ret){ret._id_2_obj=function(id){var _2f0=ret._id_2_index(id);return ret[_2f0];};};function _2ee(ret){var _2f1={};dojo.forEach(ret,function(b){dojo.forEach(b.travel_mode,function(tm){_2f1[tm]=b.id;});});ret._travel_mode_2_travel_mode=alp.util.str.key_find_gen(_2f1);ret._travel_mode_2_id=function(_2f2){var key=ret._travel_mode_2_travel_mode(_2f2);return _2f1[key];};};},routing:function(){var _2f3=function(){return alp.cfg.i18n[this.name];},_2f4=function(info){var o=dojo.getObject("alp.cfg.i18n.routing_start");var name=this.name||(info&&info.networkName);return (o&&o[name])||"";},_2f5=function(info){var o=dojo.getObject("alp.cfg.gtilelayeroverlay");var name=this.name||(info&&info.networkName);return o&&o[name]&&o[name]();},_2f6=function(_2f7){var _2f8=_2f7+"&itdDate=${localDateTime.fullYear}${localDateTime.month_1}${localDateTime.date}&itdTime=${localDateTime.hours}${localDateTime.minutes}";var _2f9="&bikeTakeAlong=${bikeTakeAlong}&includedMeans=${includedMeans}&inclMOT_0=${inclMOT_0}&inclMOT_1=${inclMOT_1}";return function(obj){return dojo.string.substitute(_2f8,obj,function(n){return dojo.string.pad(n+"",2,"0");})+dojo.string.substitute(_2f9,obj);};},_2fa=function(f){var _2fb=(typeof f==="function");return _2fc;function _2fc(){return (_2fb?f.apply(null,arguments):f)+"&app="+alp.cfg.app();};},ret=_2fd();ret._defaultName=dojo.filter(ret,function(a){return a.isDefault;})[0].name;ret._find=function(name){for(var a=ret.length;a--;){if(ret[a].name===name){return ret[a];}}if(name!==ret._defaultName){return ret._find(ret._defaultName);}};_2fe();return ret;function _2fe(){var obj={};dojo.forEach(ret,function(o){obj[o.name]=o;});ret._find_approx=alp.util.str.key_find_gen(obj);};function _2fd(){return [{name:"hiking",title:_2f3,url:_2fa(_2c5+"//routing.outdooractive.com/routingengine/getroute?costff=%28sport-preset%20hikingTourTrail%29&format=js"),engineClass:"alp.routing.DirectionsService",isDefault:true,startMessage:_2f4,tilelayeroverlay:_2f5,publictransport:{url:_2fa(_2f6(_2c5+"//routing.outdooractive.com/routingengine/mixed?costff=%28sport-preset%20hikingTourTrail%29&format=js")),engineClass:"alp.routing.DirectionsService"}},{name:"signpostedHiking",title:_2f3,url:_2fa(_2c5+"//routing.outdooractive.com/routingengine/getroute?costff=%28sport-preset%20hikingTourTrail%29&format=js"),engineClass:"alp.routing.DirectionsService",startMessage:_2f4,tilelayeroverlay:_2f5,publictransport:{url:_2fa(_2f6(_2c5+"//routing.outdooractive.com/routingengine/mixed?costff=%28sport-preset%20hikingTourTrail%29&format=js")),engineClass:"alp.routing.DirectionsService"}},{name:"longDistanceHiking",title:_2f3,url:_2fa(_2c5+"//routing.outdooractive.com/routingengine/getroute?costff=%28sport-preset%20longDistanceHikingTrail%29&format=js"),engineClass:"alp.routing.DirectionsService",startMessage:_2f4,tilelayeroverlay:_2f5,publictransport:{url:_2fa(_2f6(_2c5+"//routing.outdooractive.com/routingengine/mixed?costff=%28sport-preset%20longDistanceHikingTrail%29&format=js")),engineClass:"alp.routing.DirectionsService"}},{name:"cycling",title:_2f3,url:_2fa(_2c5+"//routing.outdooractive.com/routingengine/getroute?costff=%28sport-preset%20cycling%29&format=js"),engineClass:"alp.routing.DirectionsService",startMessage:_2f4,tilelayeroverlay:_2f5,publictransport:{url:_2fa(_2f6(_2c5+"//routing.outdooractive.com/routingengine/mixed?costff=%28sport-preset%20cycling%29&format=js")),engineClass:"alp.routing.DirectionsService"}},{name:"longDistanceCycling",title:_2f3,url:_2fa(_2c5+"//routing.outdooractive.com/routingengine/getroute?costff=%28sport-preset%20longDistanceCyclingTrack%29&format=js"),engineClass:"alp.routing.DirectionsService",startMessage:_2f4,tilelayeroverlay:_2f5,publictransport:{url:_2fa(_2f6(_2c5+"//routing.outdooractive.com/routingengine/mixed?costff=%28sport-preset%20longDistanceCyclingTrack%29&format=js")),engineClass:"alp.routing.DirectionsService"}},{name:"transalpMountainbiking",title:_2f3,url:_2fa(_2c5+"//routing.outdooractive.com/routingengine/getroute?costff=%28sport-preset%20transalpMountainbiking%29&format=js"),engineClass:"alp.routing.DirectionsService",startMessage:_2f4,tilelayeroverlay:_2f5,publictransport:{url:_2fa(_2f6(_2c5+"//routing.outdooractive.com/routingengine/mixed?costff=%28sport-preset%20transalpMountainbiking%29&format=js")),engineClass:"alp.routing.DirectionsService"}},{name:"google",title:_2f3,engineClass:alp._gmap2_3.V3()?"google.maps.DirectionsService":"GDirections",startMessage:_2f4,tilelayeroverlay:_2f5}];};},routingengine:function(){var _2ff=-1<dojo.indexOf((alp.util.encQueryToObject().proto||"").split(","),"unstable"),_300=function(){return alp.cfg.i18n["engine_"+this.name];},_301=function(_302){return alp.at(dojo.getObject("alp.cfg.i18n.routing_start"),"engine_"+(_302||this.name))||"Routing...";},_303=alp.cfg.datatype(),_304=function(_305,obj){var _306=_305+"?costff=%28sport-preset%20${datatype_name}%20${ksf_name}%20${speed_kmh}%29&format=js";_306+="&fromsnap="+"%28preset%20${fromsnap_t}%20${fromsnap_datatype_name}%29";_306+="&tosnap="+"%28preset%20${tosnap_t}%20${tosnap_datatype_name}%29";var _307=obj.has_public_transport?"&itdDate=${localDateTime.fullYear}${localDateTime.month_1}${localDateTime.date}&itdTime=${localDateTime.hours}${localDateTime.minutes}":"";var _308=obj.has_public_transport?"&bikeTakeAlong=${bikeTakeAlong}&includedMeans=${includedMeans}&inclMOT_0=${inclMOT_0}&inclMOT_1=${inclMOT_1}":"";return dojo.string.substitute(_306,obj)+dojo.string.substitute(_307,obj,function(n){return dojo.string.pad(n+"",2,"0");})+dojo.string.substitute(_308,obj);},ret=_309(),_30a=alp.cfg.routing();ret._defaultName=dojo.filter(ret,function(a){return a.isDefault;})[0].name;ret._obj={};ret._ind={};dojo.forEach(ret,function(o,ind){ret._obj[o.name]=o;ret._ind[o.name]=ind;});return ret;function _309(){return [{name:"outdooractive",isDefault:true,title:_300,startMessage:_301,routing_cfg:function(o){var _30b=o.datatype_name,ret={},_30c=o.has_public_transport&&o.public_transport&&(o.public_transport!==alp._gmap2_3.digitize.PUBLIC_TRANS_NONE());var _30d=_2c5+"//routing"+(_2ff?"testing":"")+".outdooractive.com/routingengine/"+(_30c?"mixed":"getroute");ret.url=_30e(_304(_30d,o));ret.engineClass="alp.routing.DirectionsService";return ret;},gtilelayeroverlay_name:function(o){return alp.at(_303[o.datatype_name],"default_network");}},{name:"google",title:_300,startMessage:_301,routing_cfg:{engineClass:alp._gmap2_3.V3()?"google.maps.DirectionsService":"GDirections",travelMode:function(o){return alp.at(_303[o.datatype_name],"travelMode")||"WALKING";}}}];};function _30e(url){return url+"&app="+alp.cfg.app();};},routingengine_status:function(){return _2c3=_2c3||_30f();function _30f(){var rfs=alp.cfg.routing_frontend_status(),ret={ERROR:rfs.UNKNOWN_ERROR,ALPSTEIN_OUT_OF_NETWORK:rfs.OUT_OF_NETWORK,INVALID_REQUEST:rfs.INVALID_REQUEST,MAX_WAYPOINTS_EXCEEDED:rfs.MAX_WAYPOINTS_EXCEEDED,NOT_FOUND:rfs.NOT_FOUND,OK:rfs.OK,OVER_QUERY_LIMIT:rfs.OVER_QUERY_LIMIT,REQUEST_DENIED:rfs.REQUEST_DENIED,UNKNOWN_ERROR:rfs.UNKNOWN_ERROR,ZERO_RESULTS:rfs.ZERO_RESULTS};dojun.forIn(ret,_310);if(Object.freeze){Object.freeze(ret);}return ret;function _310(v,k){if(!v){throw new Error("alp.cfg.routingengine_status(): found a configuration bug! Unknown `routing_frontend_status` constant "+"for `routingengine_status` constant: \""+k+"\"");}};};},routing_frontend_status:function(){return _2c2=_2c2||_311();function _311(){var obj={},arr=["INVALID_REQUEST","MAX_WAYPOINTS_EXCEEDED","NOT_FOUND","OK","OUT_OF_NETWORK","OVER_QUERY_LIMIT","REQUEST_DENIED","UNKNOWN_ERROR","ZERO_RESULTS"];for(var a=arr.length;a--;){var key=arr[a],_312=new Function("return "+key+"; function "+key+"() { return alp.cfg.i18n.routing_frontend_status_"+key+"; }");obj[key]=_312();if(Object.freeze){Object.freeze(obj[key]);}}if(Object.freeze){Object.freeze(obj);}return obj;};},sportminmax:function(){return {"":{len:{min:0,max:50000},asc:{min:0,max:2000},tim:{min:0,max:10*60}},"hikingTourTrail":{len:{min:0,max:30*1000},asc:{min:0,max:1500},tim:{min:0,max:10*60}},"longDistanceHikingTrail":{len:{min:0,max:500*1000},asc:{min:0,max:5000},tim:{min:0,max:100*60}},"pilgrimTrack":{len:{min:0,max:500*1000},asc:{min:0,max:5000},tim:{min:0,max:100*60}},"themeTrail":{len:{min:0,max:10*1000},asc:{min:0,max:500},tim:{min:0,max:10*60}},"cityTrail":{len:{min:0,max:20*1000},asc:{min:0,max:500},tim:{min:0,max:10*60}},"cycling":{len:{min:0,max:150*1000},asc:{min:0,max:1000},tim:{min:0,max:10*60}},"mountainbiking":{len:{min:0,max:150*1000},asc:{min:0,max:2000},tim:{min:0,max:10*60}},"transalpMountainbiking":{len:{min:0,max:800*1000},asc:{min:0,max:12000},tim:{min:0,max:100*60}},"racingBike":{len:{min:0,max:150*1000},asc:{min:0,max:1000},tim:{min:0,max:10*60}},"canyoning":{len:{min:0,max:10*1000},asc:{min:0,max:500},tim:{min:0,max:10*60}},"waterHiking":{len:{min:0,max:50*1000},asc:{min:0,max:500},tim:{min:0,max:10*60}},"nordicwalkingTrail":{len:{min:0,max:30*1000},asc:{min:0,max:500},tim:{min:0,max:10*60}},"running":{len:{min:0,max:30*1000},asc:{min:0,max:500},tim:{min:0,max:10*60}},"trailRunning":{len:{min:0,max:60*1000},asc:{min:0,max:1000},tim:{min:0,max:10*60}},"inlineSkating":{len:{min:0,max:50*1000},asc:{min:0,max:300},tim:{min:0,max:10*60}},"carriageRideTour":{len:{min:0,max:20*1000},asc:{min:0,max:100},tim:{min:0,max:10*60}},"horsebackRidingTour":{len:{min:0,max:50*1000},asc:{min:0,max:500},tim:{min:0,max:10*60}},"viaferrata":{len:{min:0,max:30*1000},asc:{min:0,max:2000},tim:{min:0,max:10*60}},"mountaineering":{len:{min:0,max:30*1000},asc:{min:0,max:2000},tim:{min:0,max:10*60}},"alpineTour":{len:{min:0,max:30*1000},asc:{min:0,max:2000},tim:{min:0,max:10*60}},"winterHiking":{len:{min:0,max:30*1000},asc:{min:0,max:2000},tim:{min:0,max:10*60}},"sledging":{len:{min:0,max:30*1000},asc:{min:0,max:500},tim:{min:0,max:10*60}},"skitour":{len:{min:0,max:30*1000},asc:{min:0,max:2000},tim:{min:0,max:10*60}},"snowshoehiking":{len:{min:0,max:30*1000},asc:{min:0,max:2000},tim:{min:0,max:10*60}},"skitrailCrosscountry":{len:{min:0,max:30*1000},asc:{min:0,max:500},tim:{min:0,max:10*60}},"skiFreeride":{len:{min:0,max:20*1000},asc:{min:0,max:2000},tim:{min:0,max:10*60}}};},sportminmax_group:function(_313,_314){_313=(typeof _313==="string")?_313.split(","):_313;_314=_314||alp.cfg.sportminmax;var ret={};dojo.forEach(_313,function(name){var o=_314[name];if(!o){return;}for(var k in o){if(o.hasOwnProperty(k)){if(!ret[k]){ret[k]=o[k];continue;}ret[k].min=Math.min(ret[k].min,o[k].min);ret[k].max=Math.max(ret[k].max,o[k].max);}}});return ret;},url:{abstract_marker_layer_config:function(){return (alp.util.dev()?(alp.util.dev_testing()?"http://testing.outdooractive.com/${locale}/clusterConfig.json?proj=${proj}&type=${type}&v2=${v2}":(alp.util.dev_approval()?"http://approval.outdooractive.com/${locale}/clusterConfig.json?proj=${proj}&type=${type}&v2=${v2}":(alp.util.dev_proto()?"http://127.0.0.1:8080/cgi-bin/clusterConfig.json?proj=${proj}&type=${type}":"http://localhost/${locale}/clusterConfig.json?proj=${proj}&type=${type}&v2=${v2}"))):"http://www.outdooractive.com/${locale}/clusterConfig.json?proj=${proj}&type=${type}&v2=${v2}");},api_autodomain:function(_315){if(_315.charAt(0)!=="/"){_315="/"+_315;}return alp.util.dev()?(alp.util.dev_approval()?("http://approval.outdooractive.com"+_315):(alp.util.dev_testing()?("http://testing.outdooractive.com"+_315):("127.0.0.1:not:implemented:yet"+_315))):(alp.cfg.url.api_auto_live_proto_host()+_315);},api_auto_live_proto_host:function(){var loc=window.location,_316,host;if(-1<dojo.lastIndexOf(["www.adac-skiguide.de","www.outdooractive.com"],loc.host)){_316=loc.protocol;host=loc.host;}else{_316="http:";host="www.outdooractive.com";}return _316+"//"+host;},api_cat:function(){return alp.cfg.url.api_autodomain("/api/project/${project}/category/tree/${type}?defaultCategory=true");},api_cat_xd:function(){return alp.cfg.url.api_cat().replace("tree/${type}","tree/${type}/jsonp");},api_geocode:function(){return alp.cfg.url.api_autodomain("/api/geocode/${type}?q=${q}&project=${project}&limit=${limit}");},api_geocode_xd:function(){return alp.cfg.url.api_geocode().replace("/geocode/${type}?","/geocode/${type}/jsonp?");},api_mentz_departure:function(){return alp.cfg.url.api_autodomain("/api/proxy/mentz/departure/${id}?cachebust=${cachebust}");},api_mentz_departure_xd:function(){return alp.cfg.url.api_autodomain("/api/proxy/mentz/departure/jsonp/${id}?cachebust=${cachebust}");},api_nextbike_info:function(){return alp.cfg.url.api_autodomain("/api/proxy/nextbike/info/${id}?cachebust=${cachebust}");},api_nextbike_info_xd:function(){return alp.cfg.url.api_autodomain("/api/proxy/nextbike/info/jsonp/${id}?cachebust=${cachebust}");},api_callabike_info:function(){return alp.cfg.url.api_autodomain("/api/proxy/callabike/info/${id}?cachebust=${cachebust}");},api_callabike_info_xd:function(){return alp.cfg.url.api_autodomain("/api/proxy/callabike/info/jsonp/${id}?cachebust=${cachebust}");},api_oois:function(){return alp.cfg.url.api_autodomain("/api/oois/${idlist}?project=${proj}&display=external");},api_oois_xd:function(){return alp.cfg.url.api_oois().replace("/oois/","/oois/jsonp/");},api_search:function(){return alp.cfg.url.api_autodomain("/api/search?q=${q}&project=${proj}");},api_search_xd:function(){return alp.cfg.url.api_search().replace("/search?","/search/jsonp?");},cluster_layer_base:function(){return (alp.util.dev()?(alp.util.dev_testing()?"http://testing.outdooractive.com/${locale}/":(alp.util.dev_approval()?"http://approval.outdooractive.com/${locale}/":(alp.util.dev_proto()?"http://127.0.0.1:8080/cgi-bin/":"http://localhost/${locale}/"))):"http://www.outdooractive.com/${locale}/");},cluster_layer_cl:function(){return "cl.json?proj=${proj}&lev=${lev}&z=${z}&x=${x}&y=${y}";},img_default_domain:function(){return alp.util.dev()?(alp.util.dev_approval()?"http://approval.outdooractive.com":"http://testing.outdooractive.com"):"http://www.outdooractive.com";}}});(function(f){if(typeof GMap!=="undefined"){f.apply(this);}else{dojo["require"]("alp.google");alp.gmap_asyncdfrd().addCallback(this,f);}})(function(){var _317;dojo.mixin(alp.cfg,{alpConfig:{digitize:{arrow_base_url:function(){return alp.util.absUrlString("alp._gmap2_3.digitize.resources","images/arrows/red/");},linref:function(){var _318=dojo.getObject("alpConfig.digitize.linref");return _318&&_318.attributes&&_318.profileNode&&_318;},routing_user_message_fun:function(_319,info,ret){var msg,_31a;if(_319==="start"){_31a=dojo.getObject("alp._obj.networkName");msg=_31a&&(msg=dojo.getObject("alp.cfg.i18n.routing_start"))&&msg[_31a];return msg||"Routing...";}return;}},map:{fullCtrlHtml:function(){return "<div id=\"agfsLogo\"><input id=\"agfsPanoCheckbox\" type=\"checkbox\" style=\"vertical-align:middle\" class=\"agfsCheckbox\">"+"<label for=\"agfsPanoCheckbox\" class=\"agfsCBLabel\">Bilder</label></input>"+" &nbsp;&nbsp;&nbsp;"+"<input id=\"agfsWikiCheckbox\" type=\"checkbox\" style=\"vertical-align:middle\" class=\"agfsCheckbox\">"+"<label for=\"agfsWikiCheckbox\" class=\"agfsCBLabel\">Wikipedia</label></input>"+" &nbsp;&nbsp;&nbsp;"+"<span id='agSmallSwitch' class='agfsSwitch'>Karte verkleinern</span>"+"</div>";},iconOptions:{shadow:function(){return "http://www.alpserver.de/icons/1.3/Standard/gshadow.png";}}}},data:{type_id:{isAmongStr:function(_31b,arr){if(typeof _31b!=="string"){console.error("alp.cfg.data.type_id.isAmongStr(): type_id must be a string ! You gave me:",_31b);return false;}if(!isFinite(_31b)){console.error("alp.cfg.data.type_id.isAmongStr(): the type_id string must contain a number ! You gave me:",_31b);return false;}return (-1<dojo.indexOf(dojo.map(arr,function(s){s=s.toLowerCase();var x=alp.cfg.data.type_id[s.toLowerCase()];return x&&x();}),_31b));},isWinterLight:function(_31c,_31d){var arr=["langlauf","rodeln","winterwandern","skitrailCrosscountry","sledging","winterHiking"];return !!((_31d&&_31d.toLowerCase&&alp.util.or(arr,"x->x.toLowerCase()===\""+_31d.toLowerCase()+"\""))||(_31c&&alp.cfg.data.type_id.isAmongStr(_31c,arr)));},isWinter:function(_31e,_31f){var arr=["schneeschuhwandern","skitour","skifreeride","snowshoehiking","skitour","skiFreeride"];return !!((_31f&&_31f.toLowerCase&&alp.util.or(arr,"x->x.toLowerCase()===\""+_31f.toLowerCase()+"\""))||alp.cfg.data.type_id.isWinterLight(_31e,_31f)||(_31e&&(alp.cfg.data.type_id.isAmongStr(_31e,arr))));},langlauf:function(){return "5610";},rodeln:function(){return "12090";},schneeschuhwandern:function(){return "12100";},skitour:function(){return "12010";},winterwandern:function(){return "12130";},skifreeride:function(){return "12040";}}},copyright:{c:function(){return "&copy;";},alpstein:function(){return "<br><a target=\"_blank\" class=\"alpGCopyright\" href=\"http://www.outdooractive.com/de/agb.html#15\" title=\"&copy; outdooractive.com\">"+alp.cfg.copyright.c()+" "+"outdooractive.com</a><br>";},linebreak:function(){return "<br>";}},gbounds:{austria:function(){return new GLatLngBounds(new GLatLng(46.3725,9.530833),new GLatLng(49.020556,17.160556));},ch:function(){return new GLatLngBounds(new GLatLng(45.578483912834606,5.543975830078125),new GLatLng(47.99359789867388,10.880584716796875));},cz:function(){return new GLatLngBounds(new GLatLng(49.09511494936478,13.095788955688477),new GLatLng(49.21154186738314,13.358087539672852));},es:function(){return new GLatLngBounds(new GLatLng(38.786204457258656,2.08740234375),new GLatLng(40.18411931650585,3.558197021484375));},germany:function(){return new GLatLngBounds(new GLatLng(47.04018214480665,5.625),new GLatLng(55.77657301866769,15.46875));},it:function(){return new GLatLngBounds(new GLatLng(46.22127,10.37684),new GLatLng(47.08867,12.47528));},por:function(){return new GLatLngBounds(new GLatLng(32.54044604524303,-17.395477294921875),new GLatLng(33.16629497884489,-16.519317626953125));},winter:function(){return new GLatLngBounds(new GLatLng(47.0523471667,9.12002563476),new GLatLng(48.4656371004,11.2033081054));}},gcopy:{es_alpstein:function(_320){if(_320==null){_320=9;}return new GCopyright("austria_alpstein",alp.cfg.gbounds.austria(),_320,alp.cfg.copyright.alpstein());},austria_bev:function(_321){if(_321==null){_321=9;}return new GCopyright("austria_bev",alp.cfg.gbounds.austria(),_321,alp.cfg.copyright.alpstein());},ch_swisstopo:function(_322){if(_322==null){_322=10;}return new GCopyright("cz_alpstein",alp.cfg.gbounds.ch(),_322,alp.cfg.copyright.alpstein());},cz_alpstein:function(_323){if(_323==null){_323=13;}return new GCopyright("cz_alpstein",alp.cfg.gbounds.cz(),_323,alp.cfg.copyright.alpstein());},es_alpstein:function(_324){if(_324==null){_324=10;}return new GCopyright("es_alpstein",alp.cfg.gbounds.es(),_324,alp.cfg.copyright.alpstein());},es_igne:function(_325){if(_325==null){_325=10;}return new GCopyright("es_igne",alp.cfg.gbounds.es(),_325,alp.cfg.copyright.alpstein());},es_linebreak:function(_326){if(_326==null){_326=10;}return new GCopyright("es_linebreak",alp.cfg.gbounds.es(),_326,alp.cfg.copyright.linebreak());},germany_alpstein:function(_327){if(_327==null){_327=8;}return new GCopyright("germany_alpstein",alp.cfg.gbounds.germany(),_327,alp.cfg.copyright.alpstein());},germany_bkg:function(_328){if(_328==null){_328=8;}return new GCopyright("germany_bkg",alp.cfg.gbounds.germany(),_328,alp.cfg.copyright.alpstein());},germany_linebreak:function(_329){if(_329==null){_329=0;}return new GCopyright("germany_linebreak",alp.cfg.gbounds.germany(),_329,alp.cfg.copyright.linebreak());},germanyfernradwege_alpstein:function(_32a){if(_32a==null){_32a=6;}return new GCopyright("germanyfernradwege_alpstein",alp.cfg.gbounds.germany(),_32a,alp.cfg.copyright.alpstein());},germanyfernwanderwege_alpstein:function(_32b){if(_32b==null){_32b=6;}return new GCopyright("germanyfernwanderwege_alpstein",alp.cfg.gbounds.germany(),_32b,alp.cfg.copyright.alpstein());},germanyhybrid_alpstein:function(_32c){if(_32c==null){_32c=13;}return new GCopyright("germanyhybrid_alpstein",alp.cfg.gbounds.germany(),_32c,alp.cfg.copyright.alpstein());},germanyradwege_alpstein:function(_32d){if(_32d==null){_32d=6;}return new GCopyright("germanyradwege_alpstein",alp.cfg.gbounds.germany(),_32d,alp.cfg.copyright.alpstein());},germanytransalp_alpstein:function(_32e){if(_32e==null){_32e=6;}return new GCopyright("germanytransalp_alpstein",alp.cfg.gbounds.germany(),_32e,alp.cfg.copyright.alpstein());},germanywanderwege_alpstein:function(_32f){if(_32f==null){_32f=6;}return new GCopyright("germanywanderwege_alpstein",alp.cfg.gbounds.germany(),_32f,alp.cfg.copyright.alpstein());},it_alpstein:function(_330){if(_330==null){_330=10;}return new GCopyright("it_alpstein",alp.cfg.gbounds.it(),_330,alp.cfg.copyright.alpstein());},por:function(_331){if(_331==null){_331=10;}return new GCopyright("por_alpstein",alp.cfg.gbounds.por(),_331,alp.cfg.copyright.alpstein());},winter_alpstein:function(_332){if(_332==null){_332=10;}return new GCopyright("winter_alpstein",alp.cfg.gbounds.winter(),_332,alp.cfg.copyright.alpstein());}},gcopycoll:{alpstein_map:function(opts){opts=opts||{};var ret=new GCopyrightCollection();var arr=[];arr.push(alp.cfg.gcopy.germany_alpstein());arr.push(alp.cfg.gcopy.germany_bkg());arr.push(alp.cfg.gcopy.austria_bev());arr.push(alp.cfg.gcopy.es_alpstein());arr.push(alp.cfg.gcopy.es_igne());arr.push(alp.cfg.gcopy.por());arr.push(alp.cfg.gcopy.ch_swisstopo());arr.push(alp.cfg.gcopy.it_alpstein());dojo.forEach(arr,ret.addCopyright,ret);return ret;},austria:function(_333){if(_333==null){_333=9;}var ret=new GCopyrightCollection();ret.addCopyright(new GCopyright("austriamap",alp.cfg.gbounds.austria(),_333,alp.cfg.copyright.alpstein()));return ret;},ch:function(_334){if(_334==null){_334=10;}var ret=new GCopyrightCollection();ret.addCopyright(new GCopyright("chmap",alp.cfg.gbounds.ch(),_334,alp.cfg.copyright.alpstein()));return ret;},cz:function(_335){if(_335==null){_335=13;}var ret=new GCopyrightCollection();ret.addCopyright(new GCopyright("czalpstein",alp.cfg.gbounds.cz(),_335,alp.cfg.copyright.alpstein()));return ret;},es:function(_336){if(_336==null){_336=10;}var ret=new GCopyrightCollection();ret.addCopyright(new GCopyright("esalpstein",alp.cfg.gbounds.es(),_336,alp.cfg.copyright.alpstein()));return ret;},fernradwege:function(_337){if(_337==null){_337=6;}var ret=new GCopyrightCollection();ret.addCopyright(alp.cfg.gcopy.germanyfernradwege_alpstein(_337));return ret;},fernwanderwege:function(_338){if(_338==null){_338=6;}var ret=new GCopyrightCollection();ret.addCopyright(new GCopyright("germanyalpstein",alp.cfg.gbounds.germany(),_338,alp.cfg.copyright.alpstein()));return ret;},germany:function(_339){if(_339==null){_339=8;}var ret=new GCopyrightCollection();ret.addCopyright(new GCopyright("germanyalpstein",alp.cfg.gbounds.germany(),_339,alp.cfg.copyright.alpstein()));return ret;},germanyhybrid:function(_33a){if(_33a==null){_33a=13;}var ret=new GCopyrightCollection();ret.addCopyright(new GCopyright("germanyhybridalpstein",alp.cfg.gbounds.germany(),_33a,alp.cfg.copyright.alpstein()));return ret;},it:function(_33b){if(_33b==null){_33b=10;}var ret=new GCopyrightCollection();ret.addCopyright(new GCopyright("italpstein",alp.cfg.gbounds.it(),_33b,alp.cfg.copyright.alpstein()));return ret;},por:function(_33c){if(_33c==null){_33c=10;}var ret=new GCopyrightCollection();ret.addCopyright(new GCopyright("poralpstein",alp.cfg.gbounds.por(),_33c,alp.cfg.copyright.alpstein()));return ret;},radwege:function(_33d){if(_33d==null){_33d=12;}var ret=new GCopyrightCollection();ret.addCopyright(new GCopyright("germanyalpstein",alp.cfg.gbounds.germany(),_33d,alp.cfg.copyright.alpstein()));return ret;},transalp:function(_33e){if(_33e==null){_33e=6;}var ret=new GCopyrightCollection();ret.addCopyright(new GCopyright("germanyalpstein",alp.cfg.gbounds.germany(),_33e,alp.cfg.copyright.alpstein()));return ret;},walking_network:function(_33f){if(_33f==null){_33f=13;}var ret=new GCopyrightCollection();ret.addCopyright(new GCopyright("germanyalpsteinnetz",alp.cfg.gbounds.germany(),_33f,alp.cfg.copyright.alpstein()));return ret;},wanderwege:function(_340){if(_340==null){_340=6;}var ret=new GCopyrightCollection();ret.addCopyright(alp.cfg.gcopy.germanywanderwege_alpstein(_340));return ret;},winter:function(_341){if(_341==null){_341=10;}var ret=new GCopyrightCollection();ret.addCopyright(new GCopyright("winteralpstein",alp.cfg.gbounds.winter(),_341,alp.cfg.copyright.alpstein()));return ret;}},gmaptype:{alpstein_hybrid2:function(_342,opts){return new alp.gmap.MixMapType([G_HYBRID_MAP.getTileLayers()[0],G_HYBRID_MAP.getTileLayers()[1],alp.cfg.mixtilelayer.alpstein_hybrid(_342,opts)],new GMercatorProjection(31),alp.cfg.gmaptype._i18n("alpstein_hybrid2"),dojo.mixin({maxResolution:17,minResolution:0},opts));},alpstein_map2:function(_343,opts){return new alp.gmap.MixMapType([(opts&&opts.winter)?alp.cfg.gtilelayer.google_physical():alp.cfg.gtilelayer.google_normal(),alp.cfg.mixtilelayer.alpstein_map(_343,opts)],new GMercatorProjection(31),alp.cfg.gmaptype._i18n((opts&&opts.winter)?"alpstein_mapwinter2":"alpstein_map2"),dojo.mixin({maxResolution:17,minResolution:0},opts));},alpstein_mapwinter2:function(_344,opts){return alp.cfg.gmaptype.alpstein_map2(_344,dojo.mixin({},opts,{winter:true}));},google_normal:function(_345,_346){if(_345==null){_345=G_NORMAL_MAP.getMinimumResolution();}if(_346==null){_346=G_NORMAL_MAP.getMaximumResolution();}var _347=[alp.cfg.gtilelayer.google_normal()];var ret=new GMapType(_347,new GMercatorProjection(31),alp.cfg.gmaptype._i18n("google"),{shortName:"Karte",tileSize:256,maxResolution:_346,minResolution:_345});ret.getCopyrights=alp.gmap.getCopyrightsFun(_347);return ret;},google_physical:function(_348,_349){if(_348==null){_348=G_PHYSICAL_MAP.getMinimumResolution();}if(_349==null){_349=G_PHYSICAL_MAP.getMaximumResolution();}var _34a=[alp.cfg.gtilelayer.google_physical()];var ret=new GMapType(_34a,new GMercatorProjection(31),alp.cfg.gmaptype._i18n("google"),{shortName:"Gelände",tileSize:256,maxResolution:_349,minResolution:_348});ret.getCopyrights=alp.gmap.getCopyrightsFun(_34a);return ret;},network:function(_34b,name,_34c,_34d,_34e,_34f){var _350=[];for(var a=0;a<_34b.length;a++){_350.push(_34b[a]);}_350.push(alp.cfg.gtilelayer.walking_network(_34d,_34e));_350=alp.util.safeConcat(_350,_34f);var ret=new GMapType(_350,new GMercatorProjection(31),name,{shortName:_34c,tileSize:256,maxResolution:_34e,minResolution:_34d});ret.getCopyrights=alp.gmap.getCopyrightsFun(_350);return ret;},satellite:function(_351,_352,_353){if(_352==null){_352=0;}if(_353==null){_353=19;}var _354=alp.util.safeConcat([alp.cfg.gtilelayer.google_satellite()],_351);var ret=new GMapType(_354,new GMercatorProjection(31),alp.cfg.gmaptype._i18n("satellite"),{shortName:"Sat",tileSize:256,maxResolution:_353,minResolution:_352});ret.getCopyrights=alp.gmap.getCopyrightsFun(_354);return ret;},_i18n:function(name){var _355=alp.cfg.gmaptype._i18n_cfg()[name];if(_355){var loc=alp.cfg.locale();if(!(loc in _355)){loc="de";}}alp.m(alp.cfg.gmaptype,"_i18n_fix_3d_terrain");return alp.at(_355,loc)||name;},_i18n_cfg:function(){return {alpstein_hybrid2:{de:"outdooractive Hybrid",en:"outdooractive Hybrid",fr:"outdooractive (hybride)",it:"outdooractive (ibrido)",nl:"outdooractive hybride"},alpstein_map2:{de:"outdooractive Sommer",en:"outdooractive Summer",fr:"outdooractive (été)",it:"outdooractive (estate)",nl:"outdooractive zomer"},alpstein_mapwinter2:{de:"outdooractive Winter",en:"outdooractive Winter",fr:"outdooractive (hiver)",it:"outdooractive (inverno)",nl:"outdooractive winter"},satellite:{de:"Satellit",en:"Satellite",fr:"Satellite",it:"Satellite",nl:"Satteliet"},google:{de:"Google",it:"Mappa"},terrain:{de:"Gelände",en:"Terrain",fr:"Terrain",it:"Terreno",nl:"Terrein"},earth_plugin:{de:"3D-Ansicht",en:"3D View",fr:"3D",it:"3D",nl:"3D-overzicht"}};},_i18n_fix_3d_terrain:function(){alp.cfg.gmaptype._i18n_fix_3d_terrain=0;dojun.forIn({"G_PHYSICAL_MAP":"terrain","G_SATELLITE_3D_MAP":"earth_plugin"},function(name,_356){var o=dojo.getObject(_356);if(!o){return;}var _357=alp.cfg.gmaptype._i18n(name),_358=o.getName();o.getName=function(){return _357;};return;for(var k in o){if(!(k in _2c4)){if(o[k]===_358){o[k]=_357;}}}});}},gtilelayer:{austria:function(){var ret=new GTileLayer(alp.cfg.gcopycoll.austria(9),9,17,{opacity:1,isPng:true});ret.getTileUrl=alp.util.knuthGoldenTileUrlFun(dojo.map(alp.cfg.domains(),function(n){return "http://s"+n+".outdooractive.com/austria/map";}),".png");return ret;},ch:function(){var ret=new GTileLayer(alp.cfg.gcopycoll.ch(10),10,16,{opacity:1,isPng:true});ret.getTileUrl=alp.util.knuthGoldenTileUrlFun(dojo.map(alp.cfg.domains(),function(n){return "http://s"+n+".outdooractive.com/ch/map";}),".png");return ret;},cz:function(){var ret=new GTileLayer(alp.cfg.gcopycoll.cz(13),13,17,{opacity:1,isPng:true});ret.getTileUrl=alp.util.knuthGoldenTileUrlFun(dojo.map(alp.cfg.domains(),function(n){return "http://s"+n+".outdooractive.com/cz/map";}),".png");return ret;},es:function(){var ret=new GTileLayer(alp.cfg.gcopycoll.es(10),10,17,{opacity:1,isPng:true});ret.getTileUrl=alp.util.knuthGoldenTileUrlFun(dojo.map(alp.cfg.domains(),function(n){return "http://s"+n+".outdooractive.com/es/map";}),".png");return ret;},fernradwege:function(_359){var o,ret;ret=new GTileLayer(alp.cfg.gcopycoll.fernradwege(8),8,17,{opacity:1,isPng:true});ret.getTileUrl=alp.util.knuthGoldenTileUrlFun(dojo.map(alp.cfg.domains(),function(n){return "http://s"+n+".outdooractive.com/portal/fernradwege";}),".png");return ret;},fernwanderwege:function(_35a){var o,ret;ret=new GTileLayer(alp.cfg.gcopycoll.fernwanderwege(8),8,17,{opacity:1,isPng:true});ret.getTileUrl=alp.util.knuthGoldenTileUrlFun(dojo.map(alp.cfg.domains(),function(n){return "http://s"+n+".outdooractive.com/portal/fernwanderwege";}),".png");return ret;},germany:function(){var ret=new GTileLayer(alp.cfg.gcopycoll.germany(8),8,17,{opacity:1,isPng:true});ret.getTileUrl=alp.util.knuthGoldenTileUrlFun(dojo.map(alp.cfg.domains(),function(n){return "http://s"+n+".outdooractive.com/portal/map";}),".png");return ret;},germanyavalanche:function(){var ret=new GTileLayer(alp.cfg.gcopycoll.germany(11),11,15,{opacity:1,isPng:true});ret.getTileUrl=alp.util.knuthGoldenTileUrlFun(dojo.map(alp.cfg.domains(),function(n){return "http://s"+n+".outdooractive.com/portal/gradient";}),".png");return ret;},germanyhybrid:function(){var ret=new GTileLayer(alp.cfg.gcopycoll.germanyhybrid(13),13,17,{opacity:1,isPng:true});ret.getTileUrl=alp.util.knuthGoldenTileUrlFun(dojo.map(alp.cfg.domains(),function(n){return "http://s"+n+".outdooractive.com/portal/hybrid";}),".png");return ret;},germanyskiresort:function(){var ret=new GTileLayer(alp.cfg.gcopycoll.germany(11),11,17,{opacity:1,isPng:true});ret.getTileUrl=alp.util.knuthGoldenTileUrlFun(dojo.map(alp.cfg.domains(),function(n){return "http://s"+n+".outdooractive.com/portal/skilayer";}),".png");return ret;},google_normal:function(){_35b(G_NORMAL_MAP);var _35c=_35d(),ret=new GTileLayer(new GCopyrightCollection(),_35c.minResolution(),_35c.maxResolution(),{isPng:_35c.isPng(),opacity:_35c.getOpacity});ret.getTileUrl=function(){var _35e=_35d();return _35e.getTileUrl.apply(_35e,arguments);};ret.getCopyright=function(_35f,zoom){_317.setCenter(_35f.getCenter());_317.setZoom(zoom);var _360=_35d();return _360.getCopyright.apply(_360,arguments);};return ret;function _35d(){return G_NORMAL_MAP.getTileLayers()[0];};},google_satellite:function(){_35b(G_SATELLITE_MAP);var _361=_362(),ret=new GTileLayer(new GCopyrightCollection(),_361.minResolution(),_361.maxResolution(),{isPng:_361.isPng(),opacity:_361.getOpacity});ret.getTileUrl=function(){var _363=_362();return _363.getTileUrl.apply(_363,arguments);};ret.getCopyright=function(_364,zoom){_317.setCenter(_364.getCenter());_317.setZoom(zoom);var _365=_362();return _365.getCopyright.apply(_365,arguments);};return ret;function _362(){return G_SATELLITE_MAP.getTileLayers()[0];};},google_physical:function(){_35b(G_PHYSICAL_MAP);var _366=_367(),ret=new GTileLayer(new GCopyrightCollection(),_366.minResolution(),_366.maxResolution(),{isPng:_366.isPng(),opacity:_366.getOpacity});ret.getTileUrl=function(){var _368=_367();return _368.getTileUrl.apply(_368,arguments);};ret.getCopyright=function(_369,zoom){_317.setCenter(_369.getCenter());_317.setZoom(zoom);var _36a=_367();return _36a.getCopyright.apply(_36a,arguments);};return ret;function _367(){return G_PHYSICAL_MAP.getTileLayers()[0];};},it:function(){var ret=new GTileLayer(alp.cfg.gcopycoll.it(10),10,17,{opacity:1,isPng:true});ret.getTileUrl=alp.util.knuthGoldenTileUrlFun(dojo.map(alp.cfg.domains(),function(n){return "http://s"+n+".outdooractive.com/it/map";}),".png");return ret;},por:function(){var ret=new GTileLayer(alp.cfg.gcopycoll.por(10),10,17,{opacity:1,isPng:true});ret.getTileUrl=alp.util.knuthGoldenTileUrlFun(dojo.map(alp.cfg.domains(),function(n){return "http://s"+n+".outdooractive.com/por/map";}),".png");return ret;},radwege:function(_36b){var o,ret,_36c=alp.cfg.blank_png(),_36d=8;ret=new GTileLayer(alp.cfg.gcopycoll.radwege(_36d),_36d,17,{opacity:1,isPng:true});var _36e=alp.util.knuthGoldenTileUrlFun(dojo.map(alp.cfg.domains(),function(n){return "http://s"+n+".outdooractive.com/portal/radwege";}),".png");ret.getTileUrl=function(tile,zoom){return zoom<_36d?_36c:_36e(tile,zoom);};return ret;},transalp:function(_36f){var o,ret;ret=new GTileLayer(alp.cfg.gcopycoll.transalp(6),6,17,{opacity:1,isPng:true});ret.getTileUrl=alp.util.knuthGoldenTileUrlFun(dojo.map(alp.cfg.domains(),function(n){return "http://s"+n+".outdooractive.com/portal/transalp";}),".png");return ret;},walking_network:function(_370,_371){var _372=Math.max(_370,13);var _373=Math.min(_371,17);var _374=new GTileLayer(alp.cfg.gcopycoll.walking_network(_372),_372,_373);_374.getTileUrl=alp.util.knuthGoldenTileUrlFun(dojo.map(alp.cfg.domains(),function(n){return "http://s"+n+".alpserver.de/anet/hybrid";}),".png",{urls:dojo.map(alp.cfg.domains(),function(n){return "http://s"+n+".alpserver.de/portal/map";}),minZoom:_372,maxZoom:_373,query:"transparent"});_374.isPng=function(){return true;};_374.getOpacity=function(){return 1;};return _374;},wanderwege:function(_375){var o,ret;ret=new GTileLayer(alp.cfg.gcopycoll.wanderwege(8),8,17,{opacity:1,isPng:true});ret.getTileUrl=alp.util.knuthGoldenTileUrlFun(dojo.map(alp.cfg.domains(),function(n){return "http://s"+n+".outdooractive.com/portal/wanderwege";}),".png");return ret;},winter:function(){var ret=new GTileLayer(alp.cfg.gcopycoll.winter(10),10,17,{opacity:1,isPng:true});ret.getTileUrl=alp.util.knuthGoldenTileUrlFun(dojo.map(alp.cfg.domains(),function(n){return "http://s"+n+".outdooractive.com/portal/winter";}),".png");return ret;}},gtilelayeroverlay:{"cycling":function(){var _376=alp.cfg.gtilelayer.radwege();return _376&&new GTileLayerOverlay(_376,{zPriority:1});},"hiking":function(){var _377=alp.cfg.gtilelayer.wanderwege();return _377&&new GTileLayerOverlay(_377,{zPriority:2});},"longDistanceCycling":function(){var _378=alp.cfg.gtilelayer.fernradwege();return _378&&new GTileLayerOverlay(_378,{zPriority:3});},"longDistanceHiking":function(){var _379=alp.cfg.gtilelayer.fernwanderwege();return _379&&new GTileLayerOverlay(_379,{zPriority:4});},"signpostedHiking":function(){var _37a=alp.cfg.gtilelayer.wanderwege();return _37a&&new GTileLayerOverlay(_37a,{zPriority:5});},"transalpMountainbiking":function(){var _37b=alp.cfg.gtilelayer.transalp();return _37b&&new GTileLayerOverlay(_37b,{zPriority:6});}},mixmaptype:{isJson:function(_37c){return (-1<dojo.indexOf(["json","jsonp"],_37c));},masklayer:{austria:function(_37d,opts){var _37e=alp.cfg.mixmaptype.isJson(_37d);return {url:alp.util.absUrlStringTileBase("austria_tilelist."+((opts&&opts.ext)||(_37d+(_37e?"":".bin")))),format:(_37e?_37d:"binary")};},ch:function(_37f,opts){var _380=alp.cfg.mixmaptype.isJson(_37f);return {url:alp.util.absUrlStringTileBase("ch_tilelist."+((opts&&opts.ext)||(_37f+(_380?"":".bin")))),format:(_380?_37f:"binary")};},cz:function(_381,opts){var _382=alp.cfg.mixmaptype.isJson(_381);return {url:alp.util.absUrlStringTileBase("cz_tilelist."+((opts&&opts.ext)||(_381+(_382?"":".bin")))),format:(_382?_381:"binary")};},es:function(_383,opts){var _384=alp.cfg.mixmaptype.isJson(_383);return {url:alp.util.absUrlStringTileBase("es_tilelist."+((opts&&opts.ext)||(_383+(_384?"":".bin")))),format:(_384?_383:"binary")};},germany:function(_385,opts){var _386=alp.cfg.mixmaptype.isJson(_385);return {url:alp.util.absUrlStringTileBase("tilelist."+((opts&&opts.ext)||(_385+(_386?"":".bin")))),format:(_386?_385:"binary")};},it:function(_387,opts){var _388=alp.cfg.mixmaptype.isJson(_387);return {url:alp.util.absUrlStringTileBase("it_tilelist."+((opts&&opts.ext)||(_387+(_388?"":".bin")))),format:(_388?_387:"binary")};},por:function(_389,opts){var _38a=alp.cfg.mixmaptype.isJson(_389);return {url:alp.util.absUrlStringTileBase("por_tilelist."+((opts&&opts.ext)||(_389+(_38a?"":".bin")))),format:(_38a?_389:"binary")};},transalp:function(_38b,opts){var _38c=alp.cfg.mixmaptype.isJson(_38b);return {url:alp.util.absUrlStringTileBase("transalp_tilelist."+((opts&&opts.ext)||(_38b+(_38c?"":".bin")))),format:(_38c?_38b:"binary")};},winter:function(_38d,opts){var _38e=alp.cfg.mixmaptype.isJson(_38d);return {url:alp.util.absUrlStringTileBase("winter_tilelist."+((opts&&opts.ext)||(_38d+(_38e?"":".bin")))),format:(_38e?_38d:"binary")};}}},mixtilelayer:{alpstein_map:function(_38f,opts){var _390=8,_391=17,_392=alp.cfg.gcopycoll.alpstein_map(_390,opts);var _393={opacity:1,isPng:true};var arr=[],_394=alp.cfg.gtilelayer.germany();var _395=opts&&opts.masklayer_opts;if(!(opts&&opts.winter)){arr.push([alp.cfg.gtilelayer.ch(),alp.cfg.mixmaptype.masklayer.ch(_38f,_395)]);}arr.push([alp.cfg.gtilelayer.it(),alp.cfg.mixmaptype.masklayer.it(_38f,_395)]);arr.push([alp.cfg.gtilelayer.austria(),alp.cfg.mixmaptype.masklayer.austria(_38f,_395)]);arr.push([_394,alp.cfg.mixmaptype.masklayer.germany(_38f,_395)]);arr.push([alp.cfg.gtilelayer.es(),alp.cfg.mixmaptype.masklayer.es(_38f,_395)]);arr.push([alp.cfg.gtilelayer.por(),alp.cfg.mixmaptype.masklayer.por(_38f,_395)]);if(opts&&opts.cz){arr.unshift([alp.cfg.gtilelayer.cz(),alp.cfg.mixmaptype.masklayer.cz(_38f,_395)]);}if(opts&&opts.winter){arr.push([alp.cfg.gtilelayer.winter(),alp.cfg.mixmaptype.masklayer.winter(_38f,_395)]);}var arr2=dojo.map(arr,function(x){return new alp.gmap.MixLayerInfo({mask_url:x[1].url,mask_format:x[1].format,getTileUrl:x[0].getTileUrl});});return new alp.gmap.MixTileLayer(_392,_390,_391,dojo.mixin(_393,opts&&opts.alp_mixtilelayer_opts,{alp_info_arr:arr2}));},alpstein_hybrid:function(_396,opts){var _397=13,_398=17,_399=alp.cfg.gtilelayer.germanyhybrid(),_39a=opts&&opts.masklayer_opts,_39b=alp.cfg.mixmaptype.masklayer.germany(_396,_39a),_39c={opacity:1,isPng:true};var arr=[{mask_url:_39b.url,mask_format:_39b.format,mask_opt:{strict:true},getTileUrl:_399.getTileUrl}];var _39d=alp.cfg.gcopycoll.alpstein_map(_399.minResolution());return new alp.gmap.MixTileLayer(_39d,_397,_398,dojo.mixin(_39c,opts&&opts.alp_mixtilelayer_opts,{alp_info_arr:arr}));}}});function _35b(_39e){_317||(_317=new GMap2(dojo.create("div",{style:{position:"absolute",top:"-99999px",left:"-99999px",width:"100px",height:"100px",visibility:"hidden"}},dojo.body())));_317.addMapType(_39e);_317.setCenter(new GLatLng(37.4419,-122.1419),13);_317.setUIToDefault();_317.checkResize();};});})();}if(typeof dojo==="undefined"||!dojo._hasResource["oa_v2.cfg._core"]){typeof dojo==="undefined"||(dojo._hasResource["oa_v2.cfg._core"]=true);dojo.provide("oa_v2.cfg._core");oa_v2.cfg.jcu=(new dojo._Url("",[(dojo.global.alpConfig&&alpConfig.base_href)||"","clusterConfig.json?v2=true"].join("/"))).toString();oa_v2.cfg.jcur=(new dojo._Url("",[(dojo.global.alpConfig&&alpConfig.base_href)||"","clusterConfig.json?v2=true&recommender=true"].join("/"))).toString();dojo.addOnLoad(function(){dojo.query("label").forEach(function(node){node.onmousedown=function(){return false;};});alp.m(alp.util,"add_css","label { cursor : pointer; }");});}if(typeof dojo==="undefined"||!dojo._hasResource["oa_v2.cfg"]){typeof dojo==="undefined"||(dojo._hasResource["oa_v2.cfg"]=true);dojo.provide("oa_v2.cfg");}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.latlngbounds"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.latlngbounds"]=true);dojo.provide("alp._gmap2_3.latlngbounds");(function(){var AG=alp._gmap2_3,gm=google.maps,_39f=gm.LatLngBounds.prototype;var s="union";_39f[s]||(_39f[s]=function(_3a0){this.extend(_3a0.getSouthWest());this.extend(_3a0.getNorthEast());});var s="contains";_39f[s]=_39f[s]||_39f.containsLatLng;var s="containsBounds";_39f[s]||(_39f[s]=function(_3a1){return this.contains(_3a1.getSouthWest())&&this.contains(_3a1.getNorthEast())&&this.contains(_3a1.getCenter());});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.mercatorprojection"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.mercatorprojection"]=true);dojo.provide("alp._gmap2_3.mercatorprojection");(function(){var AG=alp._gmap2_3,gm=google.maps,s="MercatorProjection";AG.earth_radius=function(){return 6378137;};gm[s]||(gm[s]=(function(){var _3a2=128,M=Math,PI=M.PI,log=M.log,sin=M.sin,atan=M.atan,exp=M.exp,_3a3=_3a2/PI,LToX=function(x,y){return (_3a2+_3a3*x*PI/180);},LToY=function(x,y){return (_3a2-_3a3*log((1+sin(y*PI/180))/(1-sin(y*PI/180)))/2);},XToL=function(x,y){return ((x-_3a2)/_3a3)*180/PI;},YToL=function(x,y){return (PI/2-2*atan(exp((y-_3a2)/_3a3)))*180/PI;};function _3a4(_3a5){};var p=_3a4.prototype;p.fromLatLngToPoint=function(_3a6,_3a7){var ret=_3a7||new gm.Point(0,0),lat=_3a6.lat(),lng=_3a6.lng();ret.x=LToX(lng,lat);ret.y=LToY(lng,lat);return ret;};p.fromPointToLatLng=function(_3a8,_3a9){var x=_3a8.x,y=_3a8.y,lat=YToL(x,y),lng=XToL(x,y);return new gm.LatLng(lat,lng,_3a9);};return _3a4;})());})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.event"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.event"]=true);dojo.provide("alp._gmap2_3.event");(function(){var AG=alp._gmap2_3,o={},_3aa={bounds_changed:"moveend",maptypeid_changed:"maptypechanged",rightclick:"singlerightclick",zoom_changed:"zoomend"};AG.event=function(_3ab){var m=_3ab;if(!o[m]){var gm=google.maps,gme2=gm.Event,gme3=gm.event,gme=gme3||gme2;if(gme&&gme[m]){o[m]=dojo.hitch(gme,m);}if(AG.V2()&&o[m]&&m==="addListener"){(function(){var _3ac=o[m];o[m]=function(_3ad,_3ae,_3af){if(_3ae in _3aa){_3ae=_3aa[_3ae];}return _3ac(_3ad,_3ae,_3b0);function _3b0(a,b,c){var gmll=google.maps.LatLng,_3b1={},_3b2=_3ad instanceof google.maps.Map;if(_3ae==="singlerightclick"&&_3b2&&c){return;}if(a instanceof gmll){_3b1.latLng=a;}else{if(b instanceof gmll){_3b1.latLng=b;}else{if(_3ad.getPosition){_3b1.latLng=_3ad.getPosition();}}}if(_3ae==="click"&&_3b2&&(a||!_3b1.latLng)){return;}if(_3ae==="singlerightclick"&&_3b2&&!_3b1.latLng){_3b1.latLng=AG.fromContainerPixelToLatLng(_3ad,a);}_3af(_3b1);};};})();}}var alo="addListenerOnce",adlo="addDomListenerOnce",m_=m.replace("Once","");if(!o[m]&&(m===alo||m===adlo)&&gme&&gme[m_]){o[m]=function(_3b3,_3b4,_3b5){var h=AG.event(m_)(_3b3,_3b4,function(){AG.event("removeListener")(h);_3b5.apply(_3b3,arguments);});return h;};}return o[m];};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.db"]){typeof dojo==="undefined"||(dojo._hasResource["alp.db"]=true);dojo.provide("alp.db");(function(){var AUO=alp.util.object;alp.db.common=function(){var o=dojo.getObject("alp._obj",true),s="db";return (o[s]=o[s]||new alp.DB());};dojo.declare("alp.DB",null,{constructor:function(){this._data={};},erase:function(name){this._getset(name,undefined);},getset:function(name,_3b6){if(arguments.length<2){return AUO.copy(this._getset.apply(this,arguments));}this._getset.apply(this,arguments);},_getset:function(name,_3b7){var arr,last,o;if(!name){console.error(this.declaredClass+".access() requires a non-empty name string!");return;}if(arguments.length<2){var ret=dojo.getObject(name,false,this._data);if(ret instanceof alp.db.Redirect){var _3b8;while(ret instanceof alp.db.Redirect&&ret!==_3b8){_3b8=ret;ret=dojo.getObject(ret.to_key,false,this._data);}}return ret;}arr=name.split(".");last=arr.pop();o=arr.length?dojo.getObject(arr.join("."),true,this._data):this._data;if(_3b7===undefined){delete o[last];}else{if(o[last]!==_3b7){o[last]=_3b7;this._changed(name,_3b7);}}},has:function(name){return this._getset(name)!==undefined;},waitfor:function(name){var fun,h,ret;ret=new alp.util.SafeDeferred();fun=dojo.hitch(this,function(_3b9){if(_3b9!==name){return;}if(this.has(name)){dojo.disconnect(h);ret.callback(this.getset(name));return;}});h=dojo.connect(this,"changed",this,fun);fun(name);return ret;},waitfor_cb:function(name){var dfrd=this.waitfor(name);return dfrd.addCallback.apply(dfrd,Array.prototype.slice.call(arguments,1));},changed:function(name,_3ba){},_changed:alp.util.asyncHitch("changed")});alp.db.Redirect=function(_3bb){this.to_key=_3bb;};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.data.ooi"]){typeof dojo==="undefined"||(dojo._hasResource["alp.data.ooi"]=true);dojo.provide("alp.data.ooi");alp.data.ooi_db_suffix=".api";alp.data.allMaintype=function(_3bc,_3bd,db){db=db||alp.db.common();if(db&&_3bd){_3bd=dojo.map(_3bd,function(id){return alp.data.ooiid.alpsteinize(id,db);});}var ret=[],_3be={};for(var _3bf in _3bc){if(!(_3bf in _3be)){ret=ret.concat(dojo.map(_3bc[_3bf]||[],function(x){return dojo.mixin({frontendtype:_3bf},x);}));}}if(_3bd){var id2n={};for(var n=_3bd.length;n--;){id2n[_3bd[n]]=n;}var _3c0=function(ooi){var n=ooi.id&&id2n[ooi.id];return (n!=null)?n:Infinity;};ret.sort(function(a,b){var va=_3c0(a),vb=_3c0(b);return va<vb?-1:va>vb?+1:0;});}return ret;};alp.data.get_ooi=function(id,db){db=db||alp.db.common();var obj=db.getset(id+alp.data.ooi_db_suffix);return obj&&alp.data.single_ooi(obj);};(function(){var n=0;alp.data.ooiid=function(x){if(typeof x==="string"){return x;}if(x&&x.externalSystem&&x.externalId){return "external:"+x.externalSystem+":"+x.externalId;}if(x&&x.id){return x.id;}return "CustomOOIID#"+(n++)+"_"+(new Date().getTime());};})();(function(){var _3c1=alp.data.ooiid;var rx=/^external:(.+):(.+)$/;_3c1.is_external=function(id){return id&&rx.test(id);};var _3c2=/^[+-]?\d+$/;_3c1.is_alpstein=function(id){return id&&_3c2.test(id);};_3c1.external_system=function(id){return id&&_3c1.is_external(id)&&id.match(rx)[1];};_3c1.external_id=function(id){return id&&_3c1.is_external(id)&&id.match(rx)[2];};_3c1.alpsteinize=function(id,db){if(_3c1.is_alpstein(id)){return id;}var one=alp.data.get_ooi(id,db),ret=(one&&one.data&&one.data.id)||id;return ret;};_3c1.same_object=function(id0,id1,db){if(id0==null||id1===null){return false;}return _3c1.alpsteinize(id0)===_3c1.alpsteinize(id1);};})();alp.data.external_info=function(_3c3,db){var _3c4,id;if(typeof _3c3==="string"&&!alp.data.ooiid.is_external(_3c3)){var one=alp.data.get_ooi(id,db);_3c3=one&&one.data;}if(typeof _3c3==="string"){_3c4=alp.data.ooiid.external_system(_3c3);id=alp.data.ooiid.external_id(_3c3);}else{_3c4=dojo.getObject("meta.externalSystem.name",false,_3c3);id=dojo.getObject("meta.externalId.id",false,_3c3);}if(_3c4&&id){return {externalSystem:_3c4,externalId:id};}};alp.data.ooi_category_id=function(o){return alp.util.get_property(o,"category.id");};alp.data.ooi_geometry=function(o,opts){var ret;if(!o){return;}if(o.x&&o.y){ret=[o.x,o.y];}else{if(o.lat&&o.lng){ret=[o.lng,o.lat];}else{if(o.geometry){var _3c5=dojo.map(o.geometry.split(" "),function(s){var xy=s.split(",");return [parseFloat(xy[0]),parseFloat(xy[1])];});ret=[].concat(_3c5[0]);if(opts&&opts.polyline){if(_3c5.length>1){ret.polyline=_3c5;}}}else{if(o.data){return alp.data.ooi_geometry(o.data);}else{if(o.coordinates){return alp.data.ooi_geometry(o.coordinates);}else{if(o.length===2){ret=[].concat(o);}}}}}}if(ret){ret.x=ret.lng=ret[0];ret.y=ret.lat=ret[1];}return ret;};alp.data.createCustomOOI=function(o,db){db=db||alp.db.common();var me=this;dojo.mixin(me,o);dojo.forEach(["id","externalSystem","externalId"],function(s){if(me[s]!=null){throw new Error("alp.data.createCustomOOI(): field \""+s+"\" is forbidden.");}});var id=alp.data.ooiid(),_3c6={};o.id=id;_3c6[o.maintype||"ooi"]=[o];db.getset(id+alp.data.ooi_db_suffix,_3c6);return id;};alp.data.single_ooi=function(data,id){if(typeof data==="object"){var _3c7={};for(var _3c8 in data){if(!(_3c8 in _3c7)){var arr=data[_3c8];if(arr&&arr.length&&arr[0].id&&(!id||arr[0].id===id||alp.data.ooiid.is_external(id))){return {maintype:_3c8,data:arr[0]};}}}}return {};};}if(typeof dojo==="undefined"||!dojo._hasResource["alp.data.boolstate"]){typeof dojo==="undefined"||(dojo._hasResource["alp.data.boolstate"]=true);dojo.provide("alp.data.boolstate");dojo.declare("alp.data.BoolState",alp.data.State,{constrain_undef:dojun.lambda("!!"),constrain_def:dojun.lambda("!!"),init_value:false,toggle:function(){return this.set(!this.get());}});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.io.script"]){typeof dojo==="undefined"||(dojo._hasResource["alp.io.script"]=true);dojo.provide("alp.io.script");(function(){var old=dojo.hitch(dojo.io.script,"_jsonpCallback");dojo.io.script._jsonpCallback=function(json){if(!(json&&typeof json==="object")){console.error("alp.io.script/dojo.io.script got a failure on ioArgs",this.ioArgs," -> json:",json);json={"status":"error"};}this.ioArgs.json=json;};alp.io.script.is_error=function(json){return json&&json.status==="error";};var dios=dojo.io.script;dios.attach=function(id,url,_3c9){var doc=(_3c9||dojo.doc);var _3ca=doc.createElement("script");_3ca.type="text/javascript";_3ca.src=url;_3ca.id=id;_3ca.charset="utf-8";_3ca.onerror=function(){alp.util.set_property(dios,["_hadHTTPError",id],true);};return doc.getElementsByTagName("head")[0].appendChild(_3ca);};var _3cb=dios._ioCheck;dios._ioCheck=function(dfd){if(alp.util.get_property(dios,["_hadHTTPError",dfd.ioArgs.id])){if(dfd.fired<0){dfd.cancel();}return false;}return _3cb.apply(dios,arguments);};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.xhrmulti"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.xhrmulti"]=true);dojo.provide("alp.util.xhrmulti");(function(){var _3cc=alp.util.lazydef("new alp.util.XhrMulti()");alp.util.xhr_auto_xd=function(args){return _3cc().get(args);};})();dojo.declare("alp.util.XhrMulti",null,{constructor:function(cfg){this.cfg=dojo.mixin({cache_size:1000,xdomain:null},cfg);this._loading=new alp.data.BoolState();this._loading.entered_v_cb(true,this,"_loading_starts");this._loading.entered_v_cb(false,this,"_loading_stops");this._loading_dfrd={};this._previous=[];this.reset_cache();},_update_loading:function(){this._loading.set(this._previous&&(this._previous.length>0));},reset_cache:function(){this._cache_history=this._cache_history||[];this._cache=this._cache||{};},get:function(args){var me=this,_3cd=(me.cfg.xdomain!=null)?me.cfg.xdomain:alp.util.is_xd(args.url);if(_3cd&&args.url_xd){args=dojo.mixin({},args,{url:args.url_xd});}var _3ce=[args.url,dojo.toJson(args.content||null)].join("#");var a=me._cache[_3ce];if(a){args.load(a.response,a.ioArgs);return;}var o=this._loading_dfrd[_3ce];if(o){o.addCallback(function(_3cf){alp.util.asyncHitch("load",args,0)(_3cf,args);return _3cf;});}else{if(me.cfg.cache_size>0){var _3d0=dojo.connect(args,"load",function cache_update(_3d1,_3d2){dojo.disconnect(_3d0);me.reset_cache();while(me._cache_history.length>me.cfg.cache_size){delete me._cache[me._cache_history.shift()];}me._cache_history.push(_3ce);me._cache[_3ce]={response:_3d1,ioArgs:_3d2};});}if(_3cd){args.jsonp="callback";o=dojo.io.script.get(args);}else{o=dojo.xhrGet(args);}if(!o){console.error("alp.util.XhrMulti.get() obtained !o from dojo.xhrGet() !!! Aborting here.");return;}this._loading_dfrd[_3ce]=o;me._previous.push(o);me._update_loading();}o.addCallback(function(a){var i=dojo.indexOf(me._previous,o);if(i>-1){me._previous.splice(i,1);me._update_loading();}return a;});return o;},cancel:function(){var _3d3=dojo.map(this._previous,function(x){return x;});dojo.forEach(_3d3,function(o){if(o){o.cancel();}else{console.error("alp.util.XhrMult.cancel() got o:",o);}});this._previous=[];this._update_loading();},loading_starts:function(){},loading_stops:function(){},_loading_starts:alp.util.asyncHitch("loading_starts"),_loading_stops:alp.util.asyncHitch("loading_stops")});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.data.api"]){typeof dojo==="undefined"||(dojo._hasResource["alp.data.api"]=true);dojo.provide("alp.data.api");alp.data.api_gen=function(meta){meta=dojo.mixin({cfg_default:{},url:null,url_xd:null},meta);if(!meta.url){throw new Error("alp.data.api_gen(): you must give at least `meta.url`.");}var ret=function(cfg){var _3d4=(typeof meta.cfg_default==="function")?meta.cfg_default():meta.cfg_default;cfg=dojo.mixin({},_3d4,cfg);var dfrd=new alp.util.SafeDeferred(),url=dojo.string.substitute(meta.url,cfg),_3d5=meta.url_xd&&dojo.string.substitute(meta.url_xd,cfg);alp.util.xhr_auto_xd({url:url,url_xd:_3d5,headers:{"Accept":"application/json"},handleAs:"json",load:function(_3d6,_3d7){var s=_3d6&&_3d6.status;s=s&&s.toLowerCase();if(s==="failed"||s==="error"){console.error("alp.data.api: Received status \""+s+"\", response:",_3d6,", ioArgs:",_3d7);}dfrd.callback(_3d6);}});return dfrd;};return ret;};alp.data.api_cat=alp.data.api_gen({cfg_default:{project:"default",type:""},url:alp.cfg.url.api_cat(),url_xd:alp.cfg.url.api_cat_xd()});alp.data.api_geocode=alp.data.api_gen({cfg_default:{project:"",limit:10,q:"",type:"poi"},url:alp.cfg.url.api_geocode(),url_xd:alp.cfg.url.api_geocode_xd()});alp.data.api_mentz_departure=alp.data.api_gen({cfg_default:function(){return {id:"",cachebust:(+new Date()/60000)>>0};},url:alp.cfg.url.api_mentz_departure(),url_xd:alp.cfg.url.api_mentz_departure_xd()});alp.data.api_nextbike_info=alp.data.api_gen({cfg_default:function(){return {id:"",cachebust:(+new Date()/60000)>>0};},url:alp.cfg.url.api_nextbike_info(),url_xd:alp.cfg.url.api_nextbike_info_xd()});alp.data.api_callabike_info=alp.data.api_gen({cfg_default:function(){return {id:"",cachebust:(+new Date()/60000)>>0};},url:alp.cfg.url.api_callabike_info(),url_xd:alp.cfg.url.api_callabike_info_xd()});alp.data.api_search=alp.data.api_gen({cfg_default:{project:"",q:"",type:"poi"},url:alp.cfg.url.api_search(),url_xd:alp.cfg.url.api_search_xd()});alp.data.api_oois=alp.data.api_gen({cfg_default:{project:"",idlist:""},url:alp.cfg.url.api_oois(),url_xd:alp.cfg.url.api_oois_xd()});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.data.oois"]){typeof dojo==="undefined"||(dojo._hasResource["alp.data.oois"]=true);dojo.provide("alp.data.oois");(function(){var CN="alp.data.SingleOOI";dojo.declare(CN,null,{constructor:function(id,cfg){this.id=id;this.cfg=cfg;},load:function(_3d8){var me=this,cb=dojo.hitch.apply(dojo,arguments),oois=new alp.data.OOIs(dojo.mixin({},me.cfg,{idlist:[me.id]}));oois.load(function(data){var ooi=alp.data.single_ooi(data,me.id);if(ooi){cb(ooi,alp.data.ooi_geometry(ooi.data));}});}});})();(function(){var CN="alp.data.OOIs",_3d9={};dojo.declare(CN,null,{api_oois_url:alp.cfg.url.api_oois(),api_oois_xd_url:alp.cfg.url.api_oois_xd(),db:alp.db.common(),idlist:null,proj:null,xdomain:null,constructor:function(cfg){if(typeof cfg!=="object"){throw new Error(CN+".constructor() needs a `cfg` object!");}dojo.mixin(this,cfg);},load:function(_3da){var cb=dojo.hitch.apply(dojo,arguments);if(this.idlist){var o=this._fetch_from_db(this.idlist);if(o.is_complete){cb(o.response);return;}alp.data.api_oois({proj:this.proj||"",idlist:o.remaining_idlist.join(",")}).then(o.receiver(cb));}},load_dfrd:function(){if(!this._load_dfrd){this._load_dfrd=new alp.util.SafeDeferred();this.load(this._load_dfrd,"callback");}return this._load_dfrd;},_fetch_from_db:function(_3db){var me=this,o={response:{}};if(!me.db){o.remaining_idlist=_3db;}else{o.remaining_idlist=[];dojo.forEach(_3db,function(id){var k=id+alp.data.ooi_db_suffix,data=me.db.getset(k);if(data){o.response=me._combine_responses(o.response,data);}else{o.remaining_idlist.push(id);}});}o.is_complete=o.remaining_idlist.length<1;if(!o.is_complete){o.receiver=function(cb){return function(_3dc,_3dd){if(alp.io.script.is_error(_3dc)){console.error(CN+"._fetch_from_db(): backend failure. response:",_3dc,", ioArgs:",_3dd);return;}if(me.db){for(var _3de in _3dc){if(!(_3de in _3d9)){var arr=_3dc[_3de];for(var b=arr.length;b--;){var ooi=arr[b],id=ooi&&ooi.id;if(!(id&&typeof id==="string")){continue;}var data={};data[_3de]=[ooi];me.db.getset(id+alp.data.ooi_db_suffix,data);var _3df=alp.data.external_info(ooi);if(_3df){me.db.getset(alp.data.ooiid(_3df)+alp.data.ooi_db_suffix,new alp.db.Redirect(id+alp.data.ooi_db_suffix));}}}}}var _3e0=me._combine_responses(o.response,_3dc),_3e1=alp.data.allMaintype(_3e0);cb(_3e0,_3e1);};};}return o;},_combine_responses:function(r0,r1){if(!(r0&&r1)){return r0||r1;}var ret={};for(var _3e2 in r0){if(!(_3e2 in _3d9)){ret[_3e2]=(ret[_3e2]||[]).concat(r0[_3e2]);}}for(var _3e2 in r1){if(!(_3e2 in _3d9)){ret[_3e2]=(ret[_3e2]||[]).concat(r1[_3e2]);}}return ret;}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.map_extend"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.map_extend"]=true);dojo.provide("alp._gmap2_3.map_extend");(function(){var AG=alp._gmap2_3,gm=google.maps,_3e3=gm.Map.prototype,_3e4={};_3e3.getDiv=_3e3.getDiv||_3e3.getContainer;_3e3.fitBounds||(_3e3.fitBounds=function(_3e5){var m="getBoundsZoomLevel";if(m in _3e3){var z=_3e3[m].call(this,_3e5);this.setCenter(_3e5.getCenter());this.setZoom(z);}});_3e3.centerOOI=function(id,opt){this.fitOOI(id,dojo.mixin({zoom:null},opt,{noFit:true}));};_3e3.fitOOI=function(id,opt){var map=this;opt=dojo.mixin({padding:0.05,iw:false,noFit:false},opt);var proj=opt.proj||"";if(!proj){console.warn("---------- Alpstein Warning! You have called fitOOI() without a project variable, consider using fitOOI( <id>, { proj : \"<project_id>\" } ).");}if(typeof id==="string"){var ooi=new alp.data.SingleOOI(id,{proj:proj});ooi.load(function(obj,xy){var geom=alp.data.ooi_geometry(obj.data||xy,{polyline:true}),gm=google.maps,_3e6=new gm.LatLngBounds();if(!("x" in geom)||!("y" in geom)){console.error("alp._gmap2_3.fitOOI could not determine the geometry of ooi with id:"+id);return;}var _3e7=new gm.LatLng(geom.y,geom.x);_3e6.extend(_3e7);if(opt.iw){var proj=AG.getProjection(map);if(proj){var z=14,pix=AG.fromLatLngToPixel(proj,_3e7,z),_3e8=new gm.Point(pix.x+150,pix.y-300),_3e9=AG.fromPixelToLatLng(proj,_3e8,z);_3e6.extend(_3e9);}}if("polyline" in geom){dojo.forEach(AG.xy2latlng(geom.polyline),function(_3ea){_3e6.extend(_3ea);});}map.whenLoaded(function(){if(opt.noFit){map.setCenter(_3e6.getCenter());if(opt.zoom!==null){map.setZoom(opt.zoom);}}else{AG.set_bbox(map,_3e6,opt.padding,alp.at(opt,["maxZoom"]));}});});}else{var oois=new alp.data.OOIs({idlist:id,proj:proj}),gm=google.maps;oois.load(function(obj){var _3eb=new gm.LatLngBounds();for(var _3ec in obj){if(!(_3ec in _3e4)){dojo.forEach(obj[_3ec],function(data){var xy=alp.data.ooi_geometry(data);_3eb.extend(new gm.LatLng(xy.y,xy.x));});}}map.whenLoaded(function(){if(opt.noFit){map.setCenter(_3eb.getCenter());if(opt.zoom!==null){map.setZoom(opt.zoom);}}else{AG.set_bbox(map,_3eb,opt.padding,alp.at(opt,["maxZoom"]));}});});}};_3e3.getSize||(_3e3.getSize=function(){var map=this,ret,div,b;div=alp.m(map,"getDiv");if(div){b=dojo.contentBox(div);ret=new google.maps.Size(b.w,b.h);}if(!ret){console.error("alp._gmap_2_3: getSize() failed on map:",map);}return ret;});_3e3.getWorldBounds=_3ed;function _3ed(){var _3ee=this.getBounds(),_3ef=alp.at(this.getSize(),"width");if(!(_3ef>0)){return _3ee;}var z=this.getZoom(),gm=google.maps;if((_3ef>>z)>255){var eps=1e-10;return new gm.LatLngBounds(new gm.LatLng(_3ee.getSouthWest().lat(),-180+eps),new gm.LatLng(_3ee.getNorthEast().lat(),+180-eps));}return _3ee;};_3e3.isLoaded||(_3e3.isLoaded=function(){var m="getBounds";if(m in this){return this[m]();}});_3e3.setOptions||(_3e3.setOptions=function(o){var me=this;var s="disableDoubleClickZoom",s1="disableDoubleClickZoom",s2="enableDoubleClickZoom";if(s in o&&me[s1]&&me[s2]){if(o[s]){me[s1]();}else{me[s2]();}}});_3e3.whenLoaded=function(_3f0){var map=this,f=dojo.hitch.apply(dojo,arguments),g=function(){f();};if(map._alp&&map._alp.init_cb){map._alp.init_cb(g);}else{alp.util.getDfrd(function(){return map.isLoaded()||undefined;}).then(g);}};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.projection"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.projection"]=true);dojo.provide("alp._gmap2_3.projection");(function(){var AG=alp._gmap2_3,_3f1=function(){var ret=new google.maps.LatLng(0,0);return (_3f1=function(){return ret;})();};AG.equalProjection=function(_3f2,_3f3){if(!(_3f2&&_3f3)){return false;}if(_3f2===_3f3){return true;}var gm=google.maps,p00=_3f1(),v2="fromLatLngToPixel",v3="fromLatLngToPoint";if(_3f2[v3]&&_3f3[v3]){return alp.m(_3f2[v3](p00),"equals",_3f3[v3](p00));}if(_3f2[v2]&&_3f3[v2]){return alp.m(_3f2[v2](p00,0),"equals",_3f3[v2](p00,0));}};AG.isProjection=function(p){var v2pc=dojo.getObject("GProjection");if(p&&v2pc&&(p instanceof v2pc)){return true;}return p&&(typeof p.fromLatLngToPoint==="function")&&(typeof p.fromPointToLatLng==="function");};AG.fromContainerPixelToLatLng=function(map,_3f4){var m="fromContainerPixelToLatLng";if(map[m]){return map[m](_3f4);}var div=map.getDiv(),proj=map.getProjection(),z=map.getZoom(),b=map.getBounds();if(!(div&&proj&&z!=null&&b)){return;}var ne=b.getNorthEast(),sw=b.getSouthWest(),gm=google.maps,_3f5=AG.fromLatLngToPixel(proj,new gm.LatLng(ne.lat(),sw.lng()),z);return AG.fromPixelToLatLng(proj,new gm.Point(_3f5.x+_3f4.x,_3f5.y+_3f4.y),z);};AG.fromLatLngToContainerPixel=function(map,_3f6){var m="fromLatLngToContainerPixel";if(map[m]){return map[m](_3f6);}var div=map.getDiv(),proj=map.getProjection(),z=map.getZoom(),b=map.getBounds();if(!(div&&proj&&z!=null&&b)){return;}var ne=b.getNorthEast(),sw=b.getSouthWest(),gm=google.maps,_3f7=AG.fromLatLngToPixel(proj,new gm.LatLng(ne.lat(),sw.lng()),z),pix=AG.fromLatLngToPixel(proj,_3f6,z);return new gm.Point(pix.x-_3f7.x,pix.y-_3f7.y);};AG.fromLatLngToDivPixel=function(map,_3f8){var m="fromLatLngToDivPixel";if(map[m]){return map[m](_3f8);}throw new Error("alp._gmap2_3.fromLatLngToDivPixel() not implemented yet for V3! For OverlayView, consider using MapCanvasProjection's fromLatLngToDivPixel");};AG.fromLatLngToPixel=function(proj,_3f9,zoom){var gm=google.maps,v2=proj.fromLatLngToPixel&&proj.fromLatLngToPixel(_3f9,zoom);if(v2){return v2;}var v3=proj.fromLatLngToPoint&&proj.fromLatLngToPoint(_3f9);if(v3){var p00=(proj._alp_p00||(proj._alp_p00=proj.fromLatLngToPoint(_3f1()))),_3fa=p00&&(p00.x<<1),_3fb=p00&&(p00.y<<1),ww=AG.getWrapWidth(proj,zoom);if(v3&&_3fa&&_3fb&&ww){return new gm.Point(Math.round(v3.x/_3fa*ww),Math.round(v3.y/_3fb*ww));}}};AG.fromLatLngToPoint=function(proj,_3fc){var m3="fromLatLngToPoint";if(proj[m3]){return proj[m3](_3fc);}var m2="fromLatLngToPixel";if(proj[m2]){var z=30,c0=proj[m2](_3f1(),0),c30=proj[m2](_3f1(),z),p30=proj[m2](_3fc,z);return new google.maps.Point(p30.x/c30.x*c0.x,p30.y/c30.y*c0.y);}};AG.fromLatLngToUnitPoint=function(proj,_3fd){var c=AG.fromLatLngToPoint(proj,_3f1()),p=AG.fromLatLngToPoint(proj,_3fd);return new google.maps.Point(p.x/c.x/2,p.y/c.y/2);};AG.fromPixelToLatLng=function(proj,_3fe,z){var m2,m3,ww,c0,gm=google.maps;m2="fromPixelToLatLng";if(m2 in proj){return proj[m2](_3fe,z);}m3="fromPointToLatLng";if(m3 in proj){ww=AG.getWrapWidth(proj,z);c0=alp.m(proj,"fromLatLngToPoint",_3f1())||new gm.Point(128,128);return proj[m3](new gm.Point(_3fe.x/ww*2*c0.x,_3fe.y/ww*2*c0.y));}};AG.getProjection=function(map){return alp.m(map,"getProjection")||alp.m(alp.m(map,"getCurrentMapType"),"getProjection");};AG.getProjectionDfrd=function(map){var ret=new alp.util.SafeDeferred(),p=AG.getProjection(map),_3ff=function(){var p=AG.getProjection(map);if(p){ret.callback(p);}else{alp.util.getDfrd(function(){return AG.getProjection(map)||undefined;}).then(ret,"callback");}};if(p){ret.callback(p);}else{if(map.getProjection&&AG.V3()){AG.event("addListener")(map,"projection_changed",function(){_3ff();});}else{_3ff();}}return ret;};AG.getWrapWidth=function(proj,zoom){var o=(proj._alpWW||(proj._alpWW={})),ww=o[zoom]||(o[zoom]=(proj.getWrapWidth&&proj.getWrapWidth(zoom))||(1<<(zoom+8)));return ww;};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.bounds2zoomcenter"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.bounds2zoomcenter"]=true);dojo.provide("alp._gmap2_3.bounds2zoomcenter");(function(){var AG=alp._gmap2_3,gm=google.maps,_400=new gm.MercatorProjection(31),_401=dojun.lambda("!=null");alp._gmap2_3.bounds2zoomcenter=function(_402,wh,opts){opts=dojo.mixin({proj:_400,maxZoom:15,minZoom:0,padding:0.1},dojun.filterIn(opts,_401));var _403={zoom:(opts.minZoom+opts.maxZoom)>>1,center:_402.getCenter()};var _404,_405,node,cb;if(typeof wh==="string"){node=dojo.byId(wh)||dojo.query(wh)[0];cb=dojo.contentBox(node);}else{if(!alp.util.is_not_dom_node(wh)){wh=dojo.contentBox(wh);}}_404=(cb||wh).w;_405=(cb||wh).h;if(!((_404>0)&&(_405>0))){console.error("alp._gmap2_3.bounds2zoom() requires mapWidth > 0 && mapHeight > 0  "+"(given values: mapWidth: "+_404+", mapHeight: "+_405+")");_404=600;_405=600;console.error("alp._gmap2_3.bounds2zoom(): falling back on mapWidth:"+_404+", mapHeight:"+_405);}var proj=opts.proj,w0=_404,h0=_405,pad=opts.padding,left,_406,top,_407,s2n=function(s){var p=s.match(/^([\-\+\d]+)px$/i);return (p&&p[1])>>0;},left,_406,top,_407;left=_406=top=_407=0;if(typeof pad==="number"){left=_406=w0*pad;top=_407=h0*pad;}else{if(typeof pad==="string"){left=_406=top=_407=s2n(pad);}else{if(typeof pad==="object"){var v=pad.left,t=typeof v;if(t==="number"){left=w0*v;}else{if(t==="string"){left=s2n(v);}}var v=pad.right,t=typeof v;if(t==="number"){_406=w0*v;}else{if(t==="string"){_406=s2n(v);}}var v=pad.top,t=typeof v;if(t==="number"){top=h0*v;}else{if(t==="string"){top=s2n(v);}}var v=pad.bottom,t=typeof v;if(t==="number"){_407=h0*v;}else{if(t==="string"){_407=s2n(v);}}}}}var w=w0-left-_406,h=h0-top-_407;if(w<1){console.error("alp._gmap2_3.bounds2zoomcenter: left padding + right padding >= mapWidth!",left,_406,w0);return _403;}if(h<1){console.error("alp._gmap2_3.bounds2zoomcenter: top padding + bottom padding >= mapHeight!",top,_407,h0);return _403;}var sw=_402.getSouthWest(),ne=_402.getNorthEast(),_408=opts.maxZoom,_409=opts.minZoom,_40a=w>>1,_40b=h>>1;for(var z=_408;z>=_409;z--){var pc,psw,pne,b;_40c();var _40d,_40e,_40f,_410,_411,_412;fit();if(_412.containsBounds(_402)){return {zoom:z,center:_410};}}return _403;function _40c(){psw=AG.fromLatLngToPixel(proj,sw,z);pne=AG.fromLatLngToPixel(proj,ne,z);pc=new gm.Point((psw.x+pne.x)/2,(psw.y+pne.y)/2);};function fit(){var tol=2;_40d=new gm.Point(pc.x-_40a-left-tol,pc.y+_40b+_407+tol);_40e=new gm.Point(pc.x+_40a+_406+tol,pc.y-_40b-top-tol);_40f=new gm.LatLngBounds(AG.fromPixelToLatLng(proj,_40d,z),AG.fromPixelToLatLng(proj,_40e,z));_410=_40f.getCenter();_411=new gm.Point((_40d.x+_40e.x)/2,(_40d.y+_40e.y)/2);var _413=new gm.Point(pc.x-_40a-tol,pc.y+_40b+tol),_414=new gm.Point(pc.x+_40a+tol,pc.y-_40b-tol);_412=new gm.LatLngBounds(AG.fromPixelToLatLng(proj,_413,z),AG.fromPixelToLatLng(proj,_414,z));};};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.bbox"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.bbox"]=true);dojo.provide("alp._gmap2_3.bbox");(function(){var AG=alp._gmap2_3,_415=15;AG.set_bbox=function(map,bbox,_416,opts){var gm=google.maps;opts=dojo.mixin({maxZoom:_415},opts);if(!map.isLoaded()&&!(opts&&opts.now)){map.whenLoaded.apply(map,[AG,"set_bbox"].concat([].slice.call(arguments)));return;}if(typeof bbox==="string"){bbox=dojo.map(bbox.split(","),function(x){return x*1;});}if(bbox instanceof gm.LatLngBounds){var sw=bbox.getSouthWest(),ne=bbox.getNorthEast();bbox=[sw.lng(),sw.lat(),ne.lng(),ne.lat()];}var o,c,z,_417;if(bbox.length===3){o={zoom:bbox[2]>>0};c=new gm.LatLng(parseFloat(bbox[1]),parseFloat(bbox[0]));if(_416){console.error("alp._gmap2_3.set_bbox() ignores `padding` because bbox = [ x, y, z ].");}}else{o=AG.bbox_2_bounds_zc(map,bbox,_416,opts);c=o.center;}z=o&&o.zoom;_417=o&&o.bounds;if(alp.util.isFiniteNumber(opts.maxZoom)){z=Math.min(z,opts.maxZoom);}if(c&&typeof z==="number"){alp.util.conlog("alp._gmap2_3.set_bbox() bbox:",bbox," -> about to setCenter to:",c,z);map.setCenter(c);map.setZoom(z);alp.util.conlog("alp._gmap2_3.set_bbox() just did setCenter to:",c,z);}else{if(_417&&map.fitBounds){map.fitBounds(_417);}else{if(c){map.setCenter(c);}else{console.error("alp._gmap2_3.set_bbox() failed on args:",arguments);}}}};var _418;AG.bbox_2_bounds_zc=function(map,bbox,_419,opts){var gm=google.maps;opts=dojo.mixin({maxZoom:_415},opts);var p0,p1,_41a,p,c,s,sw,ne;p0=new gm.LatLng(parseFloat(bbox[1]),parseFloat(bbox[0]));p1=new gm.LatLng(parseFloat(bbox[3]),parseFloat(bbox[2]));_41a=new gm.LatLngBounds(p0,p1);var _41b=AG.bounds_isPoint(_41a);var node=alp.m(map,"getDiv")||alp.m(map,"getContainer"),o=AG.bounds2zoomcenter(_41a,node,{maxZoom:opts.maxZoom,padding:_419}),_41c=o.center,z=o.zoom;var _41d,_41e;var cmt=alp.m(map,"getCurrentMapType");_41d=alp.m(cmt,"getMinimumResolution");_41e=alp.m(cmt,"getMaximumResolution");var _41f=map.mapTypes,_420=alp.m(map,"getMapTypeId"),mt=_420&&alp.m(_41f,"get",_420);if(mt){_41d=mt&&mt.minZoom;_41e=mt&&mt.maxZoom;}if(typeof _41d==="number"){z=Math.max(z,_41d);}if(typeof _41e==="number"){z=Math.min(z,_41e);}if(alp.util.isFiniteNumber(opts.maxZoom)){z=Math.min(z,opts.maxZoom);}return {zoom:z,center:_41c,bounds:_41a,bounds_isPoint:_41b};};alp._gmap2_3.bounds_isPoint=function(_421){var span=alp.m(_421,"toSpan");return span&&(Math.max(Math.abs(span.lng()),Math.abs(span.lat()))<1e-10);};_418=function(x){if(typeof x==="string"){x=parseFloat(x);}return alp.util.isFiniteNumber(x)?x:0;};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.gmap._core"]){typeof dojo==="undefined"||(dojo._hasResource["alp.gmap._core"]=true);dojo.provide("alp.gmap._core");alp.gmap.i18n={};alp.later(function(){alp.gmap.i18n=dojo.i18n.getLocalization("alp","gmap");});(function(f){if(typeof GMap!=="undefined"){f.apply(this);}else{dojo["require"]("alp.google");alp.gmap_asyncdfrd().addCallback(this,f);}})(function(){var AG=alp._gmap2_3;alp.gmap.fromLatLngToContainerPixel=function(map,bbox,_422){dojo.deprecated("alp.gmap.fromLatLngToContainerPixel()","use GMap2::fromLatLngToContainerPixel()");return map.fromLatLngToContainerPixel();};alp.gmap.set_bbox=AG.set_bbox;alp.gmap.bbox_2_bounds_z=AG.bbox_2_bounds_z;alp.gmap.bounds_isPoint=AG.bounds_isPoint;alp.gmap.tilesLoadedDfrd=function(_423,_424){if(_424=null){_424=6;}return alp.util.getDfrd(function(){if(!(this.gmap&&this.gmap.isLoaded())){return;}var _425=this.gmap.getContainer();if(!_425){return;}var a,arr=[],MIN=_424,q,ret,url;q=dojo.query("img",_425);for(a=0;(a<q.length)&&(arr.length<MIN);a++){url=alp.util.attr(q[a],"src");if(dojo.indexOf(arr,url)<0){arr.push(url);}}ret=((arr.length>=MIN)&&this.gmap)||undefined;alp.util.conlog("alp.gmap.tilesLoadedDfrd(): waiting for map tiles -> returning:",ret);return ret;},_423,333);};alp.gmap.tilesLoaded_cb_gen=function(_426,_427){return alp.util.dfrd_cb(alp.gmap.tilesLoadedDfrd(_426,_427));};});}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.geojson"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.geojson"]=true);dojo.provide("alp._gmap2_3.geojson");(function(){var AGG=alp._gmap2_3.geojson;AGG.GEOMETRY_TYPES_SIMPLE=["Point","LineString","Polygon"];AGG.GEOMETRY_TYPE_MAP_SIMPLE={};dojo.forEach(AGG.GEOMETRY_TYPES_SIMPLE,function(t){AGG.GEOMETRY_TYPE_MAP_SIMPLE[t.toUpperCase()]=t;});var _428=["MultiPoint","MultiLineString","MultiPolygon"];AGG.GEOMETRY_TYPES=AGG.GEOMETRY_TYPES_SIMPLE.concat(_428);AGG.GEOMETRY_TYPE_MAP=dojo.clone(AGG.GEOMETRY_TYPE_MAP_SIMPLE);dojo.forEach(_428,function(t){AGG.GEOMETRY_TYPE_MAP[t.toUpperCase()]=t;});dojo.mixin(AGG,{toGeoJSON:_429,fromGeoJSON:_42a});function _429(_42b,_42c){if(!_42c){return null;}var gt=this.GEOMETRY_TYPE_MAP[_42b.toUpperCase()];var _42d;switch(gt){case "Point":case "LineString":case "Polygon":_42d=_42e(gt,_42c);break;case "MultiPoint":case "MultiLineString":case "MultiPolygon":var gLen=_42c.length;_42d=new Array(gLen);var _42f=gt.slice(5);for(var i=0;i<gLen;i++){_42d[i]=_42e(_42f,_42c[i]);}break;case "GeometryCollection":case "Feature":case "FeatureCollection":throw "alp.gmap.toGeoJSON: No support for "+_42b;default:throw "alp.gmap.toGeoJSON: Unknown Geometry type: "+_42b;}var _430={type:gt,coordinates:_42d};return _430;};function _42a(_431,_432){if(_431.crs){console.warn("alp.gmap.fromGeoJSON: No support for Coordinate Reference Systems except EPSG:4326. Ignoring CRS...");}var _433=_431.coordinates;var gt=(_432||_431.type).toUpperCase();switch(gt){case "POINT":case "LINESTRING":case "POLYGON":return _434(gt,_433);case "MULTIPOINT":case "MULTILINESTRING":case "MULTIPOLYGON":var gLen=_433.length;var _435=new Array(gLen);var _436=gt.slice(5);for(var i=0;i<gLen;i++){_435[i]=_434(_436,_433[i]);}return _435;case "GEOMETRYCOLLECTION":case "FEATURE":case "FEATURECOLLECTION":throw "alp.gmap.fromGeoJSON: No support for "+gt;default:throw "alp.gmap.fromGeoJSON: Unknown Geometry type: "+gt;}};function _42e(_437,_438){if(!_438){return null;}switch(_437){case "Point":return [_438.lng(),_438.lat()];case "LineString":case "Polygon":var vLen;var _439;if(dojo.isArray(_438)){_439=_438;vLen=_439.length;}else{vLen=_438.getVertexCount();_439=new Array(vLen);for(var i=0;i<vLen;i++){_439[i]=_438.getVertex(i);}}var _43a=new Array(vLen);for(var j=0;j<vLen;j++){var ll=_439[j];_43a[j]=[ll.lng(),ll.lat()];}if(_437=="Polygon"){return [_43a];}else{return _43a;}default:throw "alp.gmap.toGeoJSON: Unknown simple geometry type: "+_437;}};function _434(_43b,_43c){switch(_43b.toUpperCase()){case "POINT":return _43d(_43c);case "POLYGON":if(_43c.length>1){console.warn("alp.gmap.fromGeoJSON: No support for Polygon interior rings. geotype:",_43b,", coords:",_43c);}return _43e(_43c[0]);case "LINESTRING":return _43e(_43c);default:throw "alp.gmap.fromGeoJSON: Unknown simple geometry type: "+_43b;}};function _43d(_43f){return new google.maps.LatLng(_43f[1],_43f[0]);};function _43e(_440){var cLen=_440.length;var _441=new Array(cLen);for(var i=0;i<cLen;i++){_441[i]=_43d(_440[i]);}return _441;};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.gmap._geojson"]){typeof dojo==="undefined"||(dojo._hasResource["alp.gmap._geojson"]=true);dojo.provide("alp.gmap._geojson");(function(f){if(typeof GMap!=="undefined"){f.apply(this);}else{dojo["require"]("alp.google");alp.gmap_asyncdfrd().addCallback(this,f);}})(function(){dojo.mixin(alp.gmap,alp._gmap2_3.geojson);});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.gmap"]){typeof dojo==="undefined"||(dojo._hasResource["alp.gmap"]=true);dojo.provide("alp.gmap");}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.rx"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.rx"]=true);dojo.provide("alp.util.rx");(function(){alp.util.rx.scan_rx=function scan_rx(s,rx){var _442=rx.source;var _443="";if(rx.global){_443+="g";}if(rx.ignoreCase){_443+="i";}if(rx.multiline){_443+="m";}return alp.util.rx.scan(s,_442,_443);};alp.util.rx.scan=function scan(s,_444,_445){var a,da,arr,_446,rx;arr=[];(function(){var tmp=s;a=0;while(true){rx=new RegExp(_444,_445);_446=rx.exec(tmp);if(!_446){break;}var _447=_446.index+_446[0].length;arr.push([a+_447,_446]);da=Math.max(1,_447);a+=da;tmp=tmp.substr(da);}})();return arr;};alp.util.rx.map_groups=function map_groups(s,_448,fun){return alp.util.rx.map(s,_448,function(_449,_44a){var _44b=_449;for(var a=0;a<_44a.length;a++){if(!_44a[a]){continue;}_44b=fun(_44b,_44a[a]);}return _44b;});};alp.util.rx.map=function map(s,_44c,fun){var info,_44d,_44e,_44f,_450,_451,s2,str;if(_44c instanceof RegExp){_44c=alp.util.rx.scan_rx(s,_44c);}s2=s;for(var ind=_44c.length-1;ind>=0;ind--){info=_44c[ind];_44f=info[0];_451=info[1];str=_451[0];_450=_451.slice(1);_44e=_44f-str.length;_44d=fun(str,_450);s2=s2.substring(0,_44e)+_44d+s2.substring(_44f);}return s2;};})();}if(typeof dojo==="undefined"||!dojo._hasResource["dojox.html._base"]){typeof dojo==="undefined"||(dojo._hasResource["dojox.html._base"]=true);dojo.provide("dojox.html._base");(function(){if(dojo.isIE){var _452=/(AlphaImageLoader\([^)]*?src=(['"]))(?![a-z]+:|\/)([^\r\n;}]+?)(\2[^)]*\)\s*[;}]?)/g;}var _453=/(?:(?:@import\s*(['"])(?![a-z]+:|\/)([^\r\n;{]+?)\1)|url\(\s*(['"]?)(?![a-z]+:|\/)([^\r\n;]+?)\3\s*\))([a-z, \s]*[;}]?)/g;var _454=dojox.html._adjustCssPaths=function(_455,_456){if(!_456||!_455){return;}if(_452){_456=_456.replace(_452,function(_457,pre,_458,url,post){return pre+(new dojo._Url(_455,"./"+url).toString())+post;});}return _456.replace(_453,function(_459,_45a,_45b,_45c,_45d,_45e){if(_45b){return "@import \""+(new dojo._Url(_455,"./"+_45b).toString())+"\""+_45e;}else{return "url("+(new dojo._Url(_455,"./"+_45d).toString())+")"+_45e;}});};var _45f=/(<[a-z][a-z0-9]*\s[^>]*)(?:(href|src)=(['"]?)([^>]*?)\3|style=(['"]?)([^>]*?)\5)([^>]*>)/gi;var _460=dojox.html._adjustHtmlPaths=function(_461,cont){var url=_461||"./";return cont.replace(_45f,function(tag,_462,name,_463,_464,_465,_466,end){return _462+(name?(name+"="+_463+(new dojo._Url(url,_464).toString())+_463):("style="+_465+_454(url,_466)+_465))+end;});};var _467=dojox.html._snarfStyles=function(_468,cont,_469){_469.attributes=[];return cont.replace(/(?:<style([^>]*)>([\s\S]*?)<\/style>|<link\s+(?=[^>]*rel=['"]?stylesheet)([^>]*?href=(['"])([^>]*?)\4[^>\/]*)\/?>)/gi,function(_46a,_46b,_46c,_46d,_46e,href){var i,attr=(_46b||_46d||"").replace(/^\s*([\s\S]*?)\s*$/i,"$1");if(_46c){i=_469.push(_468?_454(_468,_46c):_46c);}else{i=_469.push("@import \""+href+"\";");attr=attr.replace(/\s*(?:rel|href)=(['"])?[^\s]*\1\s*/gi,"");}if(attr){attr=attr.split(/\s+/);var _46f={},tmp;for(var j=0,e=attr.length;j<e;j++){tmp=attr[j].split("=");_46f[tmp[0]]=tmp[1].replace(/^\s*['"]?([\s\S]*?)['"]?\s*$/,"$1");}_469.attributes[i-1]=_46f;}return "";});};var _470=dojox.html._snarfScripts=function(cont,_471){_471.code="";cont=cont.replace(/<[!][-][-](.|\s){5,}?[-][-]>/g,function(_472){return _472.replace(/<(\/?)script\b/ig,"&lt;$1Script");});function _473(src){if(_471.downloadRemote){src=src.replace(/&([a-z0-9#]+);/g,function(m,name){switch(name){case "amp":return "&";case "gt":return ">";case "lt":return "<";default:return name.charAt(0)=="#"?String.fromCharCode(name.substring(1)):"&"+name+";";}});dojo.xhrGet({url:src,sync:true,load:function(code){_471.code+=code+";";},error:_471.errBack});}};return cont.replace(/<script\s*(?![^>]*type=['"]?(?:dojo\/|text\/html\b))(?:[^>]*?(?:src=(['"]?)([^>]*?)\1[^>]*)?)*>([\s\S]*?)<\/script>/gi,function(_474,_475,src,code){if(src){_473(src);}else{_471.code+=code;}return "";});};var _476=dojox.html.evalInGlobal=function(code,_477){_477=_477||dojo.doc.body;var n=_477.ownerDocument.createElement("script");n.type="text/javascript";_477.appendChild(n);n.text=code;};dojo.declare("dojox.html._ContentSetter",[dojo.html._ContentSetter],{adjustPaths:false,referencePath:".",renderStyles:false,executeScripts:false,scriptHasHooks:false,scriptHookReplacement:null,_renderStyles:function(_478){this._styleNodes=[];var st,att,_479,doc=this.node.ownerDocument;var head=doc.getElementsByTagName("head")[0];for(var i=0,e=_478.length;i<e;i++){_479=_478[i];att=_478.attributes[i];st=doc.createElement("style");st.setAttribute("type","text/css");var _47a={};for(var x in att){if(x in _47a){continue;}st.setAttribute(x,att[x]);}this._styleNodes.push(st);head.appendChild(st);if(st.styleSheet){st.styleSheet.cssText=_479;}else{st.appendChild(doc.createTextNode(_479));}}},empty:function(){this.inherited("empty",arguments);this._styles=[];},onBegin:function(){this.inherited("onBegin",arguments);var cont=this.content,node=this.node;var _47b=this._styles;if(dojo.isString(cont)){if(this.adjustPaths&&this.referencePath){cont=_460(this.referencePath,cont);}if(this.renderStyles||this.cleanContent){cont=_467(this.referencePath,cont,_47b);}if(this.executeScripts){var _47c=this;var _47d={downloadRemote:true,errBack:function(e){_47c._onError.call(_47c,"Exec","Error downloading remote script in \""+_47c.id+"\"",e);}};cont=_470(cont,_47d);this._code=_47d.code;}}this.content=cont;},onEnd:function(){var code=this._code,_47e=this._styles;if(this._styleNodes&&this._styleNodes.length){while(this._styleNodes.length){dojo.destroy(this._styleNodes.pop());}}if(this.renderStyles&&_47e&&_47e.length){this._renderStyles(_47e);}if(this.executeScripts&&code){if(this.cleanContent){code=code.replace(/(<!--|(?:\/\/)?-->|<!\[CDATA\[|\]\]>)/g,"");}if(this.scriptHasHooks){code=code.replace(/_container_(?!\s*=[^=])/g,this.scriptHookReplacement);}try{_476(code,this.node);}catch(e){this._onError("Exec","Error eval script in "+this.id+", "+e.message,e);}}this.inherited("onEnd",arguments);},tearDown:function(){this.inherited(arguments);delete this._styles;if(this._styleNodes&&this._styleNodes.length){while(this._styleNodes.length){dojo.destroy(this._styleNodes.pop());}}delete this._styleNodes;dojo.mixin(this,dojo.getObject(this.declaredClass).prototype);}});dojox.html.set=function(node,cont,_47f){if(!_47f){return dojo.html._setNodeContent(node,cont,true);}else{var op=new dojox.html._ContentSetter(dojo.mixin(_47f,{content:cont,node:node}));return op.set();}};})();}if(typeof dojo==="undefined"||!dojo._hasResource["dojox.html"]){typeof dojo==="undefined"||(dojo._hasResource["dojox.html"]=true);dojo.provide("dojox.html");}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.html"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.html"]=true);dojo.provide("alp.util.html");alp.util.createTextNode=function(_480,_481,_482){if(typeof _480==="string"){var ret=document.createTextNode(_480);if(_481){dojo.place(ret,_481,_482);}return ret;}if(typeof _480==="object"){return alp.util.createTextNode(function(){return dojo.getObject.apply(dojo,_480);},_481,_482);}var ret=document.createTextNode("");alp.util.setTextDataAsync(ret,_480);if(_481){dojo.place(ret,_481,_482);}return ret;};alp.util.empty=function(node){if(!node){return;}var c;while(c=node.lastChild){node.removeChild(c);}return node;};alp.util.html_tmpl=function(_483,data,rx){var t,_484=typeof _483;if(_484==="function"){return _483(data);}else{if(_484==="string"){t=_483;}else{if(_484==="object"){t=_483.innerHTML;}else{console.error("alp.util.htmltmpl(): invalid typeof template: "+_484);}}}rx=rx||/__(.*?)__/;return alp.util.rx.map_groups(t,rx,function(_485,_486){if(!_486){return _485;}var f=new Function("data",dojo.global.unescape("return "+_486+";"));try{return f(data);}catch(e){console.warn("alp.util.html_tmpl() caught e when replacing \""+_485+"\" with \""+_486+"\"");console.warn("alp.util.html_tmpl() exception e:",e);return "";}});};alp.util.new_id=function(opts){opts||(opts={prefix:""});while(true){var id=opts.prefix+""+Math.round(Math.random()*10000000000)+"_"+(new Date()>>0);if(!dojo.byId(id)){return id;}}};alp.util.node_show=function(node){var ns=node.style,_487=(ns.display==="none"),_488=(ns.visibility==="hidden"),_489=_487&&_488;if(!_489){if(window.getComputedStyle){var s=window.getComputedStyle(node,"");if(s){_487=_487||s.display==="none";_488=_488||s.visibility==="hidden";}}else{var s=node.currentStyle;if(s){_487=_487||s["display"]==="none";_488=_488||s["visibility"]==="hidden";}}}if(_487){ns.display="";}if(_488){ns.visibility="visible";}};alp.util.setNodeText=function(node,text){if(typeof node==="string"){node=dojo.query(node);}if(text===undefined){text="";}if(alp.util.isNodeList(node)){return node.map(function(node){return alp.util.setNodeText(node,text);});}alp.util.empty(node);node.appendChild(document.createTextNode(""+text));return node;};alp.util.setNodeTextAsync=function(node,_48a,_48b){_48b||(_48b=new alp.util.SafeDeferred());if(typeof _48a!=="function"){alp.util.setNodeText(node,_48a);_48b.done();}else{var text=_48a();if(text!=null){alp.util.setNodeText(node,text);_48b.done();}else{alp.util.asyncHitch("setNodeTextAsync",alp.util,150)(node,_48a,_48b);}}return _48b;};alp.util.setTextDataAsync=function(node,_48c){var text=_48c();if(text){node.data=text;return;}alp.util.asyncHitch("setTextDataAsync",alp.util,150)(node,_48c);};alp.util.try_to_forbid_text_selection=function(x){if(typeof x==="string"){x=dojo.query(x);}if(alp.util.isNodeList(x)){x.forEach(function(node){alp.util.try_to_forbid_text_selection(node);});return x;}var s1="onselectstart",s2="onmousedown";dojo.forEach([s1,s2],function(s){try{x[s]=function(){return false;};}catch(e){}});return x;};}if(typeof dojo==="undefined"||!dojo._hasResource["alp.iw"]){typeof dojo==="undefined"||(dojo._hasResource["alp.iw"]=true);dojo.provide("alp.iw");alp.iw.ensure_css=function(){alp.util.add_css(alp.cfg.css.map_iw());alp.iw.ensure_css=function(){};};alp.iw.html=function(_48d,opts){var _48e=_48d.maintype||"ooi",data=_48d.data,_48f=opts&&opts.tmpl,tmpl=(_48f&&_48f[_48e])||alp.cfg.iw_tmpl()[_48e]||(_48f&&_48f["ooi"])||alp.cfg.iw_tmpl()["ooi"];return tmpl&&alp.util.html_tmpl(tmpl,data);};}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.mapany"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.mapany"]=true);dojo.provide("alp.util.mapany");(function(){alp.util.mapany=_490;alp.util.is_mapany=_491;var _492={eq:null,clear:_493,filter:_494,forEach:_495,has:_496,indexOf:_497,get:_498,keys:_499,values:_49a,map:_49b,set:_49c,del:_49d,changed:_49e};function _490(init,eq){var ret=dojo.mixin([],_492);var n=init&&init.length;if(n){for(var a=0;a<n;a++){var x=init[a];if(x){ret.set(x[0],x[1]);}}}if(eq){ret.eq=eq;}return ret;};function _491(o){return o&&(o.is_mapany===_491);};var _49f;function _493(){this.length=0;};function _494(){var f=arguments.length?dojo.hitch.apply(dojo,arguments):alp.id_f,ret=[];this.forEach(function(v,k,ind){if(f(v,k,ind)){ret.push(k);}});return ret;};function _495(){var f=dojo.hitch.apply(dojo,arguments);dojo.forEach(this,function(x,ind){f(x[1],x[0],ind);},this);};function _496(k){return -1<this.indexOf(k);};function _497(k){if(this.eq){for(var a=this.length;a--;){var x=this[a];if(this.eq(x[0],k)){return a;}}}else{for(var a=this.length;a--;){var x=this[a];if(x[0]===k){return a;}}}return -1;};function _498(k){var ind=this.indexOf(k);return (ind<0)?null:this[ind][1];};function _499(){var n=this.length,ret=new Array(n);while(n--){ret[n]=this[n][0];}return ret;};function _49a(){var n=this.length,ret=new Array(n);while(n--){ret[n]=this[n][1];}return ret;};function _49b(){var f=dojo.hitch.apply(dojo,arguments),ret=[];this.forEach(function(v,k,ind){ret.push(f(v,k,ind));});return ret;};function _49c(k,v){var ind=this.indexOf(k);if(ind>-1){if(this.eq?this.eq(this[ind][1],v):(this[ind][1]===v)){return v;}this.splice(ind,1);}this.push([k,v]);_49f.call(this,k);return v;};function _49d(k){var ind=this.indexOf(k);if(ind<0){return;}var x=this.splice(ind,1)[0];_49f.call(this);return x[1];};function _49e(k){};_49f=alp.util.asyncHitch("changed");})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.iw"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.iw"]=true);dojo.provide("alp._gmap2_3.iw");(function(){var AG=alp._gmap2_3,_4a0=alp.cfg.ooi(),_4a1={};AG.iw2_alpha_url=function(){return alp.util.absUrlString("alp.gmap.resources","images/iw2_0_85.png");};AG.iwCloseAll=function(map){var m="closeInfoWindow";if(map[m]){map[m]();}else{alp.m("google.maps.InfoWindow","closeAll",map);}};AG.iw_domnode_geomconnect=function(_4a2,_4a3,_4a4){var db=alp.db.common();if(typeof _4a2==="string"){_4a2=alp.util.domnode(_4a2);}if(typeof _4a3!=="function"){_4a3=alp.util.asyncHitch.apply(alp.util,_4a3);}if(typeof _4a4!=="function"){_4a4=alp.util.asyncHitch.apply(alp.util,_4a4);}dojo.query(".quicktourdesc-clusteriw",_4a2).concat(dojo.query("."+AG.IW_CLASS(),_4a2)).forEach(function(node){try{var id,_4a5,_4a6,_4a7,_4a8,geom,v;dojo.query(_4a0.id.from,node).forEach(function(node){if(!id){id=alp.util.attr(node,_4a0.id.what);}});if(id&&!/^[\-\+\d]{2,}$/.test(id)){console.error("alp._gmap2_3.iw_domnode_geomconnect(): invalid id:",id);id=null;}dojo.query(_4a0.externalSystem.from,node).forEach(function(node){if(!_4a5){_4a5=alp.util.attr(node,_4a0.externalSystem.what);}});dojo.query(_4a0.externalId.from,node).forEach(function(node){if(!_4a6){_4a6=alp.util.attr(node,_4a0.externalId.what);}});if(_4a5&&_4a6){if(_4a5==="null"||_4a6==="null"){_4a7={};}else{_4a7={externalSystem:_4a5,externalId:_4a6};}}if(!id){return;}_4a8=db.getset(id+".maintype");if(!_4a8){dojo.query(_4a0.maintype.from,node).forEach(function(node){if(_4a8){return;}_4a8=alp.util.attr(node,_4a0.maintype.what);if(!_4a8){return;}db.getset(id+".maintype",_4a8);});}if(_4a8==="tour"){geom=_4a1[id];if(!geom){v=db.getset(id+".geometry");if(!v){dojo.query(_4a0.geometry.from,node).forEach(function(node){if(v){return;}v=alp.util.attr(node,_4a0.geometry.what);if(!v){return;}db.getset(id+".geometry",v);});}geom=v&&dojo.fromJson(v);}}if(dojo.query(".js-no-tablink",node.parentNode||_4a2).length<1){if(_4a3){dojo.connect(node,"onclick",dojo.partial(_4a3,id,true,_4a7));}}if(geom){_4a1[id]=geom;if(_4a4){dojo.connect(node,"onmouseover",dojo.partial(_4a4,id,true,_4a7));}}}catch(e){console.error("alp._gmap2_3.iw_domnode_geomconnect() caught an error while parsing the IW snippet",e,node);}});return _4a2;};AG.iwOpen=function(gmap,_4a9,_4aa,opts){if(!gmap){return;}if(!(opts&&opts.iwMulti)){AG.iwCloseAll(gmap);}var node=_4aa;if(typeof node==="string"){node=alp.util.domnode(node);}var _4ab=false,gm=google.maps;var v2_m="openInfoWindowHtml";if(gmap[v2_m]){gmap.openInfoWindowHtml(_4a9,node,opts);_4ab=true;}var v3_c="InfoWindow";if(gm[v3_c]){var iw=new gm[v3_c]({content:node,position:_4a9});AG.event("addListener")(iw,"domready",function(){});iw.open(gmap);_4ab=true;}AG.iwOpen._lastNode=node;AG.iwOpen._lastLatLng=_4a9;if(_4ab&&opts&&opts.opacity){AG.iw_get_parentnode(node).then(function(_4ac){alp.util.domopacity(_4ac,opts.opacity);});}return iw;};AG.iwOpen.isLastVisible=function(){return this._lastNode&&!alp.util.is_dom_node_invisible(this._lastNode);};AG.iwOpen.lastLatLng=function(){return this._lastLatLng;};AG.iwOpenOOI=function(map,id,opts){var gm=google.maps;if(!(opts&&opts.show)){_4ad();return;}var ret=new AG.TourPoiLayer(id,dojo.delegate({fitTourBounds:false},opts&&opts.tourPoiLayerOpts));ret.setMap(map);ret.whenLoaded(_4ad);return ret;function _4ad(){var ooi=new alp.data.SingleOOI(id);ooi.load(function(data,_4ae){var _4af=new gm.LatLng(_4ae.y,_4ae.x),html=alp.iw.html(data,{tmpl:opts&&opts.html_tmpl}),node=dojo.create("div",{innerHTML:html});alp.util.install_delayed_img(".js-template-img",node,0);alp.iw.ensure_css();AG.iwOpen(map,_4af,node,opts);if(opts&&opts.fit){map.fitOOI(id,{iw:true});}});};};AG.IW_CLASS=function(){return "js-cv-iw";};AG.IW_PARENTCLASS=function(){return "gmnoprint";};AG.iw_get_parentnode=function(node){var S=AG.IW_PARENTCLASS(),d,_4b0,n,_4b1;d=new alp.util.SafeDeferred();if(!S){return d;}_4b0=function(){var ret=node.parentNode;if(!ret){return;}while(!dojo.hasClass(ret,S)){ret=ret.parentNode;if(!ret){return;}}while(dojo.hasClass(ret.parentNode,S)){ret=ret.parentNode;if(!ret){return;}}return ret;};n=0;_4b1=alp.util.asyncHitch(function(){var a=_4b0();if(a){d.callback(a);return;}if(n>1000){return;}n++;_4b1();});_4b1();return d;};var _4b2=dojo.getObject("google.maps.InfoWindow.prototype");if(_4b2){var _4b3=alp.util.mapany(),_4b4;dojo.forEach(["open","close"],function(m){if(!_4b2[m]){return;}var _4b5=_4b2[m];_4b2[m]=function(map){_4b4(this,map);return _4b5.apply(this,arguments);};});google.maps.InfoWindow.closeAll=function(map){var arr=map?[map]:_4b3.keys();dojo.forEach(arr,function(map){var arr2=_4b3.get(map);if(arr2){dojo.forEach(arr2,function(iw){iw.close();});}});};_4b4=function(iw,_4b6){var _4b7=iw._alpMap,arr,ind;if(_4b7){arr=_4b3.get(_4b7);ind=arr&&dojo.indexOf(arr,iw);if(ind>-1){arr.splice(ind,1);}}if(_4b6){arr=_4b3.get(_4b6)||_4b3.set(_4b6,[]);ind=dojo.indexOf(arr,iw);if(ind<0){arr.push(iw);}}iw._alpMap=_4b6;};}})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.gmap.iw"]){typeof dojo==="undefined"||(dojo._hasResource["alp.gmap.iw"]=true);dojo.provide("alp.gmap.iw");(function(f){if(typeof GMap!=="undefined"){f.apply(this);}else{dojo["require"]("alp.google");alp.gmap_asyncdfrd().addCallback(this,f);}})(function(){alp.gmap.openInfoWindow=alp._gmap2_3.iwOpen;alp.gmap.get_iw_parentnode=alp._gmap2_3.iw_get_parentnode;alp.gmap.IW_CLASS=alp._gmap2_3.IW_CLASS();alp.gmap.domnode_geomconnect=alp._gmap2_3.iw_domnode_geomconnect;dojo.forEach(["iwOpen","iwOpenOOI","iwCloseAll"],function(m){alp.gmap[m]=alp._gmap2_3[m];});});}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.view.abstract_map_control"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.view.abstract_map_control"]=true);dojo.provide("alp._gmap2_3.view.abstract_map_control");(function(){var CN="alp._gmap2_3.view.AbstractMapControl",AG=alp._gmap2_3,C=dojo.declare(CN,null,{whenLoc:null,getDiv:function(){throw new Error(CN+".getDiv() must be implemented!");},getPositionV3:function(){return google.maps.ControlPosition.RIGHT_BOTTOM;},getPositionV2:function(){var gm=google.maps;return new gm.ControlPosition(gm.ANCHOR_BOTTOM_RIGHT,new gm.Size(2,16));},alp_create:function(map){},alp_destroy:function(map){},printable:function(){return false;},selectable:function(){return false;},getMap:function(){return this._alpMap;},setMap:function(map){var me=this;if(!me.whenLoc){_4b8();}else{me.whenLoc.then(_4b8);}function _4b8(){var _4b9=me.getMap();if(AG.V2()){alp.m(_4b9,"removeControl",me);me._alpMap=map;if(map){map.addControl(me);}return;}if(_4b9&&_4b9.controls){var _4ba=_4b9.controls[me.getPositionV3()];for(var i=_4ba.getLength();i--;){if(_4ba.getAt(i)===me.getDiv()){_4ba.removeAt(i);}}me.clear();}if(map&&map.controls){me.initialize(map);map.controls[me.getPositionV3()].push(me.getDiv());}};},initialize:function(map){var me=this;me._alpMap=map;if(!me.whenLoc){_4bb();}else{me.whenLoc.then(_4bb);}return me.getDiv();function _4bb(){me.alp_create(me.getMap());if(AG.V2()){map.getDiv().appendChild(me.getDiv());}};},clear:function(){var me=this;if(!me.whenLoc){_4bc();}else{me.whenLoc.then(_4bc);}function _4bc(){if(typeof GControl==="function"){GControl.prototype.clear.apply(me,arguments);var div=me.getDiv();alp.m(div.parentNode,"removeChild",div);}me.alp_destroy(me.getMap());me._alpMap=null;};},getDefaultPosition:function(){return this.getPositionV2();},constructor:function(){if(AG.V2&&google.maps.Control){var o=new GControl(this.printable(),this.selectable());for(var k in o){if(!(k in this)){this[k]=o[k];}}}}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.view.powered_by_oa"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.view.powered_by_oa"]=true);dojo.provide("alp._gmap2_3.view.powered_by_oa");(function(){var AG=alp._gmap2_3,CN="alp._gmap2_3.view.PoweredByOA";dojo.declare(CN,AG.view.AbstractMapControl,{constructor:function(){this._cfg=alp.cfg.button().powered_by_oa;this._div=dojo.create("div");dojo.create("img",dojo.delegate(alp.at(this._cfg,["alt","title","width","url","style"]),{src:this._cfg.url}),dojo.create("a",alp.at(this._cfg,["href","target"]),this._div));},getDiv:function(){return this._div;},getPositionV3:function(){return google.maps.ControlPosition.BOTTOM_LEFT;},getPositionV2:function(){var gm=google.maps;return new gm.ControlPosition(gm.ANCHOR_BOTTOM_LEFT,new gm.Size(65,0));}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.data.orstate"]){typeof dojo==="undefined"||(dojo._hasResource["alp.data.orstate"]=true);dojo.provide("alp.data.orstate");alp.data.orstate=function(){var arr=Array.prototype.slice.apply(arguments),opts={},ret,f;f=dojun.lambda(".get()");opts.constrain_def=opts.constrain_undef=function(){return alp.util.or(arr,f);};ret=new alp.data.BoolState(opts);dojo.forEach(arr,function(bs){bs.entered_cb(ret,"unset");});ret.set();return ret;};}if(typeof dojo==="undefined"||!dojo._hasResource["alp.gearth.button"]){typeof dojo==="undefined"||(dojo._hasResource["alp.gearth.button"]=true);dojo.provide("alp.gearth.button");(function(){var id=function(){id.n=(id.n==null)?0:(++id.n);return "ge_2d_map_button#"+id.n;};alp.gearth.add_button_topright=function(cfg){var ge=cfg.ge,_4bd=cfg.get_view_size,_4be=cfg.icon_url,_4bf=cfg.width,_4c0=cfg.height,_4c1=cfg.right,top=cfg.top,_4c2=cfg.id||id(),ret;var ear;ret={onclick:function(_4c3){return dojo.connect(ear,"click",dojo.hitch.apply(dojo,arguments));},ov_id:function(){return _4c2;}};ear={click:function(){}};var _4c4=ge.createScreenOverlay(_4c2);var icon=ge.createIcon("");icon.setHref(_4be);_4c4.setIcon(icon);_4c4.getOverlayXY().setXUnits(ge.UNITS_INSET_PIXELS);_4c4.getOverlayXY().setYUnits(ge.UNITS_INSET_PIXELS);_4c4.getOverlayXY().setX(_4c1+_4bf/2);_4c4.getOverlayXY().setY(top+_4c0/2);_4c4.getSize().setXUnits(ge.UNITS_PIXELS);_4c4.getSize().setYUnits(ge.UNITS_PIXELS);_4c4.getSize().setX(_4bf);_4c4.getSize().setY(_4c0);google.earth.addEventListener(ge.getWindow(),"mousedown",function(_4c5){var s=_4bd(),s_w=s.width||s.w,cx=_4c5.getClientX(),cy=_4c5.getClientY();if(cx<(s_w-_4c1-_4bf)||cy<top||cx>(s_w-_4c1)||cy>(top+_4c0)){return;}alp.util.asyncHitch("click",ear)();if(_4c5){try{dojo.stopEvent(_4c5);}catch(e){console.error("alp.gearth.add_button_topright: mousedown: could not stopEvent: "+e);}}});ge.getFeatures().appendChild(_4c4);return ret;};})();(function(){var _4c6=alp.util.mapany();alp.gearth.add_2d_map_button=function(ge,_4c7,_4c8){var ret=_4c6.get(ge);if(ret){return ret;}_4c8=dojo.mixin({ge:ge,get_view_size:_4c7,icon_url:alp.util.absUrlString("alp.gearth","images/2d_map_button.png"),width:39,height:38,right:7,top:7},_4c8);ret=alp.gearth.add_button_topright(_4c8);_4c6.set(ge,ret);return ret;};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.gmap.utils"]){typeof dojo==="undefined"||(dojo._hasResource["alp.gmap.utils"]=true);dojo.provide("alp.gmap.utils");(function(f){if(typeof GMap!=="undefined"){f.apply(this);}else{dojo["require"]("alp.google");alp.gmap_asyncdfrd().addCallback(this,f);}})(function(){alp.gmap.getLetterIconUrl=function(_4c9){var _4ca="http://maps.google.com/intl/en_ALL/mapfiles/icon_green${letter}.png";var _4cb=String.fromCharCode(65+_4c9);return _4ca.replace("${letter}",_4cb);};alp.gmap.walkKmlDom=function walkKmlDom(_4cc,_4cd,_4ce){_4ce=_4ce||{};if(!("features" in _4ce)){_4ce.features=true;}if(!("geometries" in _4ce)){_4ce.geometries=false;}var _4cf=function(_4d0,_4d1){var _4d2={current:_4d1,child:_4d1,walkChildren:true};var _4d3=_4cd.call(_4d0,_4d2);if(!_4d3&&typeof _4d3!=="undefined"){return false;}if(!_4d2.walkChildren){return true;}var _4d4=null;if("getFeatures" in _4d0){if(_4ce.features){_4d4=_4d0.getFeatures();}}else{if("getGeometry" in _4d0){if(_4ce.geometries&&_4d0.getGeometry()){_4cf(_4d0.getGeometry(),_4d2.child);}}else{if("getGeometries" in _4d0){if(_4ce.geometries){_4d4=_4d0.getGeometries();}}else{if("getInnerBoundaries" in _4d0){if(_4ce.geometries){_4d4=_4d0.getInnerBoundaries();}}}}}if(_4d4&&_4d4.hasChildNodes()){var _4d5=_4d4.getChildNodes();var _4d6=_4d5.getLength();for(var i=0;i<_4d6;i++){var _4d7=_4d5.item(i);if(!_4cf(_4d7,_4d2.child)){return false;}}}return true;};_4cf(_4cc,_4ce.rootContext);};alp.gmap.fix_right_click_ff_osx=function(gmap){if(typeof GEvent==="undefined"||!dojo.isMac){return;}var s="_alp_right_click_ff_osx";if(s in gmap){return;}var _4d8=gmap.getContainer(),_4d9=0,_4da=0,_4db=0,type="mousedown",_4dc=true,h=alp.m(_4d8,"addEventListener",type,_4dd,_4dc),hg,_4de=false;function _4dd(e){if(!(e&&e.button===2)){return;}alp.util.asyncHitch(_4df,null,1000)(++_4da,++_4d9);if(!_4de){hg=GEvent.addListener(gmap,"singlerightclick",function(){_4de=true;});}};function _4df(i,j){if(_4da>1){_4da-=2;return;}if(_4da!=i||_4d9!==j){return;}_4da--;_4db++;if(_4de){GEvent.removeListener(hg);}else{alp.view.alertdialog.gen({title:alp.gmap.i18n.right_click_ff_osx_issue_title,content:alp.gmap.i18n.right_click_ff_osx_issue_content});if(_4db<5){return;}}alp.m(_4d8,"removeEventListener",type,_4dd,_4dc);};gmap[s]="installed";};});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.gmap.kml_animate"]){typeof dojo==="undefined"||(dojo._hasResource["alp.gmap.kml_animate"]=true);dojo.provide("alp.gmap.kml_animate");(function(f){if(typeof GMap!=="undefined"){f.apply(this);}else{dojo["require"]("alp.google");alp.gmap_asyncdfrd().addCallback(this,f);}})(function(){(function(){var _4e0,_4e1,_4e2;var _4e3={speedfactor:1,autostart:false,starttime_sec:0,tilt_min:60,tilt_max:80};alp.gmap.kml_animate=function(ge,url,opts){opts=dojo.mixin({},_4e3,opts);var _4e4,ret=new alp.util.SafeDeferred();dojo.xhrGet({url:url,handleAs:"text",load:function(text){alp.util.conlog("kml_animate: react on text:",text.substr(0,100),"...");var _4e5=ge.parseKml(_4e0(text,opts));alp.util.conlog("kml_animate: kmlObj:",_4e5);alp.gmap.walkKmlDom(_4e5,function(){if(this.getType()=="KmlTour"){var getp=ge.getTourPlayer();getp.setTour(this);getp.setCurrentTime(Math.max(0,Math.min(getp.getDuration(),opts.starttime_sec)));if(opts.autostart){getp.play();}ret.callback(ge);return false;}});}});return ret;};_4e0=function(text,opts){try{var rx=/\<gx:Playlist\>([\w\W]+?)\<\/gx:Playlist\>/gm;return alp.util.rx.map_groups(text,rx,function(_4e6,_4e7){var ret="<gx:Playlist>"+_4e1(_4e7,opts)+"</gx:Playlist>";return ret;});}catch(e){console.error("alp.gmap.kml_animate: smooth_kml() caught e",e);return text;}};_4e1=function(text,opts){opts=dojo.mixin({},_4e3,opts);var _4e8=Math.max(0,opts.speedfactor)||1;var all=alp.util.rx.scan_rx(text,/\<gx:duration\>([\w\W]+?)\<\/gx:duration\>[\w\W]*?\<longitude\>([\w\W]+?)\<\/longitude\>[\w\W]*?\<latitude\>([\w\W]+?)\<\/latitude\>[\w\W]*?\<tilt\>([\w\W]+?)\<\/tilt\>[\w\W]*?\<heading\>([\w\W]+?)\<\/heading\>/gm);var I={"gx:duration":1,longitude:2,latitude:3,tilt:4,heading:5};var a,N=all.length,arr={"gx:duration":new Array(N),heading:new Array(N),longitude:new Array(N),latitude:new Array(N),tilt:new Array(N)};var s,last,_4e9,n;for(a=0;a<N;a++){var head=parseFloat(all[a][1][I.heading]),lon=parseFloat(all[a][1][I.longitude]),lat=parseFloat(all[a][1][I.latitude]),dur=parseFloat(all[a][1][I["gx:duration"]]),tilt=parseFloat(all[a][1][I.tilt]);if(a<1){arr.heading[a]=head;arr.longitude[a]=lon;arr.latitude[a]=lat;arr.tilt[a]=tilt;continue;}var w=Math.max(0.01,Math.min(0.2,all[a][1][I["gx:duration"]]/30));arr.heading[a]=_4e2(arr.heading[a-1],head,w);arr.longitude[a]=_4e2(arr.longitude[a-1],lon,w);arr.latitude[a]=_4e2(arr.latitude[a-1],lat,w);arr["gx:duration"][a]=dur/_4e8;arr.tilt[a]=Math.max(opts.tilt_min,Math.min(opts.tilt_max,tilt));}var _4ea=function(v,k){s=s.replace("<"+k+">"+all[a][1][I[k]]+"</"+k+">","<"+k+">"+arr[k][a]+"</"+k+">");};for(a=N-1;a>-1;a--){last=all[a][0];n=all[a][1][0].length;_4e9=last-n;s=all[a][1][0];dojun.forIn(arr,_4ea);text=text.substr(0,_4e9)+s+text.substr(last);}return text;};_4e2=function(_4eb,next,_4ec){var w=Math.max(0,Math.min(1,_4ec));return alp.util.angle_wmean([_4eb,next],[1-w,w]);};})();});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.data.autocompleteabstract"]){typeof dojo==="undefined"||(dojo._hasResource["alp.data.autocompleteabstract"]=true);dojo.provide("alp.data.autocompleteabstract");(function(){var CN="alp.data.AutoCompleteAbstract";dojo.declare(CN,null,{to_display:dojun.lambda(".address"),delay_ms:456,ordered:true,constructor:function(opts){var me=this;dojo.mixin(me,opts);me.query_st||(me.query_st=new alp.data.State({init_value:"",constrain_all:function(v){return ""+(v||"");}}));me.query_opt_st=me.query_opt_st||new alp.data.State();me.result_st||(me.result_st=new alp.data.SetState({do_not_clone:true,is_same_element:function(x,y){return x&&y&&me.to_display(x)===me.to_display(y);},ordered:me.ordered}));me.query_st.changed_cb(function(q){me.result_st.clear();me.fetch(q,me.query_opt_st.get());});if(typeof me.delay_ms==="number"){me.submit=alp.util.ratelimit_fun(-Math.abs(me.delay_ms),me,me.submit);}},submit:function(q,_4ed){if(arguments.length>1){this.query_opt_st.set(_4ed);}this.query_st.set(q);},fetch:function(q,_4ee){},receive:function(q,_4ef){if(!(this.query_st.is(q)&&_4ef&&_4ef.length)){return;}this.result_st.merge(_4ef);}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["dojox.encoding.base64"]){typeof dojo==="undefined"||(dojo._hasResource["dojox.encoding.base64"]=true);dojo.provide("dojox.encoding.base64");(function(){var p="=";var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var dxe=dojox.encoding;dxe.base64.encode=function(ba){var s=[],l=ba.length;var rm=l%3;var x=l-rm;for(var i=0;i<x;){var t=ba[i++]<<16|ba[i++]<<8|ba[i++];s.push(tab.charAt((t>>>18)&63));s.push(tab.charAt((t>>>12)&63));s.push(tab.charAt((t>>>6)&63));s.push(tab.charAt(t&63));}switch(rm){case 2:var t=ba[i++]<<16|ba[i++]<<8;s.push(tab.charAt((t>>>18)&63));s.push(tab.charAt((t>>>12)&63));s.push(tab.charAt((t>>>6)&63));s.push(p);break;case 1:var t=ba[i++]<<16;s.push(tab.charAt((t>>>18)&63));s.push(tab.charAt((t>>>12)&63));s.push(p);s.push(p);break;}return s.join("");};dxe.base64.decode=function(str){var s=str.split(""),out=[];var l=s.length;while(s[--l]==p){}for(var i=0;i<l;){var t=tab.indexOf(s[i++])<<18;if(i<=l){t|=tab.indexOf(s[i++])<<12;}if(i<=l){t|=tab.indexOf(s[i++])<<6;}if(i<=l){t|=tab.indexOf(s[i++]);}out.push((t>>>16)&255);out.push((t>>>8)&255);out.push(t&255);}while(out[out.length-1]==0){out.pop();}return out;};})();}if(typeof dojo==="undefined"||!dojo._hasResource["dojox.encoding.bits"]){typeof dojo==="undefined"||(dojo._hasResource["dojox.encoding.bits"]=true);dojo.provide("dojox.encoding.bits");dojox.encoding.bits.OutputStream=function(){this.reset();};dojo.extend(dojox.encoding.bits.OutputStream,{reset:function(){this.buffer=[];this.accumulator=0;this.available=8;},putBits:function(_4f0,_4f1){while(_4f1){var w=Math.min(_4f1,this.available);var v=(w<=_4f1?_4f0>>>(_4f1-w):_4f0)<<(this.available-w);this.accumulator|=v&(255>>>(8-this.available));this.available-=w;if(!this.available){this.buffer.push(this.accumulator);this.accumulator=0;this.available=8;}_4f1-=w;}},getWidth:function(){return this.buffer.length*8+(8-this.available);},getBuffer:function(){var b=this.buffer;if(this.available<8){b.push(this.accumulator&(255<<this.available));}this.reset();return b;}});dojox.encoding.bits.InputStream=function(_4f2,_4f3){this.buffer=_4f2;this.width=_4f3;this.bbyte=this.bit=0;};dojo.extend(dojox.encoding.bits.InputStream,{getBits:function(_4f4){var r=0;while(_4f4){var w=Math.min(_4f4,8-this.bit);var v=this.buffer[this.bbyte]>>>(8-this.bit-w);r<<=w;r|=v&~(~0<<w);this.bit+=w;if(this.bit==8){++this.bbyte;this.bit=0;}_4f4-=w;}return r;},getWidth:function(){return this.width-this.bbyte*8-this.bit;}});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.bits"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.bits"]=true);dojo.provide("alp.util.bits");alp.util.b64mEncode=function(ba){return dojox.encoding.base64.encode(ba).replace(/\+/g,"~").replace(/\//g,"-").replace(/\=/g,"_");};alp.util.b64mDecode=function(s){return dojox.encoding.base64.decode(s.replace(/\_/g,"=").replace(/\-/g,"/").replace(/\~/g,"+")+"=");};alp.util.IAWSEPARATOR=".";alp.util.iawEncode=function(ia,_4f5,_4f6,_4f7){if(_4f5===undefined){_4f5=alp.util.b64mEncode;}if(_4f6===undefined){_4f6=0;dojo.forEach(ia,function(i){_4f6=Math.max(_4f6,1+Math.floor(Math.log(Math.max(1,i))/Math.log(2)));});}if(_4f6>>16){console.error("alp.util.iawEncode: I cannot deal with i_width > 65535 !!! i_width:",_4f6);return "";}var bw=alp.util.iaPack(ia,_4f6,_4f7);if(bw.width>>16){console.error("alp.util.iawEncode: I cannot deal with bw.width > 65535 !!! bw.width:",bw.width);return "";}return _4f5([(bw.width>>8)&255,bw.width&255])+alp.util.IAWSEPARATOR+_4f5([(_4f6>>8)&255,_4f6&255])+alp.util.IAWSEPARATOR+_4f5(bw.buffer);};alp.util.iawDecode=function(s,_4f8){if(_4f8===undefined){_4f8=alp.util.b64mDecode;}var sep=alp.util.IAWSEPARATOR;var e,iwa,_4f9,_4fa,_4fb,ind;e=s.split(sep);if(e.length!==3){console.error("alp.util.iawDecode(): wrong format for this string:",s);return [];}iwa=_4f8(e[0]);_4fb=(iwa[0]<<8)+iwa[1];iwa=_4f8(e[1]);_4f9=(iwa[0]<<8)+iwa[1];_4fa=_4f8(e[2]);return alp.util.iaUnpack({buffer:_4fa,width:_4fb},_4f9);};alp.util.iaPack=function(ia,_4fc,_4fd){if(!_4fd){if(dojo.filter(ia,function(i){return !((typeof i)==="number")&&(Math.round(i)===i);}).length>0){console.error("alp.util.bitsPack: all must be integers");return 0;}var max=Math.pow(2,_4fc)-1;if(dojo.filter(ia,function(i){return (i<0)||(i>max);}).length>0){console.error("alp.util.bitsPack: all integers must lie between 0 and (2^width)-1");return 0;}}var os=new dojox.encoding.bits.OutputStream();dojo.forEach(ia,function(i){os.putBits(i,_4fc);});var _4fe=os.getWidth();var _4ff=os.getBuffer();return {buffer:_4ff,width:_4fe};};alp.util.iaUnpack=function(bw,_500){var ia=[];var is=new dojox.encoding.bits.InputStream(bw.buffer,bw.width);while(is.getWidth()>=_500){ia.push(is.getBits(_500));}return ia;};alp.util.nbit=function(n){if(typeof n!=="number"){console.error("alp.util.nbit() expects a number for n, you gave me:",n);return;}return 1+Math.floor(Math.log(Math.max(1,n))/Math.log(2));};alp.util.reverse_bit=function(x,nbit){if(typeof x!=="number"){console.error("alp.util.reverse_bit() expects a number for x, you gave me:",x);return;}if(typeof nbit!=="number"){console.error("alp.util.reverse_bit() expects a number for nbit, you gave me:",nbit);return;}var y=x&(~((1<<nbit)-1));for(var a=0;a<nbit;a++){if(x&(1<<(nbit-1-a))){y|=(1<<a);}}return y;};}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.p"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.p"]=true);dojo.provide("alp.util.p");alp.util.detunif=function(n,_501){if((typeof n!=="number")||(n<0)){console.error("alp.util.detunif( n ) needs a positive integer, you gave me:",n);return;}_501=_501||alp.util.detunif_iter;var ret=new Array(n);var iter=_501(n);for(var a=0;a<n;a++){ret[a]=iter();}return ret;};alp.util.detunif_iter=function(n){var _502={x:0};var _503=function(){if((typeof n!=="number")||(n<1)){console.error("alp.util.detunif_iter( "+n+" ) needs a strictly positive integer, you gave me:",n);return;}_502.nbit=Math.round(Math.ceil(Math.log(n)/Math.log(2)));_502.x_max=(1<<_502.nbit)-1;_502.x=_502.x&_502.x_max;};_503();var ret=function(){var y;while(true){y=alp.util.reverse_bit(_502.x,_502.nbit);_502.x=(1+_502.x)&_502.x_max;if(y<n){return y;}}};ret.n=function(){return n;};ret.change_n=function(_504){if(n===_504){return false;}n=_504;_503();return true;};return ret;};}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.random"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.random"]=true);dojo.provide("alp.util.random");(function(){var _505=0;alp.util.randint=function(n){return Math.max(0,Math.min(n-1,(((_505+=n*Math.random())>>0)%n)));};})();alp.util.randperm_det=function(arr){if(!(arr&&arr.length)){return arr;}var n=arr.length,ret=new Array(n),iter=alp.util.detunif_iter(n);for(var a=n;a--;){ret[iter()]=arr[a];}return ret;};alp.util.randstr=function(n,from){from=from||"abcdefghijklmnopqrstuvwxyz";var ret=[],_506=from.length;for(;n--;){ret.push(from.charAt(alp.util.randint(_506)));}return ret.join("");};}if(typeof dojo==="undefined"||!dojo._hasResource["alp.data.autocompleterandom"]){typeof dojo==="undefined"||(dojo._hasResource["alp.data.autocompleterandom"]=true);dojo.provide("alp.data.autocompleterandom");(function(){var CN="alp.data.AutoCompleteRandom";dojo.declare(CN,alp.data.AutoCompleteAbstract,{to_display:dojun.lambda(".address"),fetch:function(q){if(!q){return;}var me=this,arr=[].concat(this._get(q)),f=alp.util.asyncHitch(function(){var x=arr.shift();if(!x){return;}me.receive(q,[x]);f();},null,123);f();},_get:function(q){var me=this,_507=(me._cache||(me._cache={}));if(_507[q]){return _507[q];}var n=alp.util.randint(11),ret=[];for(var a=n;a--;){ret[a]={address:q+alp.util.randstr(5),x:8+5*Math.random(),y:45+10*Math.random()};}_507[q]=ret;return [].concat(ret);}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.data.autocompletegooglegeocode"]){typeof dojo==="undefined"||(dojo._hasResource["alp.data.autocompletegooglegeocode"]=true);dojo.provide("alp.data.autocompletegooglegeocode");(function(){var CN="alp.data.AutoCompleteGoogleGeocode";dojo.declare(CN,alp.data.AutoCompleteAbstract,{extra:[],to_display:dojun.lambda(".address"),SOURCE:{v2:"google.maps.ClientGeocoder",v3:"google.maps.Geocoder"},fetch:function(q,gmap){if(!q){return;}var me=this;var arr=[""].concat(me.extra),f=function(){if(!me.query_st.is(q)){return;}if(!arr.length){return;}var c=arr.shift();me._fetch_one(q+c,q,gmap);alp.util.asyncHitch(f,null,me.delay_ms)();};f();},_fetch_one:function(q,base,gmap){var me=this,_508=function(arr){me._cache[q]=arr;if(!(arr&&arr.length)){return;}me.receive(base,arr);};me._cache=me._cache||{};if(me._cache[q]){_508(me._cache[q]);return;}if(!me._geocode){me._init_geocode();}if(!me._geocode){console.error(CN+"._fetch_one(): did not find any geocoder.");return;}me._geocode(q,_508,gmap);},_init_geocode:function(){var me=this;if(me._geocode){return;}var _509,ctor;var _509=me.SOURCE.v2,ctor=dojo.getObject(_509);if(typeof ctor==="function"){var gc=new ctor();gc.setBaseCountryCode("de");gc.reset();me.gclientgeocoder=function(){return gc;};me._geocode=function(q,_50a,gmap){if(gmap){gc.setViewport(gmap.getBounds());gc.reset();}gc.getLocations(q,function(r){if(!(r&&r.Placemark&&r.Status&&r.Status.code===dojo.global.G_GEO_SUCCESS)){return;}var ret=[];dojo.forEach(r.Placemark,function(pm){var _50b=pm&&pm.address,c=pm&&pm.Point&&pm.Point.coordinates,x=c&&c[0],y=c&&c[1];if(c&&x!==null&&y!==null){ret.push({address:_50b,x:x,y:y,source:_509});}});if(ret.length>0){_50a(ret);}});};return;}var _509=me.SOURCE.v3,ctor=dojo.getObject(_509);if(typeof ctor==="function"){var gc=new ctor();me._geocode=function(q,_50c){gc.geocode({address:q,language:dojo.locale},function(arr,_50d){if(_50d!==google.maps.GeocoderStatus.OK){return;}var ret=[];dojo.forEach(arr,function(r){var s=r&&r.address_components;s=s&&dojun.map(s,".long_name").join(", ");var _50e=r&&r.geometry&&r.geometry.location;if(s&&_50e){ret.push({address:s,x:_50e.lng(),y:_50e.lat(),source:_509});}});if(ret.length>0){_50c(ret);}});};return;}}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.data.autocompletealpsteingeocode"]){typeof dojo==="undefined"||(dojo._hasResource["alp.data.autocompletealpsteingeocode"]=true);dojo.provide("alp.data.autocompletealpsteingeocode");(function(){var CN="alp.data.AutoCompleteAlpsteinGeocode";dojo.declare(CN,alp.data.AutoCompleteAbstract,{to_display:function(x){var ret=x.address;if(x.title){ret+=" ("+x.title+")";}return ret;},project:null,type:null,fetch:function(q){var me=this;if(!q){return;}alp.data.api_geocode(dojun.filterIn({q:q,project:me.project,type:me.type},"!!")).then(function(_50f){var r=_50f&&(_50f.status&&_50f.status.toLowerCase()==="ok")&&_50f.result;if(r&&r.length){me.result_st.merge(r);}});}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.data.autocompletemixgeocode"]){typeof dojo==="undefined"||(dojo._hasResource["alp.data.autocompletemixgeocode"]=true);dojo.provide("alp.data.autocompletemixgeocode");(function(){var CN="alp.data.AutoCompleteMixGeocode";dojo.declare(CN,alp.data.AutoCompleteAbstract,{source_arr:null,to_display:function(data){return data.__acmg_source.to_display(data);},map:null,order:function(arr){var me=this,map=me.map,c=map&&map.getCenter&&map.getCenter(),mb=map&&map.getBounds&&map.getBounds();if(!c){return arr;}var ret=[].concat(arr);ret.sort(function(a,b){return (_510(a)<_510(b))?-1:+1;});_511(ret);return ret;function _510(xy){var b,span,dlat,dlng,dg=dojo.global,f,f2,_512;f=dg.GLatLngBounds;f2=dg.GLatLng;if(!(f&&f2)){f=dojo.getObject("google.maps.LatLngBounds");f2=dojo.getObject("google.maps.LatLng");}if(typeof f==="function"&&typeof f2==="function"){b=new f();b.extend(c);_512=new f2(xy.y,xy.x);b.extend(_512);span=b.toSpan();dlat=span.lat();dlng=span.lng();var ret=dlat*dlat+dlng*dlng;if(mb&&!mb.contains(_512)){ret*=1000000;}return ret;}};function _511(arr){var n=arr.length,_513=[];for(var a=0,_514=n;a<_514&&_513.length<2;a++){var xy=arr[a];if(/google/i.test(alp.at(xy.__acmg_source,"declaredClass"))||/google/i.test(alp.at(xy,"source"))){_513.push(a);}}while(_513.length){arr.unshift(arr.splice(_513.shift(),1)[0]);}};},fetch:function(q){var me=this;me._init();dojo.forEach(me.source_arr,function(_515){_515.submit(q,me.map);});},resort:function(){this.result_st.set(this.order(this.result_st.get()));},gclientgeocoder:function(){var me=this;for(var a=me.source_arr.length;a--;){var ret=me.source_arr[a].gclientgeocoder&&me.source_arr[a].gclientgeocoder();if(ret){return ret;}}},_init:function(){var me=this;dojo.forEach(me.source_arr,function(_516){_516.result_st.changed_cb(function(arr){if(!_516.query_st.is(me.query_st.get())){return;}me.result_st.set(me.order(me.result_st.get().concat(dojo.map(arr,function(xy){return dojo.mixin({},xy,{__acmg_source:_516});}))));});});if(me.map){var dg=dojo.global,gm=dojo.getObject("google.maps"),f=alp.util.ratelimit_fun(-75,function(){me.resort();});if(dg.GEvent){dg.GEvent.addListener(me.map,"move",f);}else{if(gm.event){gm.event.addListener(me.map,"center_changed",f);gm.event.addListener(me.map,"bounds_changed",f);}}}me._init=function(){};}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.data.autocomplete"]){typeof dojo==="undefined"||(dojo._hasResource["alp.data.autocomplete"]=true);dojo.provide("alp.data.autocomplete");}if(typeof dojo==="undefined"||!dojo._hasResource["alp.data.objectstate"]){typeof dojo==="undefined"||(dojo._hasResource["alp.data.objectstate"]=true);dojo.provide("alp.data.objectstate");(function(){var CN="alp.data.ObjectState",AU=alp.util,AUO=AU.object;var C=dojo.declare(CN,alp.data.State,{do_not_clone:false,is_same:function(a,b){return AUO.equal(a,b);},get:function(){var v=this._get_no_clone();if(this.do_not_clone){return v;}return AUO.copy(v);},mixin:function(o){return this.set(dojo.mixin({},this.get(),o));},set_flex:function(_517,_518){if(typeof _517==="object"){return this.mixin(_517);}return this.set_property(_517,_518);},has_value:function(_519,_51a){var v=this.get_property(_519);return _51a?_51a(v):!!v;},get_property:function(_51b,_51c){var v=AU.get_property(this._get_no_clone()||{},_51b);if(_51c||this.do_not_clone){return v;}return AUO.copy(v);},set_property:function(_51d,_51e){var me=this,o=me._get_no_clone();if(!o||!me.is_same(_51e,AU.get_property(o,_51d))){o=AUO.copy(o||{});AU.set_property(o,_51d,_51e);return this.set(o);}return false;},keep_only:function(_51f,_520){var v=this.get_property(_51f);if(v){this.set_property(_51f,alp.at(v,_520));}},toString:function(){return dojo.toJson(this.get());},_get_no_clone:function(){return C.superclass.get.apply(this);}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.marker_opts"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.marker_opts"]=true);dojo.provide("alp._gmap2_3.marker_opts");(function(){var AG=alp._gmap2_3,AGM=AG.marker_opts,_521;AGM.markerCfg_2_markerOptions=function(_522){var o=dojo.mixin({},_522);o.anchor_xy=o.anchor_xy||[o.xy[0]>>1,o.xy[1]>>1];o=alp.cfg._ooi_normalize_xy(o);return {icon:AG.markerImage_gen(o.url,o.xy,null,o.anchor_xy),shadow:o.shadow_url&&AG.markerImage_gen(o.shadow_url,o.shadow_xy,null,o.anchor_xy),shape:o.shape};};AGM.ooi_single_default=function(){var o=alp.cfg.ooi_single_default();return {icon:AG.markerImage_gen(o.url,o.xy,null,o.anchor_xy),shadow:o.shadow_url&&AG.markerImage_gen(o.shadow_url,o.shadow_xy,null,o.anchor_xy),shape:o.shape};};AGM.ooi_a_1_gen=function(n,_523,_524,size){return dojo.mixin({},_521.apply(null,arguments));};_521=alp.util.cache_transform(function(n,_525,_526,size){var o=alp.cfg.ooi_a_1_icon.apply(alp.cfg,arguments);return {icon:AG.markerImage_gen(o.url,o.xy,null,o.anchor_xy),shadow:AG.markerImage_gen(o.shadow_url,o.shadow_xy,null,o.anchor_xy),shape:o.im&&{coords:o.im,type:"poly"}};});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.marker"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.marker"]=true);dojo.provide("alp._gmap2_3.marker");(function(){var AG=alp._gmap2_3,gm=google.maps;AG.overlay._install();var _527=gm.Marker.prototype,m,_528;if(AG.V2()&&_527){m="setLatLng";_528=_527[m];_527[m]=function(_529){if(_529.equals(this.getLatLng())){return;}var ret=_528.apply(this,arguments);AG.event("trigger")(this,"position_changed",_529);return ret;};m="getPosition";_527[m]||(_527[m]=_527.getLatLng);m="setPosition";_527[m]||(_527[m]=_527.setLatLng);m="getVisible";_527[m]||(_527[m]=function(){return !alp.m(this,"isHidden");});m="setVisible";_527[m]||(_527[m]=function(v){return alp.m(this,v?"show":"hide");});m="setIcon";_527[m]||(_527[m]=_52a);}function _52a(x){if(typeof x!=="string"){x=x.url;if(typeof x!=="string"){throw new Error("alp._gmap2_3.marker: v2_setIcon_fallback could not extract the URL");}}this.setImage(x);};if(AG.V3()&&_527){m="setImage";_527[m]||(_527[m]=_52b);}function _52b(url){var icon=this.getIcon();if(url!==icon.url){this.setIcon(AG.markerImage_gen_change(icon,{url:url}));}};var _52c,_52d;AG.marker_gen=function(opts,_52e){if(_52e){var acm=alp.cfg.marker,_52f=[].slice.call(arguments,2),_530=acm[_52e].apply(acm,_52f);opts=dojo.delegate(AG.marker_opts.markerCfg_2_markerOptions(_530),opts);}var gm=google.maps;if(AG.V3()){return alp.util.unleak(new gm.Marker(opts));}if(AG.V2()){var _531=opts.position,o2=dojo.mixin({},opts),_532=opts.zIndex;o2.hide=(false===opts.visible);if(typeof _532==="number"){o2.zIndexProcess=function(){return _532;};}if(o2.draggable&&opts.raiseOnDrag!=true){o2.bouncy=true;}if(opts.visible==false){o2.hide=true;}o2.icon=_52d(opts);var ret=new gm.Marker(_531,o2);if(opts.map){ret.setMap(opts.map);}return alp.util.unleak(ret);}};AG.markerImage_gen=function(url,size,_533,_534,_535){var gm=google.maps;_535=_535||size;_535=AG.V2()?null:_535;if(size&&!(size instanceof gm.Size)){size=new gm.Size(size.width,size.height);}if(_533&&!(_533 instanceof gm.Point)){_533=new gm.Point(_533.x,_533.y);}if(_534&&!(_534 instanceof gm.Point)){_534=new gm.Point(_534.x,_534.y);}if(_535&&!(_535 instanceof gm.Size)){_535=new gm.Size(_535.width,_535.height);}if(AG.V3()){var ret=new google.maps.MarkerImage(url,size,_533,_534,_535),o={url:url,size:size,origin:_533,anchor:_534,scaledSize:_535},p,x;for(p in o){if(o.hasOwnProperty(p)){x=o[p];if(x&&!(p in ret)){ret[p]=x;}}}}else{if(AG.V2()){var ret=new _52c(url,size,_533,_534,_535);}}ret._alpMarkerImage_gen=1;return ret;};AG.markerImage_gen_change=_536;function _536(_537,_538){if(!_537._alpMarkerImage_gen){console.error("`alp._gmap2_3.markerImage_gen_change` assumes that you used `alp._gmap2_3.markerImage_gen`"+"to create the `original` MarkerImage instance.");}return AG.markerImage_gen(_538.url||_537.url,_538.size||_537.size,_538.origin||_537.origin,_538.anchor||_537.anchor,_538.scaledSize||_537.scaledSize);};_52c=function(url,size,_539,_53a,_53b){var me=this;me.url=url;me.size=size;me.origin=_539;me.anchor=_53a;me.scaledSize=_53b;if(_539){console.error("alp._gmap2_3._MarkerImage2(): `origin` is not supported in V2, and will thus be ignored.",_539,url);}if(_53b){console.error("alp._gmap2_3._MarkerImage2(): `scaledSize` is not supported in V2, and will thus be ignored.",_53b,url);}};var _53c;_52d=function(opts){if(AG.V2()){var gm=google.maps,_53d=opts.icon,_53e=opts.shadow,_53f=opts.shape,ret=new gm.Icon(gm.DEFAULT_ICON),a;if(_53d instanceof gm.Icon){console.error("alp._gmap2_3._core._GIcon2_gen(): you should not be using V2 GIcons anymore!",opts,_53d);return _53d;}if(typeof _53d==="string"){ret.image=_53d;var tmp=alp.cfg.marker.caticon();ret.iconSize=new gm.Size(tmp.width,tmp.height);}else{if(_53d instanceof _52c){ret.image=_53d.url;if(a=_53d.size){ret.iconSize=new gm.Size(a.width,a.height);}if(a=_53d.anchor){ret.iconAnchor=new gm.Point(a.x,a.y);}if(_53f){ret.imageMap=_53c(_53f);}}}if(typeof _53e==="string"){ret.shadow=_53e;}else{if(_53e instanceof _52c){ret.shadow=_53e.url;if(a=_53e.size){ret.shadowSize=new gm.Size(a.width,a.height);}}else{ret.shadow="";}}a=ret.iconSize;if(!ret.iconAnchor){ret.iconAnchor=new gm.Point(a.width>>2,a.height);}ret.anchor=ret.iconAnchor;return ret;}console.error("alp._gmap2_3._GIcon2_gen() failed. Maybe wrong Google Maps version.");};var _540=[2,3,2,1,0,1,0,3,2,3];_53c=function(_541){var c=_541.coords,t=_541.type;if(t==="poly"){return c;}if(t==="rect"){return dojo.map(_540,function(ind){return c[ind];});}if(t==="circle"){var x=c[0],y=c[1],r=c[2],NS=16,NP=NS+1,PI=Math.PI,ret=[],_542;for(var n=NP;n--;){_542=-2*PI*n/NS;ret.push(x+r*Math.cos(_542));ret.push(y+r*Math.sin(_542));}return ret;}console.error("alp._gmap2_3._core._imageMap2_gen did not recognize shape:",_541);};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.view.abstract_mouseover_marker"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.view.abstract_mouseover_marker"]=true);dojo.provide("alp._gmap2_3.view.abstract_mouseover_marker");(function(){var CN="alp._gmap2_3.view.AbstractMouseoverMarker",AG=alp._gmap2_3;dojo.declare(CN,null,{gmap:function(){throw new Error(CN+".gmap(): You need to implement this method !");},clear_mouseover_marker:function(){this._set_mouseover_marker();},has_mouseover_marker:function(){return !!this._mouseover_marker;},set_mouseover_marker:function(x,y){this._set_mouseover_marker.apply(this,arguments);},_set_mouseover_marker:function(x,y){var me=this,dg=dojo.global,gmap=me.gmap();if(!gmap){return;}if(x==null||y==null){if(me._mouseover_marker){me._mouseover_marker.setMap(null);me._mouseover_marker=null;}return;}x=parseFloat(x);y=parseFloat(y);me._mouseover_marker=AG.marker_gen({position:new dg.GLatLng(y,x),icon:AG.markerImage_gen.apply(AG,alp.cfg.geocode_location_image()),shadow:AG.markerImage_gen.apply(AG,alp.cfg.geocode_location_shadow_image())});me._mouseover_marker.setMap(gmap);}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.withinit"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.withinit"]=true);dojo.provide("alp.util.withinit");dojo.declare("alp.util.AbstractWithInit",null,{init_dfrd:alp.util.lazymethod("init_dfrd","new alp.util.SafeDeferred()"),mark_init_done:function(){var dfrd=this.init_dfrd();if(dfrd.fired<0){dfrd.callback(true);}},init_cb:alp.util.dfrd_cb("init_dfrd"),whenLoaded:function(_543){this.init_cb.apply(this,arguments);},is_initialized:function(){return this.init_dfrd().fired===0;}});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.eh"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.eh"]=true);dojo.provide("alp.util.eh");dojo.declare("alp.util.Eh",null,{eh_push:function(h){var _544;if(h.alp_aEL){_544=alp.rEL;}else{if(arguments[1]===clearInterval){_544=function(h){clearInterval(h);};}else{_544=(arguments.length>1)?dojo.hitch.apply(dojo,Array.prototype.slice.call(arguments,1)):dojo.hitch(dojo,"disconnect");}}this._eh_get().push(dojo.partial(_544,h));return this;},eh_clear:function(){var eh=this._eh_get();while(eh.length>0){eh.pop()();}return this;},count:function(){return this._eh_get().length;},_eh_get:function(){return (this._eh=this._eh||[]);}});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.view.textinput"]){typeof dojo==="undefined"||(dojo._hasResource["alp.view.textinput"]=true);dojo.provide("alp.view.textinput");(function(){var CN="alp.view.TextInput";dojo.declare(CN,null,{input_active_class:"input_active",container:"",mouseover_part:null,template:"#js-tmpl-text-input",sub_input:".js-ti-input",sub_text:".js-ti-text",clearOnFocus:false,text_inactive:"Enter text here",active:null,sleepy:null,input_active:null,input:null,text:null,systematic:true,constructor:function(cfg){var me=this;dojo.mixin(me,cfg);me.active=new alp.data.BoolState({init_value:true});me.sleepy=new alp.data.BoolState({init_value:false});me.input_active=new alp.data.BoolState({init_value:cfg.input_active||false});me.input=new alp.data.State({init_value:cfg.input||""});me.text=new alp.data.State({init_value:"",init_inactive:true});me.reinit();},reinit:function(){var me=this;(me._eh||(me._eh=new alp.util.Eh())).eh_clear();me.dom={container:dojo.query(me.container).at(0),template:me.template&&dojo.query(me.template).at(0)};var c=me.dom.container[0],t=me.dom.template&&me.dom.template[0],i;if(c&&t){dojo.empty(c);var copy=dojo.clone(t);copy.id="";copy.style.display="";copy.style.visibility="";c.appendChild(copy);me.dom.top=dojo.query(copy);}else{if(c){me.dom.top=dojo.query(c);}}if(c.childNodes.length<1){var _545=dojo.create("div"),is=me.sub_input,_546=is.charAt(0)==="."?{className:is.substring(1)}:{id:is.substring(1)},_547=dojo.create("input",_546);_545.appendChild(_547);c.appendChild(_545);}if(me.dom.top){dojo.forEach(["sub_input","sub_text"],function(a){me.dom[a]=dojo.query(me[a],me.dom.top[0]);},me);i=me.dom.sub_input[0];}if(!i){console.error(CN+".constructor(): could not find all mandatory nodes",me.template,c,i,me);return;}if(!me.mouseover_part){dojo.connect(c,"onmouseover",me,"_mouseover");dojo.connect(c,"onmouseout",me,"_mouseout");}else{dojo.query(me.mouseover_part,c).onmouseover(me,"_mouseover");dojo.query(me.mouseover_part,c).onmouseout(me,"_mouseout");}dojo.forEach(["onchange","onkeypress","onblur","onfocus","onclick"],function(_548){me._eh.eh_push(dojo.connect(i,_548,me,_548));},me);me.active.entered_cb(me,"update");me.input_active.entered_cb(me,"update");if(!me.systematic){me.input_active.entered_cb(dojo.hitch(me,function(v){me.input.setUpdateActive(CN+".constructor()",!v);}));}me.input.entered_cb(me,"update");me.text.entered_cb(me,"update");var st=me.dom.sub_text[0];if(st){me.text.set(st.innerHTML);}me.text.setUpdateActive(CN+".constructor()",true);this.update();},get_dom_in:function(){var me=this;return me.dom&&me.dom.sub_input&&me.dom.sub_input[0];},focus:function(){if(this.active.get()){this.input_active.set(true);try{this.dom.sub_input[0].blur();this.dom.sub_input[0].focus();}catch(IE_brittleness){}}},update:function(){var act=this.active.get()&&!this.sleepy.get()&&this.input_active.get(),i=this.dom.sub_input[0],st=this.dom.sub_text[0];try{if(act){i.focus();}else{i.blur();}}catch(IE_brittleness){}var s=this.input.get();this.dom.top.toggleClass(this.input_active_class,act||s);var _549=(act||s)?s:((typeof this.text_inactive==="function"?this.text_inactive():this.text_inactive)||"");if(i.value!==_549){i.value=_549;}var st=this.dom.sub_text[0];if(st){var st_i=st.innerHTML;if(!this.text.is(st_i)){st.innerHTML=this.text.get();}}},onchange:function(e){var me=this,f=function(){if(!me.sleepy.get()){me.input.set(me.dom.sub_input[0].value);}};f();alp.util.asyncHitch(f,100)();alp.util.asyncHitch(f,250)();alp.util.asyncHitch(f,500)();alp.util.asyncHitch(f,750)();alp.util.asyncHitch(f,1000)();},onkeypress:function(e){this.sleepy.set(false);this.onchange(e);switch(e.keyCode){case dojo.keys.ENTER:this._enter_pressed();break;case dojo.keys.DOWN_ARROW:this._down_arrow_pressed();break;case dojo.keys.UP_ARROW:this._up_arrow_pressed();break;}this._key_pressed(e.keyCode);},onclick:function(e){if(!this.active.get()){return;}if(this.input_active.get()){this.dom.sub_input[0].blur();this.dom.sub_input[0].focus();}else{this.dom.sub_input[0].focus();}},onfocus:function(e){if(!this.active.get()){return;}this.input_active.set(true);if(this.clearOnFocus){this._old_input=this.input.get();this.input.set("");}},onblur:function(e){if(!this.active.get()){return;}this.input_active.set(false);if(this.clearOnFocus&&!this.input.get()){this.input.set(this._old_input||"");}},down_arrow_pressed:function(){},enter_pressed:function(){},key_pressed:function(){},up_arrow_pressed:function(){},mouseover:function(){},mouseout:function(){},_down_arrow_pressed:alp.util.asyncHitch("down_arrow_pressed"),_enter_pressed:alp.util.asyncHitch("enter_pressed"),_key_pressed:alp.util.asyncHitch("key_pressed"),_up_arrow_pressed:alp.util.asyncHitch("up_arrow_pressed"),_mouseover:alp.util.asyncHitch("mouseover"),_mouseout:alp.util.asyncHitch("mouseout")});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.data.setstate"]){typeof dojo==="undefined"||(dojo._hasResource["alp.data.setstate"]=true);dojo.provide("alp.data.setstate");dojo.declare("alp.data.SetState",alp.data.ObjectState,{init_value:[],ordered:false,is_same_element:function(x,y){return x===y;},is_same:function(arr0,arr1){var me=this;if(!(arr0&&arr1)){return false;}if(me.ordered){return alp.util.equal_array(arr0,arr1,dojo.hitch(me,"is_same_element"));}var f=function(arr0,arr1){return alp.util.and(arr0,function(x){return alp.util.or(arr1,function(y){return me.is_same_element(x,y);});});};return f(arr0,arr1)&&f(arr1,arr0);},constrain_all:function(arr,_54a){arr=arr||_54a||[];var me=this;for(var a=arr.length;a--;){var x=arr[a];if(alp.util.or(arr.slice(0,a),function(y){return me.is_same_element(x,y);})){arr.splice(a,1);}}return arr;},clear:function(){return this.set([]);},add:function(_54b){return this.merge([_54b]);},remove:function(_54c){return this.subtract([_54c]);},has_element:function(_54d){var me=this;return alp.util.or(me.get(),function(x){return me.is_same_element(x,_54d);});},merge:function(arr){return this.set(this.get().concat(arr));},subtract:function(arr){var me=this;return me.set(dojo.filter(me.get(),function(x){return !alp.util.or(arr,function(y){return me.is_same_element(x,y);});}));},size:function(){return this.get().length;}});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.data.politeset"]){typeof dojo==="undefined"||(dojo._hasResource["alp.data.politeset"]=true);dojo.provide("alp.data.politeset");(function(){var CN="alp.data.PoliteSet";dojo.declare(CN,alp.data.SetState,{do_not_clone:true,any_st:alp.util.lazymethod("any_st","new alp.data.BoolState()"),at_least_st:null,at_least_value:true,constrain_all:function(arr,_54e){_54e=_54e||[];var me=this;arr=dojo.filter(arr,function(bs){if(!(bs instanceof alp.data.BoolState)){console.error(CN+".constrail_all(): ignoring non-alp.data.BoolState instance:",bs);return false;}return true;});me._bs2eh=me._bs2eh||alp.util.mapany();dojo.forEach(_54e,function(bs){if(-1<dojo.indexOf(arr,bs)){return;}var eh=me._bs2eh.del(bs);if(eh){eh.eh_clear();}});dojo.forEach(arr,function(bs){if(-1<dojo.indexOf(_54e,bs)){return;}var eh=new alp.util.Eh();me._bs2eh.set(bs,eh);eh.eh_push(bs.changed_cb(function(v){if(v){_54f();}_551();}));_54f();_551();function _54f(){dojo.forEach(me.get(),function(_550){_550.set(bs===_550);});};});if(me.at_least_st&&null==me._at_least_h){me._at_least_h=me.any_st().changed_v_cb(false,function(){me.at_least_st.set(true);});}return arr;function _551(){var any=alp.util.or(me.get()||[],"st->st.get()");me.any_st().set(any);};}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.view.table"]){typeof dojo==="undefined"||(dojo._hasResource["alp.view.table"]=true);dojo.provide("alp.view.table");(function(){var CN="alp.view.Table";dojo.declare(CN,alp.util.Updater,{nrow_min:10,nrow_max:10,mouseselect:true,container_attr:{className:"js-table-cont",style:{position:"absolute",zIndex:"100",border:"1px solid #e7e7e7",margin:"0",padding:"0"}},table_attr:{className:"js-table-table",cellpadding:"0",cellspacing:"0"},row_attr:{className:"js-table-row"},selected_class:"js-row-selected",selected_is_same:function(x,y){return x===y;},refnode2xy:function(_552){var pos=dojo.position(_552,true);return {x:pos.x,y:pos.y+pos.h};},transform:null,empty_row:"&nbsp;",css:alp.cfg.css.table_select(),extra_css:null,hide_on_mousewheel:false,hide_on_click:false,array_st:null,vis_st:null,ref_st:null,selected_st:null,selected_index_st:null,min_width_st:null,constructor:function(ref,opts){var me=this;me.array_st=new alp.data.SetState({do_not_clone:true,ordered:true,init_value:opts&&opts.array_init_value});me.vis_st=new alp.data.BoolState({init_value:!!ref});me.ref_st=new alp.data.State({init_value:ref});me.selected_st=new alp.data.State({init_value:null});me.selected_index_st=new alp.data.State({init_value:-1,constrain_all:function(v){var n=me.array_st.get().length;return Math.min(n-1,Math.max(-1,v>>0));}});me.min_width_st=new alp.data.State();dojo.mixin(me,opts);me.array_st.changed_cb(me,"update");me.vis_st.changed_cb(me,"update");me.ref_st.changed_cb(me,"update");me.selected_st.changed_cb(me,"update");me.selected_index_st.changed_cb(function(v){me.selected_st.set(me.array_st.get()[v]);});me.min_width_st.changed_cb(me,"_place_domNode");alp.util.onmousewheel(dojo.body(),false,function(){me._place_domNode();});dojo.connect(dojo.body(),"onmousedown",function(){me._place_domNode();});dojo.connect(dojo.body(),"onmouseup",function(){me._place_domNode();});if(me.hide_on_mousewheel){alp.util.onmousewheel(dojo.body(),false,function(){me.hide();});}if(me.hide_on_click){dojo.connect(dojo.body(),"onclick",me,"hide");}},hide:function(){this.vis_st.set(false);},show:function(){this.vis_st.set(true);},is_selecting:function(){return -1<this.selected_index_st.get();},select:function(n){this.selected_index_st.set(n);},unselect:function(){this.select(-1);},select_shift:function(_553){var me=this,ind=me.selected_index_st.get();if(!(ind>-1)){return;}me.selected_index_st.set(Math.max(0,ind+_553));},select_none:function(){this.selected_index_st.set(-1);},n_visible_row:function(){return Math.min(this.nrow_max,this.array_st.get().length);},clicked:function(_554,_555){},updateImpl:function(){var me=this,vis=me.vis_st.get(),arr=vis&&me.array_st.get(),ref=vis&&me.ref_st.get(),_556=vis&&me.selected_st.get();if(!(vis&&arr&&arr.length&&ref)){if(me.domNode&&me.domNode.style.display!=="none"){me.domNode.style.display="none";}return;}if(!(alp.util.equal_array(me._last_arr,arr)&&me._last_selected===_556)){me._update_domNode(arr,ref);}me._last_arr=arr;me._last_selected=_556;me._place_domNode(ref);me._last_ref=ref;if(me.domNode.style.display!==""){me.domNode.style.display="";}},_static:{},_update_domNode:function(arr){var me=this,node=me.domNode,_557,a,_558,_559;if(node){_557=dojo.query("tbody",node)[0];if(_557){dojo.empty(_557);}}if(!_557){if(node&&node.parentNode){node.parentNode.removeChild(node);}node=dojo.create("div",me.container_attr);this._static.css=this._static.css||alp.util.add_css((this.css||"")+(this.extra_css||""));me.domNodeTable=a=dojo.create("table",me.table_attr,node);_557=dojo.create("tbody",null,a);}_558=arr.length;_559=Math.max(me.nrow_min,Math.min(me.nrow_max,_558));var eh=me.eh=me.eh||new alp.util.Eh();eh.eh_clear();var _55a=me.selected_st.get(),_55b=false;for(a=0;a<_559;a++){var x=arr[a],tr=dojo.create("tr",me.row_attr),td=dojo.create("td",null,tr);if(_55a&&me.selected_is_same(x,_55a)){alp.util.setClass(td,me.selected_class,true);me.selected_st.set(x);me.selected_index_st.set(a);_55b=true;}if(me.transform){x=x&&me.transform(x);}x=x||me.empty_row;if(x){if(typeof x==="object"){td.appendChild(x);}else{td.innerHTML=x;}}_557.appendChild(tr);if(me.mouseselect){(function(x,a){eh.eh_push(dojo.connect(tr,"mouseover",function(){me.selected_st.set(x);}));eh.eh_push(dojo.connect(tr,"click",function(){me._clicked(x,a);}));})(arr[a],a);}}if(!_55b){me.selected_st.set(null);}var body=dojo.body();if(node.parentNode!==body){body.appendChild(node);}me.domNode=node;},_place_domNode:function(ref){var me=this,vis=me.vis_st.get(),_55c=me.min_width_st.get();ref=ref||(vis&&me.ref_st.get());if(!(ref&&me.domNode)){return;}if(me.domNode&&_55c&&typeof _55c==="number"){me.domNode.style.minWidth=_55c+"px";}var _55d,x,y;if(typeof ref==="string"){_55d=dojo.byId(ref)||dojo.query(ref)[0];if(!_55d){return;}}else{if(typeof ref==="object"){if(!(ref.getAttribute&&ref.setAttribute)){x=ref.x;x=(x!=null)?x:ref[0];y=ref.y;y=(y!=null)?y:ref[1];}else{_55d=ref[0]||ref;}}else{console.error(CN+"._place_domNode(): unsupported ref type:",typeof ref,", ref:",ref);return;}}var pos;if(_55d){pos=me.refnode2xy(_55d);x=pos.x;y=pos.y;}if(x==null||y==null){return;}if(me._last_x!==x){me.domNode.style.left=x+"px";}me._last_x=x;if(me._last_y!==y){me.domNode.style.top=y+"px";}me._last_y=y;},_clicked:alp.util.asyncHitch("clicked")});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.x.autocomplete"]){typeof dojo==="undefined"||(dojo._hasResource["alp.x.autocomplete"]=true);dojo.provide("alp.x.autocomplete");(function(){var CN="alp.x.AutoComplete";dojo.declare(CN,null,{minchar:3,datasource:null,close_click_excluded_divs:null,close_click_filter:function(e){if(!(e&&e.target)){return true;}var _55e=this.close_click_excluded_divs();if(!(_55e&&_55e.length)){return true;}return !alp.util.isDescendant(e.target,_55e);},close_on_select:true,polite:true,output_min_width:true,output_css:null,output_extra_css:".js-table-cont { opacity: 0.8; filter: alpha(opacity = 80); zoom: 1; }",overwrite_input_on_mouseover:false,output_vis_st:null,constructor:function(ti,opts){var me=this;me.ti=ti;dojo.mixin(me,opts);if(!me.datasource){me.datasource=new alp.data.AutoCompleteRandom();}me.output_vis_st=me.output_vis_st||new alp.data.BoolState();me.active_st=ti.active;me.input_st=ti.input;me.input_active=ti.input_active;me.datasource.result_st.changed_cb(function(arr){if(me.output){me.output.array_st.set(arr);}});dojo.connect(ti,"reinit",me,"reinit");me.active_st.changed_cb(function(){me.update();});me.input_st.entered_cb(function(_55f,_560){me.update();});dojo.connect(ti,"key_pressed",function(_561){me.update(_561);});dojo.connect(me,"_selected",function(x){if(x&&me.close_on_select){me.unselect();me.input_active.set(false);me.hide();}});me.reinit();},reinit:function(){var me=this,_562=me._get_dom_in();if(me.output){me.output.hide();}me._eh=me._eh||new alp.util.Eh();me._eh.eh_clear();if(!_562){return;}var _563={transform:me.datasource.to_display||dojun.lambda(".title")};if(me.output_css){_563.css=me.output_css;}if(me.output_extra_css){_563.extra_css=me.output_extra_css;}me.output=new alp.view.Table(_562,_563);me._eh.eh_push(alp.util.onmousewheel(dojo.body(),false,function(e){if(alp.util.isDescendant(_562,e.target.parentNode)||alp.util.isDescendant(e.target,_562.parentNode)){me.output.hide();}}));if(me.polite){var ts=(me._static.table_set=me._static.table_set||new alp.data.PoliteSet());ts.add(me.output.vis_st);}me._eh.eh_push(me.output.vis_st.bind_to(me.output_vis_st));me._eh.eh_push(dojo.connect(me.output,"clicked",me,"_selected"));me._eh.eh_push(me.output.selected_index_st.changed_cb(me,"_on_selected_index_change"));me._eh.eh_push(dojo.connect(dojo.body(),"onmousedown",function(e){var _564=e.target;if(_564===me._get_dom_in()){return;}var _565=me.output&&me.output.domNode;if(_565&&alp.util.isDescendant(_564,_565)){return;}if(!me.close_click_filter(e)){return;}me.output.hide();me.ti.sleepy.set(false);me._over();}));if(me.output_min_width){me._eh.eh_push(me.output.vis_st.changed_cb(function(v){var node=me._get_dom_in(),c=node&&node.parentNode&&dojo.contentBox(node),_566=me.output;if(!(v&&c&&_566)){return;}_566.min_width_st.set(c.w);}));}me.update();},close:function(){var f=dojo.hitch(this,function(){this.unselect();this.hide();});f();alp.util.asyncHitch(f,null,100)();},hide:function(){if(this.output){this.output.hide();}},is_selecting:function(){return this.output&&this.output.is_selecting();},unselect:function(){if(this.output){this.output.unselect();}},selected:function(x){},over:function(x,_567){},update:function(_568){var me=this,_569=me.output,_56a=me._get_dom_in(),_56b=typeof _568==="number";if(!(_569&&_56a)){me.reinit();_569=me.output;_56a=me._get_dom_in();}var s=me.ti.input.get()&&_56a&&_56a.value,_56c=me._last_s,_56d=_56c!==s,_56e=_56b&&s.length&&(_568===0||_568===s.charCodeAt(s.length-1));me._last_s=s;if(_56e){if(_56a){me.ti.input.set(_56a.value);}me._last_dom_in_value=_56a.value;_569.unselect();}if(!(_569&&_56a&&me.active_st.get()&&s&&typeof s==="string")){if(_569){_569.hide();}return;}me.output.show();var _56f=_56b&&_568===dojo.keys.ENTER,_570=_56b&&_568===dojo.keys.UP_ARROW,_571=_56b&&_568===dojo.keys.DOWN_ARROW,_572=_56b&&_568===dojo.keys.BACKSPACE,_573=_56b&&_568===dojo.keys.ESCAPE;if(_573){me.output.hide();}if(!me.is_selecting()&&_56d){if(!((_56e||_572)&&s.length>=me.minchar)){me.output.hide();}else{me.datasource.submit(s);}}if(!me.input_active.get()){me.output.hide();}if(_56f){var x=me.output.selected_st.get();if(x){me._selected(x);}return;}if(_570||_571){var si=me.output.selected_index_st,n=me.output.n_visible_row(),ind=si.get();si.set(((n+2+ind+(_570?(-1):1))%(1+n))-1);return;}},_static:{},_get_dom_in:function(){return this.ti.get_dom_in();},_selected:alp.util.asyncHitch("selected"),_over:alp.util.asyncHitch("over"),_on_selected_index_change:function(v){var me=this,_574=me._get_dom_in(),x=v>-1&&me.output.array_st.get()[v];me._over(x,v);if(!_574){return;}var _575=!!x,_576=_575&&!(me._last_selected_index>-1),_577=me._was_selecting&&!_575;me._last_selected_index=v;me._was_selecting=_575;if(_576){me._last_manual_input=me.ti.input.get();me._last_dom_in_value=_574&&_574.value;}if(_575){me.ti.sleepy.set(_575);if(_574&&me.overwrite_input_on_mouseover){_574.value=me.output.transform(x);}}else{if(_577){if(_574&&me._last_dom_in_value&&me.overwrite_input_on_mouseover){_574.value=me._last_dom_in_value;}me.ti.sleepy.set(_575);}}}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.gmap.x.geocoder"]){typeof dojo==="undefined"||(dojo._hasResource["alp.gmap.x.geocoder"]=true);dojo.provide("alp.gmap.x.geocoder");alp.installLocalization("alp","gmap");(function(f){if(typeof GMap!=="undefined"){f.apply(this);}else{dojo["require"]("alp.google");alp.gmap_asyncdfrd().addCallback(this,f);}})(function(){var CN="alp.gmap.x.Geocoder";dojo.declare(CN,[alp.util.AbstractWithInit,alp._gmap2_3.view.AbstractMouseoverMarker],{cfg:null,cfg_default:{country:"de",map_setCenter:true,map_setCenter_minZoom:10,map_show_IW:true,withautocomplete:false},node:null,map:null,info:null,input:null,css_wait:".js-geocoder-waiting",css_class_searching:"js-geocoder-searching",active_st:null,_autocomplete:null,constructor:function(cfg,_578,map){var me=this;cfg=me.cfg=dojo.mixin({},alp.util.fun_or_not(me.cfg_default),cfg);me.node=_578;me._map=map;me.info=new alp.data.ObjectState({init_value:{geo_xy:dojo.mixin(null,cfg.xy),address:cfg.address||""},init_inactive:true});me.info.changed_cb(me,function(v){me.input.set((v&&v.address)||"");me.view.update();var xy=v&&v.geo_xy,_579=xy&&typeof xy.x==="number"&&typeof xy.y==="number",_57a=_579&&new GLatLng(xy.y,xy.x),gmap=me.gmap(),_57b=v&&v.address;if(!_57b){return;}if(me.cfg.map_setCenter&&gmap&&gmap.setCenter&&_57a){gmap.setCenter(_57a,Math.max(gmap.getZoom()||0,me.cfg.map_setCenter_minZoom));}if(me.cfg.map_show_IW&&gmap&&gmap.openInfoWindowHtml&&_57a&&_57b&&typeof _57b==="string"){gmap.openInfoWindowHtml(_57a,_57b);}});me.active_st=new alp.data.BoolState({init_value:true});me.view=new alp.view.TextInput({container:_578,mouseover_part:cfg.new_geocoder_mouseover_part,template:cfg.new_geocoder_node_template,sub_input:cfg.new_geocoder_node_template_address||alp.view.TextInput.prototype.sub_input,sub_text:cfg.new_geocoder_node_template_label||alp.view.TextInput.prototype.sub_text,text_inactive:function(){var i=me.info.get(),xy=i&&i.geo_xy;if(xy&&typeof xy.x==="number"&&typeof xy.y==="number"){return xy.y+" | "+xy.x;}else{return cfg.new_geocoder_prompt||alp.gmap.i18n.geocoderPrompt;}}});dojo.connect(me.view,"mouseover",me,"_mouseover");dojo.connect(me.view,"mouseout",me,"_mouseout");dojo.addOnLoad(function(){alp.util.asyncHitch("update",me.view,500)();});me.label=me.view.text;me.input=me.view.input;me.input_active=me.view.input_active;dojo.connect(me.view,"enter_pressed",function(){if(!(me.cfg.withautocomplete&&me._autocomplete&&me._autocomplete.is_selecting())){me._geocode();}});var arr=me.cfg.new_geocoder_autocomplete_mix;if(arr&&arr.length){me.cfg.withautocomplete=true;me.cfg.datasource=new alp.data.AutoCompleteMixGeocode({source_arr:dojo.map(arr,function(x){if(typeof x==="string"){var ctor=dojo.getObject(x);return new ctor(me.cfg.new_geocoder_autocomplete_opts);}return x;}),map:me.gmap()});}if(me.cfg.withautocomplete){var opts={close_click_excluded_divs:function(){var gmap=me.gmap(),v2="getContainer",v3="getDiv",div=gmap&&((gmap[v2]&&gmap[v2]())||(gmap[v3]&&gmap[v3]()));return (div&&[div])||[];}};if(me.cfg.datasource){opts.datasource=me.cfg.datasource;}me._autocomplete=new alp.x.AutoComplete(me.view,opts);dojo.connect(me._autocomplete,"over",me,"_on_autocomplete_over");dojo.connect(me._autocomplete,"selected",me,"_on_autocomplete_selected");me.active_st.bind_to(me._autocomplete.active_st);me._autocomplete.output_vis_st.changed_v_cb(false,me,"clear_mouseover_marker");}},gmap:function(){var map=this._map;if(map&&map.gmap){return map.gmap;}return map;},init:function(){this.info.setUpdateActive(CN+".init()",true);this.mark_init_done();},remove:function(){var n=this.node,p=n&&n.parentNode;if(p){p.removeChild(n);}},focus:function(){},submit:function(){this._geocode();},mouseover:function(){},mouseout:function(){},_geocode:function(){var i=this.input.get();if(!i){return;}var c=this._clientgeocoder=(this._autocomplete&&this._autocomplete&&this._autocomplete.datasource.gclientgeocoder&&this._autocomplete.datasource.gclientgeocoder())||this._clientgeocoder||new GClientGeocoder();if(this.cfg.country&&c.getBaseCountryCode()!==this.cfg.country){c.reset();c.setBaseCountryCode(this.cfg.country);}var gmap=this.gmap(),b=gmap&&gmap.getBounds&&gmap.getBounds();if(b){c.reset();c.setViewport(b);}c.getLocations(i,dojo.hitch(this,"_receive",i));if(this.css_wait){dojo.query(this.css_wait,this.node).style("display","");}if(this.css_class_searching){dojo.addClass(this.node,this.css_class_searching);}},_receive:function(_57c,r){if(this.css_wait){dojo.query(this.css_wait,this.node).style("display","none");}if(this.css_class_searching){dojo.removeClass(this.node,this.css_class_searching);}var c=r&&r.Status;c=c&&c.code;var p=r&&r.Placemark&&r.Placemark[0],_57d=p&&p.Point&&p.Point.coordinates,x=null,y=null;if(_57d){x=_57d[0];y=_57d[1];}var _57e=(p&&p.address)||_57c;if(!((c===G_GEO_SUCCESS)&&(x!=null)&&(y!=null))){alert(this.cfg.new_geocoder_error||alp.gmap.i18n.geocoderError);return;}this._geo_success(_57e,{x:x,y:y});},_geo_success:function(_57f,_580){if(!(_57f&&_580)){return;}this.view.input_active.set(false);if(this._autocomplete){this._autocomplete.close();}this.info.set_property("address",_57f);this.info.set_property("geo_xy",_580);},_on_autocomplete_over:function(data){var me=this,gmap=this.gmap(),x=data&&data.x,y=data&&data.y,has=(typeof x==="number")&&(typeof y==="number");if(!gmap){return;}me.clear_mouseover_marker();if(!has){return;}me.set_mouseover_marker(x,y);},_on_autocomplete_selected:function(data){if(!data){return;}if(data&&data.address&&data.x!=null&&data.y!=null){this._geo_success(data.address,{x:data.x,y:data.y});return;}if(data&&data.address&&data.geo_xy&&data.geo_xy.x!=null&&data.geo_xy.y!=null){this._geo_success(data.address,data.geo_xy);return;}},_mouseover:alp.util.asyncHitch("mouseover"),_mouseout:alp.util.asyncHitch("mouseout")});});}if(typeof dojo==="undefined"||!dojo._hasResource["dijit.form.CheckBox"]){typeof dojo==="undefined"||(dojo._hasResource["dijit.form.CheckBox"]=true);dojo.provide("dijit.form.CheckBox");dojo.declare("dijit.form.CheckBox",dijit.form.ToggleButton,{templateString:dojo.cache("dijit.form","templates/CheckBox.html","<div class=\"dijitReset dijitInline\" waiRole=\"presentation\"\n\t><input\n\t \t${nameAttrSetting} type=\"${type}\" ${checkedAttrSetting}\n\t\tclass=\"dijitReset dijitCheckBoxInput\"\n\t\tdojoAttachPoint=\"focusNode\"\n\t \tdojoAttachEvent=\"onmouseover:_onMouse,onmouseout:_onMouse,onclick:_onClick\"\n/></div>\n"),baseClass:"dijitCheckBox",type:"checkbox",value:"on",readOnly:false,attributeMap:dojo.delegate(dijit.form.ToggleButton.prototype.attributeMap,{readOnly:"focusNode"}),_setReadOnlyAttr:function(_581){this.readOnly=_581;dojo.attr(this.focusNode,"readOnly",_581);dijit.setWaiState(this.focusNode,"readonly",_581);this._setStateClass();},_setValueAttr:function(_582){if(typeof _582=="string"){this.value=_582;dojo.attr(this.focusNode,"value",_582);_582=true;}if(this._created){this.attr("checked",_582);}},_getValueAttr:function(){return (this.checked?this.value:false);},postMixInProperties:function(){if(this.value==""){this.value="on";}this.checkedAttrSetting=this.checked?"checked":"";this.inherited(arguments);},_fillContent:function(_583){},reset:function(){this._hasBeenBlurred=false;this.attr("checked",this.params.checked||false);this.value=this.params.value||"on";dojo.attr(this.focusNode,"value",this.value);},_onFocus:function(){if(this.id){dojo.query("label[for='"+this.id+"']").addClass("dijitFocusedLabel");}},_onBlur:function(){if(this.id){dojo.query("label[for='"+this.id+"']").removeClass("dijitFocusedLabel");}},_onClick:function(e){if(this.readOnly){return false;}return this.inherited(arguments);}});dojo.declare("dijit.form.RadioButton",dijit.form.CheckBox,{type:"radio",baseClass:"dijitRadio",_setCheckedAttr:function(_584){this.inherited(arguments);if(!this._created){return;}if(_584){var _585=this;dojo.query("INPUT[type=radio]",this.focusNode.form||dojo.doc).forEach(function(_586){if(_586.name==_585.name&&_586!=_585.focusNode&&_586.form==_585.focusNode.form){var _587=dijit.getEnclosingWidget(_586);if(_587&&_587.checked){_587.attr("checked",false);}}});}},_clicked:function(e){if(!this.checked){this.attr("checked",true);}}});}if(typeof dojo==="undefined"||!dojo._hasResource["dojox.form.CheckedMultiSelect"]){typeof dojo==="undefined"||(dojo._hasResource["dojox.form.CheckedMultiSelect"]=true);dojo.provide("dojox.form.CheckedMultiSelect");dojo.declare("dojox.form._CheckedMultiSelectItem",[dijit._Widget,dijit._Templated],{widgetsInTemplate:true,templateString:dojo.cache("dojox.form","resources/_CheckedMultiSelectItem.html","<div class=\"dijitReset ${baseClass}\"\n\t><input class=\"${baseClass}Box\" dojoType=\"dijit.form.CheckBox\" dojoAttachPoint=\"checkBox\" \n\t\tdojoAttachEvent=\"_onClick:_changeBox\" type=\"${_type.type}\" baseClass=\"${_type.baseClass}\"\n\t><div class=\"dijitInline ${baseClass}Label\" dojoAttachPoint=\"labelNode\" dojoAttachEvent=\"onmousedown:_onMouse,onmouseover:_onMouse,onmouseout:_onMouse,onclick:_onClick\"></div\n></div>\n"),baseClass:"dojoxMultiSelectItem",option:null,parent:null,disabled:false,readOnly:false,postMixInProperties:function(){if(this.parent.multiple){this._type={type:"checkbox",baseClass:"dijitCheckBox"};}else{this._type={type:"radio",baseClass:"dijitRadio"};}this.disabled=this.option.disabled=this.option.disabled||false;this.inherited(arguments);},postCreate:function(){this.inherited(arguments);this.labelNode.innerHTML=this.option.label;},_changeBox:function(){if(this.attr("disabled")||this.attr("readOnly")){return;}if(this.parent.multiple){this.option.selected=this.checkBox.attr("value")&&true;}else{this.parent.attr("value",this.option.value);}this.parent._updateSelection();this.parent.focus();},_onMouse:function(e){if(this.attr("disabled")||this.attr("readOnly")){dojo.stopEvent(e);}else{this.checkBox._onMouse(e);}},_onClick:function(e){if(this.attr("disabled")||this.attr("readOnly")){dojo.stopEvent(e);}else{this.checkBox._onClick(e);}},_updateBox:function(){this.checkBox.attr("value",this.option.selected);},_setDisabledAttr:function(_588){this.disabled=_588||this.option.disabled;this.checkBox.attr("disabled",this.disabled);dojo.toggleClass(this.domNode,"dojoxMultiSelectDisabled",this.disabled);},_setReadOnlyAttr:function(_589){this.checkBox.attr("readOnly",_589);this.checkBox._setStateClass();this.readOnly=_589;}});dojo.declare("dojox.form.CheckedMultiSelect",dijit.form._FormSelectWidget,{templateString:dojo.cache("dojox.form","resources/CheckedMultiSelect.html","<div class=\"dijit dijitReset dijitInline\" dojoAttachEvent=\"onmousedown:_mouseDown,onclick:focus\"\n\t><select class=\"${baseClass}Select\" multiple=\"true\" dojoAttachPoint=\"containerNode,focusNode\"></select\n\t><div dojoAttachPoint=\"wrapperDiv\"></div\n></div>\n"),baseClass:"dojoxMultiSelect",_mouseDown:function(e){dojo.stopEvent(e);},_addOptionItem:function(_58a){this.wrapperDiv.appendChild(new dojox.form._CheckedMultiSelectItem({option:_58a,parent:this}).domNode);},_updateSelection:function(){this.inherited(arguments);dojo.forEach(this._getChildren(),function(c){c._updateBox();});},_getChildren:function(){return dojo.map(this.wrapperDiv.childNodes,function(n){return dijit.byNode(n);});},invertSelection:function(_58b){dojo.forEach(this.options,function(i){i.selected=!i.selected;});this._updateSelection();},_setDisabledAttr:function(_58c){this.inherited(arguments);dojo.forEach(this._getChildren(),function(node){if(node&&node.attr){node.attr("disabled",_58c);}});},_setReadOnlyAttr:function(_58d){if("readOnly" in this.attributeMap){this._attrToDom("readOnly",_58d);}this.readOnly=_58d;dojo.forEach(this._getChildren(),function(node){if(node&&node.attr){node.attr("readOnly",_58d);}});this._setStateClass();},uninitialize:function(){dojo.forEach(this._getChildren(),function(_58e){_58e.destroyRecursive();});this.inherited(arguments);}});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.w.DropDownChecked"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.w.DropDownChecked"]=true);dojo.provide("alp.util.w.DropDownChecked");dojo.declare("alp.util.w.DropDownChecked",[dijit._Widget,dijit._Templated],{label:"",templateString:"<div><button class=\"alpDropDownCheckedButton\" dojoAttachEvent=\"click:_onClick\">${label}</button></div>",options:[],multiple:"true",postCreate:function(){this.checkedMultiSelect=new dojox.form.CheckedMultiSelect({multiple:this.multiple});var div=document.createElement("div");alp.util.setClass(div,"alpDropDownCheckedButtonContainer",true);div.style.display="none";div.appendChild(this.checkedMultiSelect.domNode);this._checkedMultiSelectContainer=div;var _58f;if(this.options&&this.options.length){_58f=[];dojo.forEach(this.options,function(opt){this.checkedMultiSelect.addOption({value:opt.value+"",label:alp.util.fun_or_not(opt.label)+""});if(opt.selected){_58f.push(opt.value);}},this);this.checkedMultiSelect.attr("value",_58f);}this.checkedMultiSelect.startup();dojo.connect(dojo.body(),"onclick",this,"_on_global_click");this.getInitDfrd().callback(true);},getInitDfrd:function(){return (this._initDfrd=this._initDfrd||new alp.util.SafeDeferred());},init_cb:alp.util.dfrd_cb("getInitDfrd"),getValue:function(){return this.checkedMultiSelect.getValue();},addOne:function(s){this.init_cb(this,function(){var v=this.getValue();if(!alp.util.or(v,"==='"+s+"'")){this.setValue([s].concat(v));}});return this;},removeOne:function(s){this.init_cb(this,function(){this.setValue(dojun.filter(this.getValue(),"!=='"+s+"'"));});return this;},placeDropDown:function(){var div=this._checkedMultiSelectContainer;var _590=this.domNode.firstChild;var _591=dojo.coords(_590);div.style.position="absolute";dijit.placeOnScreenAroundElement(div,_590,["TR","BR","BL","TL"]);var t=div.style.top.replace("px","");if(t<_591.t+_591.h/2){div.style.top=(t-_591.h)+"px";}},setValue:function(_592){this.init_cb(this,function(){this.checkedMultiSelect.attr("value",_592);});return this;},setMultiSelectVisible:function(_593){this._checkedMultiSelectContainer.style.display=_593?"":"none";},_onClick:function(){var div=this._checkedMultiSelectContainer;if(div.style.display!==""){this.placeDropDown();}div.style.display=div.style.display?"":"none";},_on_global_click:function(e){if(!alp.util.isDescendant(e.target,[this.domNode,this._checkedMultiSelectContainer])){this.setMultiSelectVisible(false);}}});}if(typeof dojo==="undefined"||!dojo._hasResource["dojo.behavior"]){typeof dojo==="undefined"||(dojo._hasResource["dojo.behavior"]=true);dojo.provide("dojo.behavior");dojo.behavior=new function(){function _594(obj,name){return obj[name]||(obj[name]=[]);};var _595=0;function _596(obj,_597,func){var _598={};for(var x in obj){if(!(x in _598)){if(!func){_597(obj[x],x);}else{func.call(_597,obj[x],x);}}}};this._behaviors={};this.add=function(_599){var _59a={};_596(_599,this,function(_59b,name){var _59c=_594(this._behaviors,name);if(typeof _59c["id"]!="number"){_59c.id=_595++;}var _59d=[];_59c.push(_59d);if((dojo.isString(_59b))||(dojo.isFunction(_59b))){_59b={found:_59b};}_596(_59b,function(rule,_59e){_594(_59d,_59e).push(rule);});});};var _59f=function(node,_5a0,_5a1){if(dojo.isString(_5a0)){if(_5a1=="found"){dojo.publish(_5a0,[node]);}else{dojo.connect(node,_5a1,function(){dojo.publish(_5a0,arguments);});}}else{if(dojo.isFunction(_5a0)){if(_5a1=="found"){_5a0(node);}else{dojo.connect(node,_5a1,_5a0);}}}};this.apply=function(){_596(this._behaviors,function(_5a2,id){dojo.query(id).forEach(function(elem){var _5a3=0;var bid="_dj_behavior_"+_5a2.id;if(typeof elem[bid]=="number"){_5a3=elem[bid];if(_5a3==(_5a2.length)){return;}}for(var x=_5a3,tver;tver=_5a2[x];x++){_596(tver,function(_5a4,_5a5){if(dojo.isArray(_5a4)){dojo.forEach(_5a4,function(_5a6){_59f(elem,_5a6,_5a5);});}});}elem[bid]=_5a2.length;});});};};dojo.addOnLoad(dojo.behavior,"apply");}if(typeof dojo==="undefined"||!dojo._hasResource["alp.gmap.Map"]){typeof dojo==="undefined"||(dojo._hasResource["alp.gmap.Map"]=true);dojo.provide("alp.gmap.Map");alp.gmap.i18n={};alp.later(function(){alp.gmap.i18n=dojo.i18n.getLocalization("alp","gmap");});(function(f){if(typeof GMap!=="undefined"){f.apply(this);}else{dojo["require"]("alp.google");alp.gmap_asyncdfrd().addCallback(this,f);}})(function(){var CN="alp.gmap.Map",_5a7=Array.prototype.slice;dojo.declare(CN,[dijit._Widget],{continuousZoom:true,scrollWheelZoom:true,initialView:undefined,bboxPadding:[0,0,0,0],initGmapTypes:undefined,initSetMapType:undefined,initShowPanoramio:false,initShowWikipedia:false,initShowWebcam:false,userPostCreate:undefined,tileLayerOverlays:undefined,tileLayerOverlays_init:undefined,mapControls:undefined,mapTypeControl:null,hasFullScreen:undefined,fullCtrl:true,fullCtrlHtml:undefined,_fullCtrlHtmlDefault:"<input id=\"agfsPanoCheckbox\" type=\"checkbox\" style=\"vertical-align:middle\"><label for=\"agfsPanoCheckbox\">Panoramio</label></input>"+" &nbsp;&nbsp;&nbsp;"+"<input id=\"agfsWikiCheckbox\" type=\"checkbox\" style=\"vertical-align:middle\"><label for=\"agfsWikiCheckbox\">Wikipedia</label></input>"+" &nbsp;&nbsp;&nbsp;"+"<span id='agSmallSwitch' class='agfsSwitch agMapFullSwitch'>Karte verkleinern</span>",fullCtrlHeight:"24px",gmap:undefined,new_geocoder_autocomplete_opts:undefined,FULLSCREEN_CLASS:"agMapFullScreen",waiting_container_id:"alpmap_waiting_container",MAPTOOLS:function(){return ["search","network_dropdown","layer_dropdownchecked","maptype_dropdown","map_minimize","map_maximize"];},MAPTOOLS_HTML_EXAMPLE:"<div class=\"float_left\" style=\"padding-left:5px; padding-top:3px;\" id=\"alpmap_waiting_container\">"+"<img src=\"/res/map/outdooractive_in_progress_animated.gif?@ts@\">"+"</div>"+"<div class=\"float_left\" style=\"padding-left:5px; padding-top:3px;\" id=\"alpmap_logo_container\">"+"<div id=\"mapbar_logo\"></div>"+"</div>"+"<div class=\"float_left\" style=\"padding-left:5px; padding-top:3px; visibility: hidden;\" id=\"alpmap_search_container\">"+"<div id=\"alp_searchstring\"></div>"+"<button class=\"geocoder-button\" id=\"alp_search\"><img src=\"/res/map/button_suchen.gif?@ts@\"/></button>"+"</div>"+"<div class=\"float_left\" style=\"padding-left:11px; padding-top:3px; visibility: hidden;\" id=\"alpmap_network_dropdown_container\"></div>"+"<div class=\"float_left\" style=\"padding-left:11px; padding-right: 5px; padding-top:1px; visibility: hidden;\" id=\"alpmap_layer_dropdownchecked_container\"></div>"+"<div class=\"float_right\" style=\"padding-right:5px; visibility: hidden;\" id=\"alpmap_minimize_container\"><a id=\"smallscreen_link\" class=\"layer-text\"><img src=\"/res/map/map_minimize.png\" alt=\"Karte verkleinern\"  title=\"Karte verkleinern\"/></a></div>"+"<div class=\"float_right\" style=\"padding-left:6px; visibility: hidden;\" id=\"alpmap_maximize_container\"><a id=\"fullscreen_link\" class=\"layer-text\"><img src=\"/res/map/map_fullscreen.png\" alt=\"Karte vergr&ouml;&szlig;ern\"  title=\"Karte vergr&ouml;&szlig;ern\"/></a></div>"+"<div class=\"float_right\" style=\"padding-left:11px; padding-right: 5px; padding-top:3px; visibility: hidden;\" id=\"alpmap_maptype_dropdown_container\"></div>",maptools_selection:undefined,maptools_visible:undefined,layer:undefined,layer_onchange:undefined,layer_dropdownchecked_container_id:"alpmap_layer_dropdownchecked_container",layer_dropdownchecked_init:undefined,maptype_dropdown_container_id:"alpmap_maptype_dropdown_container",maptype_dropdown_name:function(name){return (name.toLowerCase()==="earth")?alp.gmap.i18n.view3d:name;},map_maximize_container_id:"alpmap_maximize_container",map_minimize_container_id:"alpmap_minimize_container",network_dropdown_container_id:"alpmap_network_dropdown_container",network_list:undefined,network_onchange:undefined,search_container_id:"alpmap_search_container",set_bbox_maxZoom:null,gearth_layers:["LAYER_BORDERS","LAYER_ROADS"],kml_3d_flight:undefined,ge_with_2dmapbutton:true,fullCtrlReaction:function(_5a8){},fullCtrlOnClick:function(e){var url;if(!e.target){return;}if(!e.target.id){return;}if(e.target.id==="agfsPanoCheckbox"){url=this.GLAYER_URL_PANORAMIO;this.setGLayerVisible(url,e.target.checked);}if(e.target.id==="agfsWikiCheckbox"){url=this.GLAYER_URL_WIKIPEDIA;this.setGLayerVisible(url,e.target.checked);}if(e.target.id==="agPanoSwitch"){url=this.GLAYER_URL_PANORAMIO;this.setGLayerVisible(url,!this.isGLayerVisible(url));}if(e.target.id==="agWikiSwitch"){url=this.GLAYER_URL_WIKIPEDIA;this.setGLayerVisible(url,!this.isGLayerVisible(url));}if(e.target.id==="agSmallSwitch"){this.setFullScreen(false);}},"class":"agMap",being_moved:null,being_dragged:null,being_moved_or_dragged:null,constructor:function(){var me=this;me.being_dragged=new alp.data.BoolState();me.being_moved=new alp.data.BoolState();me._state3d=new alp.data.BoolState({init_value:false});var _5a9=me._being_moved_or_dragged=alp.data.orstate(me.being_dragged,me.being_moved,me._state3d);var b=me.being_moved_or_dragged=new alp.data.BoolState();_5a9.bind_to(b);b.changed_cb(alp.util.asyncHitch(function(){b.set(_5a9.get());},me,1000));var o=dojo.getObject("alpConfig.map");if(o){alp.util.mixinDefaults(me,o);}me.initSetMapType=alp.util.fun_or_not(me.initSetMapType);dojo.forEach(["getBoundsZoomLevel","getCurrentMapType","getMapTypes"],function(s){me[s]=function(){var m=me.gmap;return m&&m[s]&&m[s].apply(m,arguments);};});},getDiv:function(){return alp.m(this.gmap,"getDiv");},setCenter:function(){var args=arguments,me=this;me.gmap_init_cb(function(){me.being_moved_or_dragged.set(true);me.gmap.setCenter.apply(me.gmap,args);});},setZoom:function(){var args=arguments,me=this;me.gmap_init_cb(function(){me.being_moved_or_dragged.set(true);me.gmap.setZoom.apply(me.gmap,args);});},setMapType:function(){var args=arguments,me=this;me.gmap_init_cb(function(){me.being_moved_or_dragged.set(true);alp.gmap.setMapType.apply(alp.gmap,[me.gmap].concat(_5a7.call(args)));});},postCreate:function(_5aa){var gm=google.maps,a,ddd,_5ab,me,s,dh,o;alp.util.conlog(this.declaredClass+".postCreate("+_5aa+") starts.");me=this;dh=dojo.hitch;this._eh=this._eh||{};this._par_init||(this._par_init=(dh(this,function(){alp.util.mixinDefaults(this,{maptools_selection:this.MAPTOOLS()});})())||true);if(this.fullCtrlHtml===undefined){this.fullCtrlHtml=this._fullCtrlHtmlDefault;}var _5ac={};if(this.initGmapTypes){_5ac.mapTypes=this.initGmapTypes;}var m=this.gmap;if(m){if(_5ac&&_5ac.mapTypes){alp.gmap.setGMapTypes(m,_5ac.mapTypes);if(0>dojo.indexOf(m.getMapTypes(),m.getCurrentMapType())){m.setMapType(m.getMapTypes()[0]);}alp.util.unleak(m);}}else{m=alp.util.unleak(new GMap2(this.domNode,_5ac));}if(!(this.initGmapTypes)){m.addMapType(dojo.global.G_SATELLITE_3D_MAP);m.addMapType(dojo.global.G_PHYSICAL_MAP);}this.gmap=m;if(!(this.gmap.getMapTypes().length>0)){throw new Error(CN+".postCreate(): the map must contain at least one map type! Currently this.gmap.getMapTypes() returns: [ "+this.gmap.getMapTypes()+" ]");}(function(){var old=dojo.hitch(m,m.setMapType);m.setMapType=function(mt){var args=arguments,to3d=mt&&alp.gmap.equalGMapTypes(mt,dojo.global.G_SATELLITE_3D_MAP);if(!to3d){old.apply(null,args);return;}me.setFullScreen(true);window.setTimeout(function(){old.apply(null,args);},100);};})();var pboa=new alp._gmap2_3.view.PoweredByOA();pboa.setMap(m);var _5ad=new gm.ScaleControl(),_5ae=new gm.ControlPosition(gm.ANCHOR_BOTTOM_LEFT,new gm.Size(65+dojo.contentBox(pboa.getDiv()).w,0));m.addControl(_5ad,_5ae);var i=m.getMapTypes();m.setUI(dojo.mixin(m.getDefaultUI(),{maptypes:{normal:!!(i&&(-1<dojo.indexOf(i,G_NORMAL_MAP))),satellite:!!(i&&(-1<dojo.indexOf(i,G_SATELLITE_MAP))),hybrid:!!(i&&(-1<dojo.indexOf(i,G_HYBRID_MAP))),physical:!!(i&&(-1<dojo.indexOf(i,G_PHYSICAL_MAP)))},controls:{scalecontrol:false,maptypecontrol:false,largemapcontrol3d:false}}));if((!this._controlDiv)&&(false!==this.mapControls)){ddd=(this._controlDiv={});_5ab=!!dojo.byId(this.maptype_dropdown_container_id);a={GLargeMapControl3D:new GControlPosition(G_ANCHOR_TOP_RIGHT,new GSize(7,7+(_5ab?0:24)))};if(!_5ab&&(true===this.mapTypeControl)){a.GMapTypeControl=new GControlPosition(G_ANCHOR_TOP_RIGHT,new GSize(7,7));}alp.util.objForEach(a,function(name,pos){var A=dojo.global[name];var a=new A();a.initialize=function(){return (ddd[name]=A.prototype.initialize.apply(this,arguments));};m.addControl(a,pos);});}GEvent.addListener(m,"dragstart",dojo.hitch(this.being_dragged,"set",true));GEvent.addListener(m,"dragend",dojo.hitch(this.being_dragged,"set",false));GEvent.addListener(m,"movestart",dojo.hitch(this.being_moved,"set",true));GEvent.addListener(m,"moveend",dojo.hitch(this.being_moved,"set",false));this._eh.gme=this._eh.gme||GEvent.addListener(m,"moveend",alp.util.asyncHitch("_moveend",this));this._eh.gmtc=this._eh.gmtc||GEvent.addListener(m,"maptypechanged",alp.util.asyncHitch("_maptypechanged",this));this._eh.gmtc_3d=this._eh.gmtc_3d||GEvent.addListener(m,"maptypechanged",alp.util.asyncHitch("_check_switched_to_3d",this));this._eh.dialog3d||(this._eh.dialog3d=alp.addOnParse(dh(this,function(){alp.util.getDfrd("dijit.Dialog.prototype",null,250,10).addCallback(this,function(dDp){this._eh.dialog3d_c=this._eh.dialog3d_c||dojo.connect(dDp,"show",this,"set2d");});}))||true);this._eh.gze_cz=this._eh.gze_cz||GEvent.addListener(m,"zoomend",alp.util.asyncHitch("constrainZoom",this));this._eh.gmtc_cz=this._eh.gmtc_cz||GEvent.addListener(m,"maptypechanged",alp.util.asyncHitch("constrainZoom",this));this._eh.gmtc_ug=this._eh.gmtc_ug||GEvent.addListener(m,"maptypechanged",alp.util.asyncHitch("updateGeometry",this));this._eh.wr_fs||(this._eh.wr_fs=dojo.connect(window,"onresize",this,function(){if(this.isFullScreen()){this.updateGeometry();this.onResize();}}));if(this.initSetMapType!=null){alp.gmap.setMapType(m,this.initSetMapType);}var _5af;if(this.initialView){alp.util.conlog("Map.js this.initialView:",this.initialView);var z;if(dojo.isString(this.initialView)){this.initialView=dojo.trim(this.initialView).split(",");}var v=this.initialView;if(!_5aa){if(v.length==3){var cc=new GLatLng(parseFloat(v[1]),parseFloat(v[0]));z=parseInt(v[2],10);alp.util.conlog("alp.gmap.Map.postCreate() [initialView 3] about to setCenter to:",cc,z);m.setCenter(cc,z);_5af=true;}else{if(v.length==4){alp.util.conlog("alp.gmap.Map.postCreate() [initialView 4] about to alp.gmap.set_bbox to:",v,", bboxPadding:",this.bboxPadding);var s=m.getSize();alp.gmap.set_bbox(m,v,this.bboxPadding,{now:true,maxZoom:this.set_bbox_maxZoom});if(!(s.width>0&&s.height>0)){alp.util.asyncHitch(alp.gmap.set_bbox,1000)(m,v,this.bboxPadding,{maxZoom:this.set_bbox_maxZoom});}_5af=true;}}}}if(!m.isLoaded()){if(djConfig.isDebug){console.log("alp.gmap.Map.postCreate() [initialView 5] setCenter() to the default: germany");}if(!(_5aa||_5af)){m.setCenter(new GLatLng(51.22,10.57),6);}}if(!(m.isLoaded()||_5aa||_5af)){console.error(this.declaredClass+": failed to initialize the GMap so far... Problems may occur until the GMap is fully initialized.");}if(this.tileLayerOverlays){this.setTileLayerOverlays(this.tileLayerOverlays);}if(this.continuousZoom){m.enableContinuousZoom();}if(this.scrollWheelZoom){m.enableScrollWheelZoom();}if(this.initShowPanoramio){alp.addOnParse(dh(this,"showPanoramio"));}if(this.initShowWikipedia){alp.addOnParse(dh(this,"showWikipedia"));}if(this.initShowWebcam){alp.addOnParse(dh(this,"showWebcam"));}if(this.userPostCreate){alp.addOnParse(dh(this,"userPostCreate",this));}this.setFullScreen(this.isFullScreen());this.setOverlayVisibility();alp.addOnParse(alp.util.asyncHitch(function(){this._overlay_dfrd=this._overlay_dfrd||new dojo.Deferred();if(this._overlay_dfrd.fired===-1){this._overlay_dfrd.callback(true);}},this));if(this.tileLayerOverlays_init){this._overlay_dfrd.addCallback(this,function(){dojun.forIn(this.tileLayerOverlays_init,function(v,k){this.setOverlayVisibility(k,v);},this);});}this._findHideMapTools();this._eh.cmt=this._eh.cmt||alp.addOnParse(alp.util.asyncHitch("_createMapTools",this))||true;if(this.gearth_layers){this._eh.s3d_sgl=this._eh.s3d_sgl||dojo.connect(this,"switched_to_3d",alp.util.asyncHitch("show_gearth_layers",this));}o=this.kml_3d_flight;if(alp.at(o,"kml_url")){this._eh.kml3d=this._eh.kml3d||dojo.connect(this,"switched_to_3d",alp.util.asyncHitch("kml_3d_flight_update",this));}var f=dojo.hitch(this,function(){if(!m.isLoaded()){return;}dojo.forEach(m.getMapTypes(),function(mt){if(mt&&mt.alp_set_gmap){mt.alp_set_gmap(m);}});});f();window.setTimeout(f);this.gmap_init_cb(f);alp.util.conlog(this.declaredClass+".postCreate("+_5aa+") ends.");},setTileLayerOverlays:function(tlo){tlo=tlo||this.tileLayerOverlays;if(!tlo){return;}this._gtilelayeroverlays=this._gtilelayeroverlays||{};alp.util.objForEach(tlo,function(name,args){var ov;if(!(name&&args)){return;}if(!this._gtilelayeroverlays[name]){if(args instanceof GTileLayerOverlay){ov=args;}else{if(args.length===undefined){ov=new GTileLayerOverlay(args);}else{ov=new GTileLayerOverlay(args[0],args[1]);}}this._gtilelayeroverlays[name]={ov:ov,added:false};}},this);},gmap_init_cb:function(){this.tilesLoaded_cb.apply(this,arguments);},_findHideMapTools:function(){if(this.maptools_created){return;}dojo.forEach(this.MAPTOOLS(),function(s){var scid=this[s+"_container_id"];var sc="_"+s+"_container";var c;c=this[sc]=dojo.byId(scid);if(!c){return;}c.style.visibility="hidden";c.style.display="none";},this);},_search_gcwDfrd:new alp.util.SafeDeferred(),_network_select_dfrd:new alp.util.SafeDeferred(),_layer_ddc_dfrd:new alp.util.SafeDeferred(),_createMapTools:function(){var a,b;if(this.maptools_created){return;}this.maptools_created=[];a={};dojo.hitch(this,function(){var sss="search";if(-1<dojo.indexOf(this.maptools_selection,sss)){a["#"+this.search_container_id+" #alp_searchstring"]={found:dojo.hitch(this,function(node){if(this._search_gcW){return;}this._search_gcW=new alp.gmap.x.Geocoder({withautocomplete:true,new_geocoder_autocomplete_mix:["alp.data.AutoCompleteAlpsteinGeocode","alp.data.AutoCompleteGoogleGeocode"],new_geocoder_autocomplete_opts:this.new_geocoder_autocomplete_opts},node,this);this._search_gcW.init();this._search_gcwDfrd.callback(this._search_gcW);this.maptools_created.push(sss);})};a["#"+this.search_container_id+" #alp_search"]={found:dojo.hitch(this,function(node){if(!this._search_gcW){return;}dojo.connect(node,"onclick",this._search_gcW,"submit");})};}})();dojo.hitch(this,function(){var sss="network_dropdown";if(-1<dojo.indexOf(this.maptools_selection,sss)){a["#"+this.network_dropdown_container_id]={found:dojo.hitch(this,function(node){var a,f,s,_5b0;a=null;f=null;if(!a){var rr=alp.cfg.routing();a=dojo.map(rr,function(x){return [x.name,x.title()];});}if(!f){var rr=alp.cfg.routing();f=function(map,_5b1){var n=rr._find(_5b1)||rr._find(rr._defaultName);dojo.getObject("alpConfig.routing",true).url=n.url;var d=dojo.getObject("alp._obj.digitizor");if(d){if(d.model.setRoutingEngineClass){d.model.setRoutingEngineClass(n.engineClass);}}for(var k in map._gtilelayeroverlays){if(map._gtilelayeroverlays.hasOwnProperty(k)){map.setOverlayVisibility(k,k===_5b1);}}dojo.getObject("alp._obj",true).networkName=_5b1;};}if(!(a&&f)){console.error(this.declaredClass+"._createMapTools(): incomplete network dropdown configuration.");return;}s="alpmap-network-select";node.innerHTML="<form><select class=\""+s+"\">"+dojo.map(a,function(x){return "<option value=\""+x[0]+"\" >"+x[1]+"</option>";}).join("")+"</select></form>";this.maptools_created.push(sss);_5b0=dojo.query("."+s,node)[0];this._network_select=_5b0;var _5b2=dojo.hitch(this,function(){var map=this,_5b3=this._getNetworkSelectValue();f(map,_5b3);var d=dojo.getObject("alp._obj.digitizor");alp.m(d,"setRoutingNetwork",_5b3);});dojo.connect(_5b0,"onchange",_5b2);this._network_select_dfrd.callback({fixNetworkName:dojo.hitch(this,"fixNetworkName"),getValue:dojo.hitch(this,"_getNetworkSelectValue"),setValue:dojo.hitch(this,"_setNetworkSelectValue")});window.setTimeout(_5b2);})};}})();dojo.hitch(this,function(){var sss="layer_dropdownchecked";if(-1<dojo.indexOf(this.maptools_selection,sss)){a["#"+this.layer_dropdownchecked_container_id]={found:dojo.hitch(this,function(node){var a,f,o,_5b4;a=this.layer||dojo.getObject("alpConfig.map.layer");f=this.layer_onchange||dojo.getObject("alpConfig.map.layer_onchange");if(!(a&&f)){console.error(this.declaredClass+"._createMapTools(): incomplete layer dropdownchecked configuration. Please provide both alpConfig.map.layer and alpConfig.map.layer_onchange");return;}a=dojo.mixin({},a);a.label=alp.util.fun_or_not(a.label);o=dojo.getObject("alp._obj",true);o.layer_ddc=new alp.util.w.DropDownChecked(a);node.appendChild(o.layer_ddc.domNode);this.maptools_created.push(sss);_5b4=dojo.hitch(this,function(){f(this,o.layer_ddc.checkedMultiSelect.getValue());});dojo.connect(o.layer_ddc.checkedMultiSelect,"onChange",null,_5b4);dojo.connect(this,"resized",o.layer_ddc,"placeDropDown");dojo.connect(this,"updateGeometry",o.layer_ddc,"placeDropDown");o.layer_ddc.setValue(this.layer_dropdownchecked_init||o.layer_ddc.checkedMultiSelect.attr("value"));this._layer_ddc_dfrd.callback(o.layer_ddc);})};}})();dojo.hitch(this,function(){var sss="maptype_dropdown";if(-1<dojo.indexOf(this.maptools_selection,sss)){a["#"+this.maptype_dropdown_container_id]={found:dojo.hitch(this,function(node){var m,_5b5,me,s,_5b6;m=this.gmap;me=this;s="alpmap-maptype-select";node.innerHTML="<form><select class=\""+s+"\">"+dojo.map(m.getMapTypes(),function(mt){var _5b7=mt.getName(true);var _5b8=mt.getName();_5b8=(this.maptype_dropdown_name&&this.maptype_dropdown_name(_5b8))||_5b8;return "<option value=\""+_5b7+"\" >"+_5b8+"</option>";},this).join("")+"</select></form>";this.maptools_created.push(sss);_5b6=dojo.query("."+s,node)[0];dojo.connect(_5b6,"onchange",this,function(){var mt=m.getMapTypes()[_5b6.selectedIndex];m.setMapType(mt);});_5b5=function(){_5b6.selectedIndex=alp.gmap.mapTypeIndex(m);};GEvent.addListener(m,"maptypechanged",_5b5);setTimeout(_5b5);})};}})();dojo.hitch(this,function(){var sss="map_maximize";if(-1<dojo.indexOf(this.maptools_selection,sss)){a["#"+this.map_maximize_container_id+" #fullscreen_link"]={onclick:dojo.hitch(this,"setFullScreen",true)};this.maptools_created.push(sss);}})();dojo.hitch(this,function(){var sss="map_minimize";if(-1<dojo.indexOf(this.maptools_selection,sss)){a["#"+this.map_minimize_container_id+" #smallscreen_link"]={onclick:dojo.hitch(this,"setFullScreen",false)};this.maptools_created.push(sss);}})();a["#"+this.waiting_container_id]={found:function(node){node.style.display="none";}};dojo.behavior.add(a);dojo.behavior.apply();this.maptools_visible=this.maptools_visible||this.maptools_created;dojo.forEach(this.MAPTOOLS(),function(s){var sc="_"+s+"_container";var c=this[sc];if(!c){return;}c.style.visibility=(0>dojo.indexOf(this.maptools_visible,s))?"hidden":"";c.style.display=(0>dojo.indexOf(this.maptools_visible,s))?"none":"";},this);},hasOverlay:function(_5b9){var o=this._gtilelayeroverlays;return o&&_5b9&&_5b9 in o;},setOverlayVisibility:function(_5ba,_5bb){alp.util.conlog(this,": alp.gmap.Map.setOverlayVisibility(",_5ba,",",_5bb,")");this._overlay_dfrd=this._overlay_dfrd||new dojo.Deferred();if(!_5ba){return;}var f=dojo.hitch(this,function(){if(!this.gmap.isLoaded()){alp.later(f);}var o=this._gtilelayeroverlays;o=o&&o[_5ba];if(!o){console.error("alp.gmap.Map.setOverlayVisibility("+_5ba+","+_5bb+") on this:"+this+"could not find the overlay.");return;}if(_5bb&&(!o.added)){this.gmap.addOverlay(o.ov);o.added=true;}else{if((!_5bb)&&o.added){this.gmap.removeOverlay(o.ov);o.added=false;}}});this._overlay_dfrd.addCallback(function(a){alp.later(f);return a;});},isFullScreen:function(){return dojo.hasClass(document.body,this.FULLSCREEN_CLASS);},setFullScreen:function(_5bc){_5bc=!!(_5bc&&this.hasFullScreen);var _5bd=this.isFullScreen(),_5be;this._setFullScreen(_5bc,_5bd);_5be=this.isFullScreen();if(_5bd!==_5be){this._fullscreen_mode_changed(_5be);}},_setFullScreen:function(_5bf,_5c0){var me=this;if(_5bf==null){_5bf=true;}var is3d,mc,ge,ge_v,_5c1=this.declaredClass+"._setFullScreen("+_5bf+", "+_5c0+")";dojo.hitch(this,function(_5c2){is3d=this.is3d();if(is3d){if(!_5bf&&me.hasFullScreen){me.set3d(false);window.setTimeout(function(){me.setFullScreen(_5bf);},100);return;}this.get_earth_async_cb(this,function(_5c3){try{ge=_5c3;if(ge){ge_v=ge.getView();mc=ge_v&&ge_v.copyAsLookAt(ge.ALTITUDE_RELATIVE_TO_GROUND);}}catch(e){console.error(_5c1+": while recording the position, caught an exception: "+e);}_5c2();});return;}mc=this.gmap.getCenter();_5c2();})(dojo.hitch(this,function(){var ie7=alp.util.likeIE()&&dojo.isIE<8;alp.util.setClass(document.body,this.FULLSCREEN_CLASS,_5bf);if(ie7){alp.util.setClass(document.documentElement,this.FULLSCREEN_CLASS,_5bf);}var _5c4={body:"; width: 100%; height: 100%; padding: 0; margin: 100%;",map:"; width: 100%; height: 100%; top: 0px; left: 0px; z-index: 1000; margin: 0; padding: 0;"+(dojo.byId("space-map-container")?"position : relative;":"position : fixed;")};if(_5bf&&!_5c0&&!this._smallscreen_style){this._smallscreen_style={body:dojo.body().getAttribute("style"),map:me.domNode.getAttribute("style")};if(ie7){dojo.mixin(this._smallscreen_style,{map_style_position:me.domNode.style.position,map_style_zIndex:me.domNode.style.zIndex});}}if(_5bf!=_5c0&&this._smallscreen_style){me.domNode.setAttribute("style",this._smallscreen_style.map+(_5bf?_5c4.map:""));dojo.body().setAttribute("style",this._smallscreen_style.body+(_5bf?_5c4.body:""));if(_5bf){window.setTimeout(function(){me.updateGeometry();if(!me._fullscreen_IE_workaround){me._fullscreen_IE_workaround=function(){if(!me.isFullScreen()){return;}var s=me.domNode.getAttribute("style");if(!(/\bleft\s*:\s*0/.test(s)&&/\btop\s*:\s*0/.test(s))){me.domNode.style.left="0px";me.domNode.style.top="0px";me.domNode.style.margin="0px";me.domNode.style.padding="0px";me.domNode.setAttribute("style",me._smallscreen_style.map+_5c4.map);var sms=this._smallscreen_style;if(sms){if("map_style_position" in sms){me.domNode.style.position="fixed";}if("map_style_zIndex" in sms){me.domNode.style.zIndex=1000;}}}};dojo.connect(me,"maptypechanged",me,"_fullscreen_IE_workaround");window.setInterval(me._fullscreen_IE_workaround,333);}me._fullscreen_IE_workaround();});}else{var sms=this._smallscreen_style;if(sms){var s7="map_style_position";if(s7 in sms){me.domNode.style.position=sms[s7];}var s7="map_style_zIndex";if(s7 in sms){me.domNode.style.zIndex=sms[s7];}}}}if(this._controlDiv){alp.util.objForEach(this._controlDiv,function(name,div){div.style.marginTop=(_5bf?this.fullCtrlHeight:"");},this);}if(this.fullCtrl){if(_5bf){if(!this._fullctrl){this._fullctrl=[];if(this.fullCtrlHtml){var ctrl=new alp.gmap.Button(this.fullCtrlHtml,dojo.hitch(this,this.fullCtrlOnClick),"agfsToolbarCont","agfsToolbar");ctrl.setButtonStyle_=dojo.hitch(ctrl,function(_5c5){alp.gmap.Button.prototype.setButtonStyle_(_5c5);_5c5.style.textDecoration="";_5c5.style.color="";_5c5.style.border="";_5c5.style.width="";_5c5.style.textAlign="";_5c5.style.cursor="";});ctrl.getDefaultPosition=function(){return new GControlPosition(G_ANCHOR_TOP_LEFT,new GSize(0,0));};this._fullctrl.push(ctrl);}}if(this.gmap){dojo.forEach(this._fullctrl,function(c){this.gmap.addControl(c);},this);dojo.query("#agfsPanoCheckbox").forEach(function(n){n.checked=this.isGLayerVisible(this.GLAYER_URL_PANORAMIO);},this);dojo.query("#agfsWikiCheckbox").forEach(function(n){n.checked=this.isGLayerVisible(this.GLAYER_URL_WIKIPEDIA);},this);}}else{if(this._fullctrl){dojo.forEach(this._fullctrl,function(c){this.gmap.removeControl(c);},this);var o=dojo.query(".agcNav");if(o){o.forEach(function(x){x.style.top="0px";},this);}}}}if(typeof this.fullCtrlReaction==="function"){this.fullCtrlReaction(_5bf);}this.onResize();if(is3d){}else{if(this.gmap&&mc){alp.util.conlog("alp.gmap.Map this.gmap && mc: setCenter( mc ), mc:",mc);this.gmap.setCenter(mc);}}}));},_glayers:{},GLAYER_URL_PANORAMIO:"com.panoramio.all",GLAYER_URL_WIKIPEDIA:"org.wikipedia.de",GLAYER_URL_WEBCAM:"com.google.webcams",showPanoramio:function(){this.showGLayer(this.GLAYER_URL_PANORAMIO);},hidePanoramio:function(){this.hideGLayer(this.GLAYER_URL_PANORAMIO);},showWikipedia:function(){this.showGLayer(this.GLAYER_URL_WIKIPEDIA);},hideWikipedia:function(){this.hideGLayer(this.GLAYER_URL_WIKIPEDIA);},showWebcam:function(){this.showGLayer(this.GLAYER_URL_WEBCAM);},hideWebcam:function(){this.hideGLayer(this.GLAYER_URL_WEBCAM);},showGLayer:function(_5c6){this.setGLayerVisible(_5c6,true);},hideGLayer:function(_5c7){this.setGLayerVisible(_5c7,false);},setGLayerVisible:function(_5c8,_5c9){alp.util.conlog("Map.setGLayerVisible",_5c8,_5c9," currently visible:",this.isGLayerVisible(_5c8));if(typeof GLayer==="undefined"){console.error("Map.js: GLayer is not defined.");return false;}var _5ca,all=this._glayers;if(!this.gmap){return;}if(_5c9){if(this.isGLayerVisible(_5c8)){return;}_5ca=(all[_5c8]=all[_5c8]||new GLayer(_5c8));_5ca._alpVisible=true;this.gmap.addOverlay(_5ca);}else{if(!this.isGLayerVisible(_5c8)){return;}_5ca=all[_5c8];if(_5ca){_5ca._alpVisible=false;this.gmap.removeOverlay(_5ca);}}},isGLayerVisible:function(_5cb){var _5cc=this._glayers[_5cb];return !!(_5cc&&_5cc._alpVisible);},onResize:function(){this.updateGeometry();this.gmap.checkResize();this._resized();},constrainZoom:function(){if((!this.gmap)||this.is3d()){return;}var o=this.gmap.getCurrentMapType();var z=this.gmap.getZoom();var _5cd=Math.min(o.getMaximumResolution(),Math.max(o.getMinimumResolution(),z));if(z!==_5cd){alp.util.conlog(this.declaredClass+".constrainZoom(): changing the zoom level from "+z+" to "+_5cd);this.gmap.setZoom(_5cd);}},updateGeometry:function(){var c,_5ce,body=dojo.body();if(this.isFullScreen()){_5ce=dijit.getViewport();body.style.marginLeft="0";body.style.marginTop="0";body.style.marginRight="0";body.style.marginBottom="0";c=dojo.coords(this.domNode);this.domNode.style.left=(c.l-c.x)+"px";this.domNode.style.top=(c.t-c.y)+"px";this.domNode.style.width=_5ce.w+"px";this.domNode.style.height=_5ce.h-this.fullCtrlHeight.replace(/px/g,"")+"px";var noli=dojo.query("#space-map-container");if(!noli.length){this.domNode.style.paddingTop=this.fullCtrlHeight;}else{noli.style({paddingTop:this.fullCtrlHeight});}}else{dojo.query("#space-map-container").style({paddingTop:0});}},getGcwDfrd:function(){return this._search_gcwDfrd;},getNetworkSelectDfrd:function(){return this._network_select_dfrd;},fixNetworkName:function(_5cf){var a,b,s;var arr=this._getNetworkSelectValueArr();if(arr){if(_5cf&&-1<dojo.indexOf(arr,_5cf)){return _5cf;}else{return arr[0];}}a=dojo.getObject("alpConfig.map.network_list");if(a){for(b=0;b<a.length;b++){if(a[b][0]===_5cf){return _5cf;}}}s="default";return (a&&((a[s]&&s)||(a[0]&&a[0][0])))||s;},_getNetworkSelectValue:function(){var a=this._network_select;var ret=a&&a.options[a.selectedIndex].value;return ret;},_getNetworkSelectValueArr:function(){var ret=[],a=this._network_select,ao=a&&a.options;if(ao){var n=ao.length;ret=new Array(n);for(var i=0;i<n;i++){ret[i]=ao[i].value;}}return ret;},_setNetworkSelectValue:function(name){name=this.fixNetworkName(name);if(name===this._getNetworkSelectValue()){return;}var a,o,_5d0;_5d0=this._network_select;o=_5d0&&_5d0.options;if(o&&o.length){for(a=0;a<o.length;a++){if(o[a].value===name){if(_5d0.selectedIndex!=a){_5d0.selectedIndex=a;}break;}}}},getLayerDdcDfrd:function(){return this._layer_ddc_dfrd;},layerddc_cb:alp.util.dfrd_cb("getLayerDdcDfrd"),get_earth_async_dfrd:function(){var ad,me=this;if(!this._earth_async_dfrd){this._earth_async_dfrd=ad=new alp.util.SafeDeferred();this.get_gmap_dfrd().addCallback(function(gmap){gmap.getEarthInstance(function(ge){if(!ge){console.error("alp.gmap.Map.get_earth_async_dfrd() got an invalid GEPlugin instance:",ge);return;}ad.callback(ge);});});if(me.ge_with_2dmapbutton){ad.addCallback(function(ge){alp.gearth.add_2d_map_button(ge,function(){var pos=dojo.position(me.gmap.getContainer());return new google.maps.Size(pos.w,pos.h);}).onclick(function(){me.set3d(false);});});}}return this._earth_async_dfrd;},get_earth_async_cb:alp.util.dfrd_cb("get_earth_async_dfrd"),get_gmap_dfrd:function(){return (this._gmap_dfrd=this._gmap_dfrd||alp.util.getDfrd("gmap",this));},show_gearth_layers:function(){var is3d=this.is3d(),_5d1;_5d1="alp.gmap.Map.show_gearth_layers";alp.util.conlog(_5d1+"()",is3d);if(!is3d){return;}this.get_earth_async_cb(this,function(ge){dojo.forEach(this.gearth_layers,function(name){alp.util.conlog(_5d1+"(): activating layer: "+name);if(ge){ge.getLayerRoot().enableLayerById(ge[name],true);}},this);if(ge){ge.getWindow().setVisibility(true);}});},kml_3d_flight_update:function(){var cfg,is3d=this.is3d(),_5d2,_5d3;_5d2="alp.gmap.Map.kml_3d_flight_update";alp.util.conlog(_5d2+"() is3d:",is3d);if(!is3d){return;}cfg=dojo.mixin({speedfactor:10},dojo.getObject("alpConfig.map.kml_3d_flight"),this.kml_3d_flight);if(!(cfg&&dojun.every(["kml_url","speedfactor"],function(x){return cfg[x];}))){return;}_5d3=((typeof cfg)==="string")?cfg.kml_url:cfg.kml_url();alp.util.conlog(_5d2+"() kml_url:",_5d3);if(!_5d3){return;}this.get_earth_async_cb(function(ge){if(ge){ge.getWindow().setVisibility(true);alp.gmap.kml_animate(ge,_5d3,cfg);}});},set2d:function(_5d4){this.set3d(false);},set3d:function(_5d5){var mts=this.gmap.getMapTypes();if(_5d5!==this.is3d()){return dojo.some(mts,dojo.hitch(this,function(mt){if(_5d5===this.is3d(mt)){this.gmap.setMapType(mt);return true;}return false;}));}return;},is3d:function(mt){return this.gmap&&alp.gmap.equalGMapTypes(mt||this.gmap.getCurrentMapType(),dojo.global.G_SATELLITE_3D_MAP);},_check_switched_to_3d:function(){var me,_5d6,is3d;me=dojo.getObject("_instanced._check_switched_to_3d",true,this);_5d6="alp.gmap.Map._check_switched_to_3d";alp.util.conlog(_5d6+"()");if(!this.gmap){console.error(_5d6+"(): could not find this.gmap - aborting.");return;}is3d=this.is3d();if(this._state3d){this._state3d.set(is3d);}if(is3d!==me._was3d){this[is3d?"_switched_to_3d":"_switched_to_2d"]();}me._was3d=is3d;alp.util.conlog(_5d6+"() done.");},tilesLoaded_cb:alp.util.dfrd_cb("tilesLoadedDfrd"),tilesLoadedDfrd:function(){return (this._tilesLoadedDfrd=this._tilesLoadedDfrd||alp.gmap.tilesLoadedDfrd(this));},switched_to_3d:function(){alp.util.conlog(this.declaredClass+".switched_to_3d()");},switched_to_2d:function(){alp.util.conlog(this.declaredClass+".switched_to_2d()");},resized:function(){alp.util.conlog(this.declaredClass+".resized()");},fullscreen_mode_changed:function(_5d7){alp.util.conlog(this.declaredClass+".fullscreen_mode_changed("+_5d7+")");},moveend:function(){alp.util.conlog(this.declaredClass+".moveend()");},maptypechanged:function(){alp.util.conlog(this.declaredClass+".maptypechanged()");},_switched_to_3d:alp.util.asyncHitch("switched_to_3d"),_switched_to_2d:alp.util.asyncHitch("switched_to_2d"),_resized:alp.util.asyncHitch("resized"),_fullscreen_mode_changed:alp.util.asyncHitch("fullscreen_mode_changed"),_moveend:alp.util.asyncHitch("moveend"),_maptypechanged:alp.util.asyncHitch("maptypechanged")});});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.iframe"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.iframe"]=true);dojo.provide("alp.util.iframe");dojo.require("alp.util");dojo.require("alp.util.async");alp.util.iframe_onload=function(_5d8,_5d9){var _5da=alp.util.likeIE_iframe_onreadystatechange()?"onreadystatechange":"onload",_5db=alp.util.likeIE_iframe_readyState()?function(){if(_5d8.contentWindow.document.readyState==="complete"){_5d9();}}:_5d9;dojo.connect(_5d8,_5da,_5db);};alp.util.iframe_encapsulate=function(_5dc,_5dd,cb){var _5de=_5dc.parentNode,_5df=_5dc.nextSibling;if(_5de){_5de.removeChild(_5dc);}var _5e0=dojo.create("iframe",dojo.mixin({frameborder:"0",height:25+"px",marginheight:"0px",marginwidth:"0px",scrolling:"no"},_5dd));alp.util.iframe_onload(_5e0,function(){_5e0.contentWindow.document.body.appendChild(_5dc);dojo.mixin(_5e0.style,{padding:"0px",borderColor:"transparent",borderWidth:"0px",borderStyle:"none"});dojo.mixin(_5e0.contentWindow.document.body.style,{margin:"0px",padding:"0px",borderColor:"transparent",borderWidth:"0px",borderStyle:"none"});if((""+_5e0.height)<(""+_5dc.offsetHeight)){_5e0.height=_5dc.offsetHeight+"px";}if(cb){cb(_5dc,_5e0);}});if(_5de){if(_5df){_5de.insertBefore(_5e0,_5df);}else{_5de.appendChild(_5e0);}}return _5e0;};dojo.declare("alp.util.IframeLoader",null,{constructor:function(url,opts){var _5e1,_5e2,_5e3;_5e1=(opts&&opts.context)||dojo.body();_5e2=dojo.mixin({style:{visibility:"hidden",display:"none"}},opts&&opts.iframe_opts);_5e2.src=url;var s=alp.util.likeIE_iframe_onreadystatechange()?"onreadystatechange":"onload";var f=function(){_5e3();};_5e2[s]=f;var me=this;var h=window.setTimeout(function(){h=null;_5e3.call(me,true);},1500);_5e3=dojo.hitch(this,function(_5e4){alp.util.conlog(this.declaredClass+".constructor.react: this:",this);if(alp.util.likeIE_iframe_readyState()&&(this.iframe.readyState!=="interactive")){return;}var o=dojo.getObject("contentWindow.document.body.childNodes",false,this.iframe);var _5e5=!(o&&(o.length>0));if(h!=null){window.clearTimeout(h);}if(!_5e5){var _5e6=window.open(url);if(_5e6){window.setTimeout(function(){_5e6.focus();});}_5e5=!!_5e6;}alp.util.conlog(this.declaredClass+".constructor.react: complete! success:"+_5e5+". Calling callback(s).");_5e3=function(){};this.loadedDfrd().callback(_5e5);});if(opts&&opts.callback){this.loadedDfrd().addCallback(opts.callback);}this.iframe=dojo.create("iframe",_5e2);_5e1.appendChild(this.iframe);},loadedDfrd:function(){this._loadedDfrd=this._loadedDfrd||new alp.util.SafeDeferred();return this._loadedDfrd;}});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.x._core"]){typeof dojo==="undefined"||(dojo._hasResource["alp.x._core"]=true);dojo.provide("alp.x._core");alp.x.i18n={};alp.later(function(){alp.x.i18n=dojo.i18n.getLocalization("alp","x");});alp.x.open_win=function(url){var _5e7=window.open(url),_5e8;if(_5e7){window.setTimeout(function(){_5e7.focus();});_5e8=alp.util.likeIE()&&"dialog_popup_fallback";}else{_5e8="dialog_popup_blocked";}if(_5e8){var _5e9=(new dojo._Url(window.document.location,url)).toString();var _5ea=dojo.create("div",{innerHTML:dojo.string.substitute(alp.x.i18n[_5e8+"_content"]||"The link could not be opened automatically. You can either adjust your browser settings to allow this, or directly clink on <a href=\"${link_href}\" target=\"_blank\">this link</a>.",{link_href:_5e9})});dojo.query("a",_5ea).forEach(function(node){if(node.href!=="_blank"){dojo.hitch(alp.util,"iframe_encapsulate")(node);}});var pbd=new dijit.Dialog({title:alp.x.i18n[_5e8+"_title"]||"Popup blocked",draggable:"false",style:alp.x.i18n[_5e8+"_style"]||"width: 340px; height: 240px;"},_5ea);pbd.show();}};}if(typeof dojo==="undefined"||!dojo._hasResource["alp.x"]){typeof dojo==="undefined"||(dojo._hasResource["alp.x"]=true);dojo.provide("alp.x");}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.digitize.views.abstract_safe_goverlay"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.digitize.views.abstract_safe_goverlay"]=true);dojo.provide("alp._gmap2_3.digitize.views.abstract_safe_goverlay");dojo.declare("alp._gmap2_3.digitize.AbstractSafeGOverlay",null,{constructor:function(){var me=this;me.on_map=new alp.data.BoolState();me.mapSt=new alp.data.State();me.mapSt.entered_cb(_5eb);function _5eb(map,_5ec){if(_5ec){me.remove();}me._map=map;me.on_map.set(!!map);if(map){me.initialize(map);}};},setMap:function(map){this.mapSt.set(map);},getMap:function(map){return this.mapSt.get();},initialize:function(map){var me=this;me.gmap=me._map=map;map.whenLoaded(function(){me.initialize_impl(map);var dfrd=me.init_dfrd();if(dfrd.fired<0){dfrd.callback(true);}});},initialize_impl:function(map){throw new Error("You must implement this method!");},remove:function(){this._map=null;this.init_cb(this,"remove_impl");},remove_impl:function(){throw new Error("You must implement this method!");},copy:function(){throw new Error("You must implement this method!");},redraw:function(_5ed){throw new Error("You must implement this method!");},init_dfrd:alp.util.lazymethod("init_dfrd","new alp.util.SafeDeferred()"),init_cb:alp.util.dfrd_cb("init_dfrd"),visible_gmap:function(){return this.on_map.get()&&this.gmap;}});}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.digitize.views.DirectionArrowView"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.digitize.views.DirectionArrowView"]=true);dojo.provide("alp._gmap2_3.digitize.views.DirectionArrowView");dojo.require("alp.gmap._util");(function(){var AG=alp._gmap2_3;dojo.declare("alp._gmap2_3.digitize.DirectionArrowView",alp._gmap2_3.digitize.AbstractSafeGOverlay,{constructor:function(_5ee,_5ef){this._model=_5ee;this._options||(this._options={subtype:null});this.visible=new alp.data.BoolState({init_value:!this._options.start_hidden});this.visible.entered_cb(this,"update");this._markers=[];this._showmarkers=true;this._pool={};},initialize_impl:function(map){this._map=map;AG.event("addListener")(map,"maptypeid_changed",dojo.hitch(this,"_onmaptypeid_changed"));this._onmaptypeid_changed();this.update();},remove_impl:function(){this._removeMarkers();this._map=null;},copy:function(){return new alp._gmap2_3.digitize.EditMarkerView(this._model,this._options);},redraw:function(_5f0){},_onmaptypeid_changed:function(){if(this._map&&((typeof G_SATELLITE_3D_MAP)!=="undefined")){this._showmarkers=!alp.gmap.equalGMapTypes(this._map.getCurrentMapType(),G_SATELLITE_3D_MAP);this.update();}},_removeMarkers:function(){while(this._markers.length){this._pool_push(this._markers.pop());}},_pool_push:function(m){m.setMap(null);var url=m._alpUrl;if(url){(this._pool[url]=this._pool[url]||[]).push(m);}},_pool_pop:function(p0,p1,pos){var url=alp.cfg.marker.arrow([p0,p1],this._options.subtype).url,arr=this._pool[url];if(arr&&arr.length){return arr.pop();}var m=AG.marker_gen({position:pos||new google.maps.LatLng(0,0)},"arrow",[p0,p1],this._options.subtype);m._alpUrl=url;return m;},_is_drawable:function(){return this._showmarkers&&this.visible.get();},update:function(){if(this._map){this._removeMarkers();if(!this._is_drawable()){return;}var _5f1=this._model.getVertices();var _5f2=this._getSegments(_5f1);var i;for(i=0;i<_5f2.length;i++){var idx=_5f2[i],p0=_5f1[idx-1],p1=_5f1[idx],pos=new google.maps.LatLng((p0.lat()+p1.lat())/2,(p0.lng()+p1.lng())/2);this._markers[i]=this._pool_pop(p0,p1,pos);this._markers[i].setPosition(pos);this._markers[i].setMap(this._map);}while(i<this._markers.length){this._markers[i].setVisible(false);i++;}}},isOverlay:function(_5f3){return false;},_getSegments:function(_5f4){var _5f5=_5f4.length;var _5f6=[];if(_5f5>2){var _5f7=new google.maps.Size(0,0);var _5f8=_5f4[0];var _5f9=AG.fromLatLngToContainerPixel(this._map,_5f8);for(var i=1;i<_5f5-1;i++){var p=_5f4[i],pPx=AG.fromLatLngToContainerPixel(this._map,p);_5f7.width+=Math.abs(pPx.x-_5f9.x);_5f7.height+=Math.abs(pPx.y-_5f9.y);if((_5f7.width>100)||(_5f7.height>100)){_5f6.push(i);_5f7.width=_5f7.height=0;}_5f8=p;_5f9=pPx;}if(!_5f6.length){_5f6.push(_5f5-1);}}return _5f6;}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.digitize.views.PolylineView"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.digitize.views.PolylineView"]=true);dojo.provide("alp._gmap2_3.digitize.views.PolylineView");(function(){var AG=alp._gmap2_3,AGD=AG.digitize,_5fa=AGD.EVENT_MAP_CLICK(),_5fb=AGD.EVENT_MAP_CONTEXT_MENU();dojo.declare("alp._gmap2_3.digitize.PolylineView",AGD.AbstractSafeGOverlay,{constructor:function(_5fc,_5fd){var me=this;me._model=_5fc;me._options=dojo.delegate({manualSegmentWeightRatio:1,backend_snap_tol_pixels:5},_5fd);var s="update_mindelay_ms";if(typeof me._options[s]!=="number"){me._options[s]=123;}me._options[s]=me._options.update_mindelay_ms;me._options.lineOptions=me._options.lineOptions||{};me.visible=new alp.data.BoolState();me.visible.entered_cb(me,"update");var o=me._options.lineOptions;o.color=o.color||"#0000ff";if(typeof o.weight!=="number"){o.weight=5;}o.opacity=o.opacity||0.8;me._install_zoom_level_be_snaptol();},initialize_impl:function(gmap){this.show();},remove_impl:function(){this.hide();},copy:function(){return new AGD.PolylineView(this._model,this._options);},redraw:function(_5fe){},_is_drawable:function(){return this.on_map.get()&&this.visible.get();},_update_pieces:function(arr){arr=(this._is_drawable()&&arr)||[];var _5ff=false,_600={};this._piece_arr=this._piece_arr||[];var o=this._options.lineOptions,_601=dojo.toJson(o);var i,x,_602=dojun.map(arr,".hashcolor");for(i=this._piece_arr.length;i--;){x=this._piece_arr[i];if(dojo.indexOf(_602,x.hashcolor)>-1){continue;}var _603=this._piece_arr.splice(i,1)[0].gpolyline;if(_603){_603.setMap(null);_603._alpEh.eh_clear();}_5ff=true;dojo.forEach(x.seg_ind,function(_604){_600[_604]=true;});}var i,_605,x,_606=dojun.map(this._piece_arr,".hashcolor");for(i=0,_605=arr.length;i<_605;i++){x=arr[i];if(dojo.indexOf(_606,x.hashcolor)>-1){continue;}x.gpolyline=this._gll_arr_2_gpolyline(x.gll_arr,x.is_manual);this._piece_arr.push(x);_607(x.gpolyline);x.gpolyline.setMap(this.gmap);_5ff=true;dojo.forEach(x.seg_ind,function(_608){_600[_608]=true;});}if(_5ff){this.onPolyChanged(_600);}return _5ff&&_600;function _607(_609){_609._alpEh=new alp.util.Eh();_609._alpEh.eh_push(AG.event("addListener")(_609,"click",function(_60a){dojo.publish(_5fa,[_60a,_609]);}),AG.event("removeListener"));_609._alpEh.eh_push(AG.event("addListener")(_609,"rightclick",function(_60b){dojo.publish(_5fb,[_60b,_609]);}),AG.event("removeListener"));};},show:function(){this.visible.set(true);},hide:function(){this.visible.set(false);},update:function(){this.init_cb(this,"_update");},_update:function(){var me=this;(me._update=alp.util.ratelimit_fun(-Math.abs(me._options.update_mindelay_ms),function(){me._update_pieces(me._is_drawable()&&me._getPieces());}))();},isOverlay:function(_60c){return _60c===this||!!(this._piece_arr&&alp.util.or(this._piece_arr,function(_60d){return _60d.gpolyline===_60c;}));},getBounds:function(){var bb=null;var arr=this._piece_arr||this._getPieces();var o=this._options.lineOptions;if(arr){dojo.forEach(arr,function(_60e){var _60f=(_60e.gpolyline||this._gll_arr_2_gpolyline(_60e.gll_arr)).getBounds();if(!bb){bb=_60f;}else{bb.extend(_60f.getSouthWest());bb.extend(_60f.getNorthEast());}},this);}return bb||false;},_getPieces:function(_610){var ret;if((!this._options.onepiece)&&this._model.getPieces){ret=this._model.getPieces();}else{this._onepiece_hash_count=(this._onepiece_hash_count||0)+1;var _611=this._model.getVertices();ret=[{gll_arr:_611,hash:this._onepiece_hash_count+"."+(new Date()).getTime()}];}var o=this._options.lineOptions,_612=dojo.toJson(o);if(!_610){dojo.forEach(ret,function(x){x.hashcolor=x.hash+"."+_612;});}return ret;},getPieces:function(){return (this._piece_arr=this._piece_arr||this._getPieces(true));},getPolyArr:function(){return dojun.map(this.getPieces(),function(x){return x.gpolyline||this._gll_arr_2_gpolyline(x.gll_arr);},this);},getPolyLength:function(){return dojun.reduce(dojun.map(this.getPolyArr(),".getLength()"),"+",0);},getVertexCount:function(){var f=function(x){return x.getVertexCount()-1;};return 1+dojun.reduce(dojun.map(this.getPolyArr(),f),"+");},getVertices:function(){var ret=[];dojo.forEach(this.getPieces(),function(x){ret=ret.concat(x.gll_arr);});},setStrokeStyle:function(_613,_614){if(dojo.toJson(this._options.lineOptions)===dojo.toJson(_613)){return;}this._options.lineOptions=_613;if(typeof _614==="number"){this._options.manualSegmentWeightRatio=_614;}this.update();},_gll_arr_2_gpolyline:function(_615,_616){var o=dojo.mixin({},this._options.lineOptions);if(typeof o.weight!=="number"){o.weight=5;}if(_616){var _617=this._options.manualSegmentWeightRatio;if(_617!=null){o.weight*=_617;}}return AG.polyline_gen(dojo.mixin({path:_615,strokeColor:o.color,strokeWeight:o.weight,strokeOpacity:o.opacity},o));},onPolyChanged:function(_618){},_install_zoom_level_be_snaptol:function(){var me=this,bst=alp.at(me._model,"backend_snap_t_st"),eh;if(bst){eh=new alp.util.Eh();me.mapSt.changed_cb(_619);_619();}function _619(){eh.eh_clear();var map=me.mapSt.get();if(map){eh.eh_push(AG.event("addListener")(map,"zoom_changed",function(){_61a(map);}),AG.event("removeListener"));_61a(map);}};function _61a(map){var z=map.getZoom(),proj=AG.getProjection(map);if(!proj){return;}var ww=AG.getWrapWidth(proj,z),_61b=2*Math.PI*AG.earth_radius()*me._options.backend_snap_tol_pixels/ww;bst.set(_61b);};}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.digitize.views.StartMarkerView"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.digitize.views.StartMarkerView"]=true);dojo.provide("alp._gmap2_3.digitize.views.StartMarkerView");(function(){var AG=alp._gmap2_3;dojo.declare("alp._gmap2_3.digitize.StartMarkerView",AG.digitize.AbstractSafeGOverlay,{constructor:function(_61c,_61d){this._model=_61c;this._options=_61d||{};this.visible=new alp.data.BoolState({init_value:!this._options.start_hidden});this.visible.entered_cb(this,"update");this._marker=null;this._showmarker=true;},initialize_impl:function(map){this._map=map;AG.event("addListener")(map,"maptypeid_changed",dojo.hitch(this,"_onmaptypeid_changed"));this._onmaptypeid_changed();this.update();},remove_impl:function(){this._removeMarker();this._map=null;},copy:function(){return new alp._gmap2_3.digitize.StartMarkerView(this._model,this._options);},redraw:function(_61e){},_onmaptypeid_changed:function(){var mt=dojo.global.G_SATELLITE_3D_MAP;if(this._map&&mt){this._showmarker=!alp.gmap.equalGMapTypes(this._map.getCurrentMapType(),mt);this.update();}},_removeMarker:function(){if(this._marker){this._marker.setMap(null);this._marker=null;}},_is_drawable:function(){return this._showmarker&&this.visible.get();},update:function(){if(this._map){var m=this._model;if((!this._is_drawable())||(!m.getNodeCount())){this._removeMarker();return;}var n=m.getNode(0);if(!this._marker){this._marker=AG.marker_gen({position:n,clickable:true,draggable:false},"digitize_node_start");this._marker.setMap(this._map);}else{this._marker.setPosition(n);}}},isOverlay:function(_61f){return (this._map&&(this._marker===_61f))?0:false;}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.array"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.array"]=true);dojo.provide("alp.util.array");(function(){alp.util.array.call_each_rev=_620;alp.util.array.chain=_621;alp.util.array.equal=alp.util.equal_array;alp.util.array.map_fun_or_not=_622;alp.util.array.permute=_623;alp.util.array.rep=_624;alp.util.array.sort_order=_625;alp.util.array.unpermute=_626;var _627=Array.prototype.slice;function _620(arr,_628){var args=_627.call(arguments,2),_629=typeof _628==="string";if(_629){for(var i=arr.length;i--;){var _62a=arr[i];_62a[_628].apply(_62a,args);}}else{for(var i=arr.length;i--;){_628.apply(arr[i],args);}}};function _621(_62b){var ret=[];for(var _62c=_62b.length,i=0;i<_62c;i++){ret=ret.concat(_62b[i]);}return ret;};function _622(arr){var args=_627.call(arguments,1),n=arr.length,ret=new Array(n);for(var i=0;i<n;i++){var x=arr[i];ret[i]=typeof x==="function"?x.apply(null,args):x;}return ret;};function _623(arr,_62d){var n=arr.length;if(n!==_62d.length){throw new Error("alp.util.array.permute(): `arr` and `order` must have the same length!");}var ret=new Array(n);for(var a=n;a--;){ret[a]=arr[_62d[a]];}return ret;};function _624(arr,n){if(!(arr.length>0&&n>0)){return [];}var tmp=arr,ret=[];while(n>0){if(n&1){ret=ret.concat(tmp);}n>>=1;if(n>0){tmp=tmp.concat(tmp);}}return ret;};function _625(arr,_62e){var n=arr.length,arr2=new Array(n);for(var a=n;a--;){arr2[a]=[arr[a],a];}var _62f=_62e?function(x,y){return _62e(x[0],y[0]);}:function(x,y){var x0=x[0],y0=y[0];return x0<y0?-1:(x0>y0?+1:0);};arr2.sort(_62f);return {arr:dojun.map(arr2,"x->x[0]"),order:dojun.map(arr2,"x->x[1]")};};function _626(arr,_630){var n=arr.length;if(n!==_630.length){throw new Error("alp.util.array.unpermute(): `arr` and `order` must have the same length!");}var ret=new Array(n);for(var a=n;a--;){ret[_630[a]]=arr[a];}return ret;};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.digitize.models.abstractpolylinemodel"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.digitize.models.abstractpolylinemodel"]=true);dojo.provide("alp._gmap2_3.digitize.models.abstractpolylinemodel");(function(){var CN="alp._gmap2_3.digitize.AbstractPolylineModel",AG=alp._gmap2_3;dojo.declare(CN,null,{PIECE_MAX_LENGTH:100,HASH_PIECE_REDUCED_LENGTH:10,node_to_highlight_st:null,node2_to_highlight_st:null,nextleg_to_highlight_st:null,no_ghost_latlng_st:null,default_is_manual_st:null,constructor:function(){if(this.declaredClass===CN){throw new Error("You can only instantiate classes that derive from "+CN);}if(this.onGeomChange){dojo.connect(this,"onGeomChange",this,"_clear_piecesCache");}this.node_to_highlight_st=new alp.data.State();this.node2_to_highlight_st=new alp.data.State();this.no_ghost_latlng_st=new alp.data.State();this.default_is_manual_st=new alp.data.BoolState();this.nextleg_to_highlight_st=new alp.data.State();},getLength:function(){if(this._length==null){try{this._length=AG.pathLength(this.getVertices());}catch(e){this._length=0;}}return this._length;},has_hash:function(hash){return hash&&(!!this.hash2piece(hash));},hash2piece:function(hash){if(!hash){return;}if(this._hash2pieceCache){return this._hash2pieceCache[hash];}var _631=this.getPieces();for(var a=_631.length;a--;){var _632=_631[a];if(_632&&(_632.hash===hash)){return _632;}}},_clear_piecesCache:function(){if(this._piecesCache){var a,x,b;for(a=this._piecesCache.length;a--;){x=this._piecesCache[a];for(b in x){if(x.hasOwnProperty(b)){x[b]=null;}}}}this._piecesCache=null;this._hash2pieceCache=null;},getPieces:function(){var arr,_633,me=this,pml=me.PIECE_MAX_LENGTH;if(!me._piecesCache){arr=[];_633={nodes:[],seg_indices:[]};for(var i=0,_634=me._segments||me.getSegments(),_635=_634.length;i<_635;i++){var s=_634[i],_636=!s,node=me._nodes[i];if(_633.is_manual==null){_633.is_manual=_636;}var _637=(_633.is_manual===_636);if(_637&&_633.nodes.length<pml){if(_636){_633.nodes.push(node);_633.seg_indices.push(i);}else{_633.nodes=_633.nodes.concat(s.vertices);_633.seg_indices=_633.seg_indices.concat(alp.util.array.rep([i],s.vertices.length));}continue;}if(_633.nodes.length){_633.nodes.push(node);_633.seg_indices.push(i);_638(_633.nodes,_633.seg_indices,_633.is_manual);}if(!_636){_638(s.vertices,i,_636);}_633={nodes:s?[]:[node],seg_indices:s?[]:[i]};}if((!_634[i])&&me._nodes[i]){_633.nodes.push(me._nodes[i]);_633.seg_indices.push(i);}_638(_633.nodes,_633.seg_indices,_633.is_manual);me._piecesCache=arr;me._hash2pieceCache={};for(var a=arr.length;a--;){var x=arr[a];me._hash2pieceCache[x.hash]=x;}}var ret=new Array(me._piecesCache.length);for(var i=ret.length;i--;){var x=me._piecesCache[i];ret[i]={gll_arr:x.gll_arr,seg_ind:x.seg_ind,hash:x.hash,is_manual:x.is_manual};}return ret;function _638(_639,_63a,_63b){if(!(_639&&(_639.length>1))){return;}var o={gll_arr:_639,hash:_63c(_639,_63b)};o.seg_ind=(typeof _63a==="number")?dojo.map(o.gll_arr,function(){return _63a;}):_63a;alp.util.assert(o.gll_arr.length===o.seg_ind.length,me.declaredClass+".getPieces(): _append(): o.gll_arr.length and o.seg_ind.length must match!");o.is_manual=_63b;arr.push(o);};function _63c(_63d,_63e){var ret=0,_63f=_63d.length;if(_63e){var _640=Math.log(1/(370*190));for(var a=_63f;a--;){var mm=_63d[a];if(!ret){ret=1+a/_63f;}ret*=(Math.log(Math.abs((95+mm.lat())*(185+mm.lng())))+_640);if(!(a%10)){var _641=Math.abs(ret);if(_641<1e-10){ret*=10000000000;}else{if(_641>10000000000){ret*=1e-10;}}}}}else{var _642=Math.min(_63f,me.HASH_PIECE_REDUCED_LENGTH),_643=new Array(_642);for(var a=_642,b=_642-1;a--;){_643[a]=_63d[((_63f-1)*a/b)>>0];}ret=_643.join(",");}return ret+"."+_63d[0]+"."+_63d[_63f-1]+"."+_63f;};},findNodesForBounds:function(_644){var all=this.getNodes();var _645=all.length;var out={nodes:[],indexes:[]};for(var i=0;i<_645;i++){if(_644.contains(all[i])){out.indexes.push(i);out.nodes.push(all[i]);}}return out;},onGeomChange:function(_646){},onGeomClear:function(_647){},onUpdateNode:function(_648,_649,_64a,info){},onUpdateNodeArray:function(_64b,_64c,_64d,_64e){},onDeleteNodes:function(_64f,_650,_651){},onInsertNodes:function(_652,_653,_654){},onReverse:function(_655){},onGeomChange:function(_656){}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.digitize.utils"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.digitize.utils"]=true);dojo.provide("alp._gmap2_3.digitize.utils");alp.installLocalization("alp._gmap2_3","digitize");dojo.declare("alp._gmap2_3.digitize.utils.eventHelper",null,{constructor:function(){this._eh={};},_disconnect:function(key){if(!key){for(key in this._eh){if(this._eh.hasOwnProperty(key)){this._disconnect(key);}}return;}var eh=this._eh[key];if(eh&&eh.subscribe){while(eh.subscribe.length){dojo.unsubscribe(eh.subscribe.pop());}}if(eh&&eh.connect){while(eh.connect.length){dojo.disconnect(eh.connect.pop());}}if(eh&&eh.google){while(eh.google.length){alp._gmap2_3.event("removeListener")(eh.google.pop());}}delete this._eh[key];}});dojo.declare("alp._gmap2_3.digitize.utils.undoStack",null,{UNDO_SIZE:25,constructor:function(){this._commandHistory={undo:[],redo:[]};},add:function(_657){if(this._commandHistory.undo.length>=this.UNDO_SIZE){this._commandHistory.undo.splice(0,1);}this._commandHistory.undo.push(_657);this._commandHistory.redo=[];_657.execute();this.onAction(this,_657);},clear:function(){this._commandHistory.undo=[];this._commandHistory.redo=[];},getState:function(){return [this._commandHistory.undo.length,this._commandHistory.redo.length];},undo:function(){var cmd=this._commandHistory.undo.pop();if(cmd){this._commandHistory.redo.push(cmd);cmd.revert();this.onAction(this,cmd);}},redo:function(){var cmd=this._commandHistory.redo.pop();if(cmd){this._commandHistory.undo.push(cmd);cmd.execute();this.onAction(this,cmd);}},onAction:function(_658,_659){}});alp._gmap2_3.digitize.createFakeMenuEvent=function(_65a,_65b){var _65c={target:_65a,pageX:_65b.x,pageY:_65b.y,preventDefault:function(){},stopPropagation:function(){}};return _65c;};alp._gmap2_3.digitize.getClosestPointOnLines=function(pXy,aXys){var _65d;var fTo;var _65e;var x;var y;var i;var dist;var _65f=aXys.length;if(_65f>1){for(var n=1;n<_65f;n++){if(aXys[n].x!=aXys[n-1].x){var a=(aXys[n].y-aXys[n-1].y)/(aXys[n].x-aXys[n-1].x);var b=aXys[n].y-a*aXys[n].x;dist=Math.abs(a*pXy.x+b-pXy.y)/Math.sqrt(a*a+1);}else{dist=Math.abs(pXy.x-aXys[n].x);}var rl2=Math.pow(aXys[n].y-aXys[n-1].y,2)+Math.pow(aXys[n].x-aXys[n-1].x,2);var ln2=Math.pow(aXys[n].y-pXy.y,2)+Math.pow(aXys[n].x-pXy.x,2);var _660=Math.pow(aXys[n-1].y-pXy.y,2)+Math.pow(aXys[n-1].x-pXy.x,2);var _661=Math.pow(dist,2);var _662=ln2-_661+_660-_661;if(_662>rl2){dist=Math.sqrt(Math.min(ln2,_660));}if((_65d==null)||(_65d>dist)){fTo=((Math.sqrt(_660-_661))/Math.sqrt(rl2));_65e=((Math.sqrt(ln2-_661))/Math.sqrt(rl2));_65d=dist;i=n;}}if(fTo>1){fTo=1;}if(_65e>1){fTo=0;_65e=1;}var dx=aXys[i-1].x-aXys[i].x;var dy=aXys[i-1].y-aXys[i].y;x=aXys[i-1].x-(dx*fTo);y=aXys[i-1].y-(dy*fTo);}if(_65e>0.5){i-=1;}return {"x":x,"y":y,"i":i,"fTo":fTo,"fFrom":_65e};};alp._gmap2_3.digitize.attr_fill_default=function(_663,dflt){var a,x,next;_663=[].concat(_663);_663.sort(function(x,y){return x.from-y.from;});for(a=_663.length-1;a>=-1;a--){x=(a>-1)?_663[a]:{to:0};next=(a<_663.length-1)?_663[a+1]:{from:dflt.nodeCount-1};if(next.from-x.to>1e-10){_663.splice(a+1,0,{from:x.to,to:next.from,key:dflt.key,value:dflt.value});}}return _663;};alp._gmap2_3.digitize.attr_copy_and_fix=function(_664,_665){var a,x,f;if(arguments.length<2){_665=+Infinity;}_664=[].concat(_664);_664.sort(function(x,y){return x.from-y.from;});for(a=_664.length-1;a>0;a--){x=_664[a];x={from:x.from,to:x.to,key:x.key,value:x.value};_664[a]=x;_664[a].from=Math.max(_664[a].from,_664[a-1].to);}f=function(v){return Math.max(0,Math.min(_665,v));};for(a=_664.length-1;a>=0;a--){x=_664[a];x.from=f(x.from);x.to=f(x.to);if(x.to-x.from<1e-10){_664.splice(a,1);}}return _664;};}if(typeof dojo==="undefined"||!dojo._hasResource["dojo.colors"]){typeof dojo==="undefined"||(dojo._hasResource["dojo.colors"]=true);dojo.provide("dojo.colors");(function(){var _666=function(m1,m2,h){if(h<0){++h;}if(h>1){--h;}var h6=6*h;if(h6<1){return m1+(m2-m1)*h6;}if(2*h<1){return m2;}if(3*h<2){return m1+(m2-m1)*(2/3-h)*6;}return m1;};dojo.colorFromRgb=function(_667,obj){var m=_667.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(m){var c=m[2].split(/\s*,\s*/),l=c.length,t=m[1],a;if((t=="rgb"&&l==3)||(t=="rgba"&&l==4)){var r=c[0];if(r.charAt(r.length-1)=="%"){a=dojo.map(c,function(x){return parseFloat(x)*2.56;});if(l==4){a[3]=c[3];}return dojo.colorFromArray(a,obj);}return dojo.colorFromArray(c,obj);}if((t=="hsl"&&l==3)||(t=="hsla"&&l==4)){var H=((parseFloat(c[0])%360)+360)%360/360,S=parseFloat(c[1])/100,L=parseFloat(c[2])/100,m2=L<=0.5?L*(S+1):L+S-L*S,m1=2*L-m2;a=[_666(m1,m2,H+1/3)*256,_666(m1,m2,H)*256,_666(m1,m2,H-1/3)*256,1];if(l==4){a[3]=c[3];}return dojo.colorFromArray(a,obj);}}return null;};var _668=function(c,low,high){c=Number(c);return isNaN(c)?high:c<low?low:c>high?high:c;};dojo.Color.prototype.sanitize=function(){var t=this;t.r=Math.round(_668(t.r,0,255));t.g=Math.round(_668(t.g,0,255));t.b=Math.round(_668(t.b,0,255));t.a=_668(t.a,0,1);return this;};})();dojo.colors.makeGrey=function(g,a){return dojo.colorFromArray([g,g,g,a]);};dojo.mixin(dojo.Color.named,{aliceblue:[240,248,255],antiquewhite:[250,235,215],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],blanchedalmond:[255,235,205],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],oldlace:[253,245,230],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],thistle:[216,191,216],tomato:[255,99,71],transparent:[0,0,0,0],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],whitesmoke:[245,245,245],yellowgreen:[154,205,50]});}if(typeof dojo==="undefined"||!dojo._hasResource["dojox.color._base"]){typeof dojo==="undefined"||(dojo._hasResource["dojox.color._base"]=true);dojo.provide("dojox.color._base");dojox.color.Color=dojo.Color;dojox.color.blend=dojo.blendColors;dojox.color.fromRgb=dojo.colorFromRgb;dojox.color.fromHex=dojo.colorFromHex;dojox.color.fromArray=dojo.colorFromArray;dojox.color.fromString=dojo.colorFromString;dojox.color.greyscale=dojo.colors.makeGrey;dojo.mixin(dojox.color,{fromCmy:function(cyan,_669,_66a){if(dojo.isArray(cyan)){_669=cyan[1],_66a=cyan[2],cyan=cyan[0];}else{if(dojo.isObject(cyan)){_669=cyan.m,_66a=cyan.y,cyan=cyan.c;}}cyan/=100,_669/=100,_66a/=100;var r=1-cyan,g=1-_669,b=1-_66a;return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});},fromCmyk:function(cyan,_66b,_66c,_66d){if(dojo.isArray(cyan)){_66b=cyan[1],_66c=cyan[2],_66d=cyan[3],cyan=cyan[0];}else{if(dojo.isObject(cyan)){_66b=cyan.m,_66c=cyan.y,_66d=cyan.b,cyan=cyan.c;}}cyan/=100,_66b/=100,_66c/=100,_66d/=100;var r,g,b;r=1-Math.min(1,cyan*(1-_66d)+_66d);g=1-Math.min(1,_66b*(1-_66d)+_66d);b=1-Math.min(1,_66c*(1-_66d)+_66d);return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});},fromHsl:function(hue,_66e,_66f){if(dojo.isArray(hue)){_66e=hue[1],_66f=hue[2],hue=hue[0];}else{if(dojo.isObject(hue)){_66e=hue.s,_66f=hue.l,hue=hue.h;}}_66e/=100;_66f/=100;while(hue<0){hue+=360;}while(hue>=360){hue-=360;}var r,g,b;if(hue<120){r=(120-hue)/60,g=hue/60,b=0;}else{if(hue<240){r=0,g=(240-hue)/60,b=(hue-120)/60;}else{r=(hue-240)/60,g=0,b=(360-hue)/60;}}r=2*_66e*Math.min(r,1)+(1-_66e);g=2*_66e*Math.min(g,1)+(1-_66e);b=2*_66e*Math.min(b,1)+(1-_66e);if(_66f<0.5){r*=_66f,g*=_66f,b*=_66f;}else{r=(1-_66f)*r+2*_66f-1;g=(1-_66f)*g+2*_66f-1;b=(1-_66f)*b+2*_66f-1;}return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});},fromHsv:function(hue,_670,_671){if(dojo.isArray(hue)){_670=hue[1],_671=hue[2],hue=hue[0];}else{if(dojo.isObject(hue)){_670=hue.s,_671=hue.v,hue=hue.h;}}if(hue==360){hue=0;}_670/=100;_671/=100;var r,g,b;if(_670==0){r=_671,b=_671,g=_671;}else{var _672=hue/60,i=Math.floor(_672),f=_672-i;var p=_671*(1-_670);var q=_671*(1-(_670*f));var t=_671*(1-(_670*(1-f)));switch(i){case 0:r=_671,g=t,b=p;break;case 1:r=q,g=_671,b=p;break;case 2:r=p,g=_671,b=t;break;case 3:r=p,g=q,b=_671;break;case 4:r=t,g=p,b=_671;break;case 5:r=_671,g=p,b=q;break;}}return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});}});dojo.extend(dojox.color.Color,{toCmy:function(){var cyan=1-(this.r/255),_673=1-(this.g/255),_674=1-(this.b/255);return {c:Math.round(cyan*100),m:Math.round(_673*100),y:Math.round(_674*100)};},toCmyk:function(){var cyan,_675,_676,_677;var r=this.r/255,g=this.g/255,b=this.b/255;_677=Math.min(1-r,1-g,1-b);cyan=(1-r-_677)/(1-_677);_675=(1-g-_677)/(1-_677);_676=(1-b-_677)/(1-_677);return {c:Math.round(cyan*100),m:Math.round(_675*100),y:Math.round(_676*100),b:Math.round(_677*100)};},toHsl:function(){var r=this.r/255,g=this.g/255,b=this.b/255;var min=Math.min(r,b,g),max=Math.max(r,g,b);var _678=max-min;var h=0,s=0,l=(min+max)/2;if(l>0&&l<1){s=_678/((l<0.5)?(2*l):(2-2*l));}if(_678>0){if(max==r&&max!=g){h+=(g-b)/_678;}if(max==g&&max!=b){h+=(2+(b-r)/_678);}if(max==b&&max!=r){h+=(4+(r-g)/_678);}h*=60;}return {h:h,s:Math.round(s*100),l:Math.round(l*100)};},toHsv:function(){var r=this.r/255,g=this.g/255,b=this.b/255;var min=Math.min(r,b,g),max=Math.max(r,g,b);var _679=max-min;var h=null,s=(max==0)?0:(_679/max);if(s==0){h=0;}else{if(r==max){h=60*(g-b)/_679;}else{if(g==max){h=120+60*(b-r)/_679;}else{h=240+60*(r-g)/_679;}}if(h<0){h+=360;}}return {h:h,s:Math.round(s*100),v:Math.round(max*100)};}});}if(typeof dojo==="undefined"||!dojo._hasResource["dojox.color"]){typeof dojo==="undefined"||(dojo._hasResource["dojox.color"]=true);dojo.provide("dojox.color");}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.digitize.models._attributes"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.digitize.models._attributes"]=true);dojo.provide("alp._gmap2_3.digitize.models._attributes");alp.installLocalization("alp._gmap2_3","digitize_attributes");(function(){dojo.declare("alp._gmap2_3.digitize.models.Attributes",null,{COLOR_COUNT:10,BASE_COLOR:"red",_defaultOptions:{newAttributes:true,newValues:true},constructor:function(_67a,_67b){this._model=_67a;this.options=dojo.delegate(this._defaultOptions,_67b||{});this._availableKeys=this.options.availableKeys||[];var m=(this._availableKeyMap={});dojo.forEach(this._availableKeys,function(ke){m[ke.id]={};dojo.forEach(ke.values,function(ve){m[ke.id][ve.id]=ve.color;});});this._data=[];this._colorMap={};this._colors=this._generateColors(this.BASE_COLOR,this.COLOR_COUNT);this._colorIndex={};dojo.connect(this._model,"onInsertNodes",this,"onModelNodeInsert");dojo.connect(this._model,"onDeleteNodes",this,"onModelNodeDelete");},getLabel:function(_67c,_67d){return alp._gmap2_3.digitize_attributes.i18n[_67c+(_67d?("."+_67d):"")]||_67c;},_splitAttribute:function(d,from,to){if(to<=d.from||from>=d.to){return;}if(from>d.from&&to<d.to){this._data.push({"from":to,"to":d.to,"key":d.key,"value":d.value});d.to=from;}},onModelNodeInsert:function(_67e,_67f){var _680=_67e.length;dojo.forEach(this._data,dojo.hitch(this,function(d){if(d.from>=_67f){d.from+=_680;}if(d.to>=_67f){d.to+=_680;}this._splitAttribute(d,_67f-1,_67f+_680);}));},onModelNodeDelete:function(_681,_682,_683){for(var i=this._data.length-1;i>=0;i--){var d=this._data[i];if(d.from>=_681-1&&d.from<=_681+1){d.from=_681+1;}if(d.to>=_681-1&&d.to<=_681+1){d.to=_681;}d.from=Math.max(0,d.from);d.to=Math.max(0,d.from,d.to);if(d.to<d.from+1e-10){this._data.splice(i,1);}else{if(d.from>=_681){d.from-=_682;}if(d.to>=_681){d.to-=_682;}}this._splitAttribute(d,_681-1,_681+_682-1);}},_getCovering:function(_684){return dojo.filter(this._data,function(a){return (a.from<=_684&&a.to>=_684);});},getKeys:function(used){var keys=dojo.map(this._availableKeys,function(k){return k.id;});if(used){var _685={};for(var i=0;i<this._data.length;i++){var attr=this._data[i];if(_685[attr.key]){continue;}_685[attr.key]=true;}keys=dojo.filter(keys,function(k){return (_685[k]!==undefined);});}return keys;},isEmpty:function(){return !this._data.length;},set:function(from,to,key,_686){if(_686&&!key){throw new Error("alp._gmap2_3.digitize.models.Attribute.set(): key == null allowed only for value == null (clearing attributes).");}from=Math.max(0,from);to=Math.max(from,to);if(Math.abs(to-from)<1e-10){return;}alp.util.conlog("attributes.set: from:",from,", to:",to,", k=",key,"v=",_686);var d=dojo.filter(this._data,function(a){return ((!key||(a.key===key))&&((a.from<=to&&a.from>=from)||(a.to>=from&&a.to<=to)||(a.to>=to&&a.from<=from)));});var _687=this._data;dojo.forEach(d,function(a){if(a.from>=from&&a.to<=to){_687.splice(dojo.indexOf(_687,a),1);}else{if(a.from>=from&&a.from<=to){if(a.value===_686){to=a.to;_687.splice(dojo.indexOf(_687,a),1);}else{a.from=to;}}else{if(a.to>=from&&a.to<=to){if(a.value===_686){from=a.from;_687.splice(dojo.indexOf(_687,a),1);}else{a.to=from;}}else{_687.push({from:to,to:a.to,key:a.key,value:a.value});a.to=from;}}}});if((_686!==null)&&(_686!==undefined)){this._data.push({"from":from,"to":to,"key":key,"value":_686});}},clear:function(from,to,key){return this.set(from,to,key);},get:function(key,_688){if(_688!==undefined){var d=dojo.filter(this._data,function(a){return ((a.key===key)&&(a.from<=_688&&a.to>=_688));});return (d.length)?d[0]:null;}else{return dojo.filter(this._data,function(a){return (a.key===key);});}},getValues:function(key,used){var _689=[];for(var k in this._availableKeyMap[key]){if(this._availableKeyMap[key].hasOwnProperty(k)){_689.push(k);}}if(used){var _68a={};dojo.forEach(this.get(key),function(a){_68a[a.value]=true;});_689=dojo.filter(_689,function(v){return (_68a[v]!==undefined);});}return _689;},_generateColors:function(base,_68b){var root=(new dojox.color.Color(base)).toHsl();var _68c=[];for(var i=0;i<360;i+=360/_68b){var c=dojo.delegate(root);c.h=i;_68c.push(dojox.color.fromHsl(c));}return _68c;},getColor:function(key,_68d){if(!this._colorMap[key]){this._colorMap[key]={};this._colorIndex[key]=0;}if(this._colorMap[key][_68d]===undefined){if(this._availableKeyMap[key]&&this._availableKeyMap[key][_68d]){this._colorMap[key][_68d]=dojox.color.fromString(this._availableKeyMap[key][_68d]);}else{this._colorMap[key][_68d]=this._colors[this._colorIndex[key]];this._colorIndex[key]=(this._colorIndex[key]+1)%this.COLOR_COUNT;}}return this._colorMap[key][_68d];},reverse:function(){var _68e=this._model.getNodeCount()-1;for(var i=0;i<this._data.length;i++){var d=this._data[i];var tmp=d.to;d.to=_68e-d.from;d.from=_68e-tmp;}},fromJSON:function(json){if(json){this._data=[];var dflt=this._model.attr_dflt&&this._model.attr_dflt();json=alp._gmap2_3.digitize.attr_copy_and_fix(json,dflt&&dflt.nodeCount);if(dflt){json=alp._gmap2_3.digitize.attr_fill_default(json,dflt);}dojo.forEach(json,dojo.hitch(this,function(a){this.set(a.from,a.to,a.key,a.value);}));}},toJSON:function(){return alp._gmap2_3.digitize.attr_copy_and_fix(this._data);},fix:function(){this.fromJSON(this.toJSON());}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.digitize.models.abstract_nearest_finder"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.digitize.models.abstract_nearest_finder"]=true);dojo.provide("alp._gmap2_3.digitize.models.abstract_nearest_finder");dojo.declare("alp._gmap2_3.digitize.AbstractNearestFinder",null,{constructor:function(_68f){if(this.declaredClass==="alp._gmap2_3.digitize.AbstractNearestFinder"){throw new Error("You must write your own class, which inherits from alp._gmap2_3.digitize.AbstractNearestFinder");}if(!(_68f&&(_68f instanceof alp._gmap2_3.digitize.AbstractPolylineModel))){throw new Error("The model class must be - or inherit from - alp._gmap2_3.digitize.AbstractPolylineModel");}},update:function(){throw new Error("You must implement: alp._gmap2_3.digitize.AbstractNearestFinder.update()");},queryNearestPoint:function(_690,opts){throw new Error("You must implement: alp._gmap2_3.digitize.AbstractNearestFinder.queryNearestPoint()");}});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.search"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.search"]=true);dojo.provide("alp.util.search");alp.util.dichotomy=function(_691,min,max,_692,opts){var mm=alp.util.minmax([min,max]),get=_692;if(get(mm[0])>get(mm[1])){throw new Error("alp.util.dichotomy(): get_value_increasing must return increasing values!");}if(_691>get(mm[1])){throw new Error("alp.util.dichotomy(): maximum too low!");}if(_691<get(mm[0])){throw new Error("alp.util.dichotomy(): minimum too high!");}opts=dojo.delegate({niter_max:100,precision:0},opts);var x,y,_693,_694=opts.niter_max,_695=opts.precision;for(_693=0;(Math.abs(mm[1]-mm[0])>_695)&&(_693<_694);_693++){x=alp.util.mean(mm);y=get(x);mm[y<_691?0:1]=x;}return alp.util.mean(mm);};(function(){alp.util.add_sortedsearch=function(arr,opt){if(arr.sortedsearch){console.error("alp.util.add_sortedsearch: array already has `sortedsearch` method... Overwriting it. array:",arr);}var o=_696(arr,opt),_697=new alp.util.SortedDataSearcher(o.length,o.compare_fun,o.equals_fun,o.other_opts);arr.sortedsearch=_698;function _698(){return _697.search.apply(_697,arguments);};};alp.util.sortedsearch=function(x,arr,opt){var o=_696(arr,opt),_699=new alp.util.SortedDataSearcher(o.length,o.compare_fun,o.equals_fun,o.other_opts);return _699.search(x);};function _696(arr,opt){opt=opt?dojo.mixin({data_compare_fun:function(a,b){if(a==b){return 0;}if(a<b){return -1;}if(a>b){return +1;}return 0;},data_equals_fun:null},opt):{data_compare_fun:function(a,b){if(a==b){return 0;}if(a<b){return -1;}if(a>b){return +1;}return 0;},data_equals_fun:null};return {length:function(){return arr.length;},compare_fun:function(ind,data){return opt.data_compare_fun(arr[ind],data);},equals_fun:opt.arr_equals_fun&&function(ind,data){return opt.data_equals_fun(arr[ind],data);},other_opts:{read_only_optim:opt.read_only_optim,data_compare_fun:opt.data_compare_fun}};};})();dojo.declare("alp.util.SortedDataSearcher",null,{constructor:function(_69a,_69b,_69c,opt){var me=this;me.length=_69a;me.compare_fun=_69b;me.equals_fun=_69c||function(ind,data){return (0===me.compare_fun(ind,data));};me.read_only_optim_fun=alp.at(opt,"read_only_optim")&&alp.at(opt,"data_compare_fun");},_length:function(){return (typeof this.length==="function")?this.length():this.length;},search:function(data,_69d,last,_69e){if(this.read_only_optim_fun){_69e=_69e||(_69d==null&&last==null);var _69f=this._prev_result;if(_69f&&(_69d==null||last==null)){var _6a0=this.read_only_optim_fun(data,_69f.data);if(last==null&&_6a0<0){last=_69f.first-1;}if(_69d==null&&_6a0>0){_69d=_69f.last+1;}}}if(_69d==null){_69d=0;}if(last==null){last=this._length()-1;}if(last<_69d){return;}if(data===undefined){return {first:_69d,last:last};}if(this.compare_fun(_69d,data)>0){return;}if(this.compare_fun(last,data)<0){return;}var _6a1=(last>-1)&&this.equals_fun(_69d,data),_6a2=(last>-1)&&this.equals_fun(last,data),_6a3=last-_69d,_6a4=last-_69d,_6a5,_6a6,_6a7,_6a8,_6a9,_6aa,_6ab,_6ac,_6ad;while(!((last<=_69d)||(_6a1&&_6a2)||(_6ad))){var _6ae=last-_69d;if(!_6a1){_6a5=Math.max(1,Math.min(_6a3,_6ae)>>1);}if(!_6a2){_6a6=Math.max(1,Math.min(_6a4,_6ae)>>1);}_6ad=(_6a3===_6a5&&_6a4===_6a6);_6a3=_6a5;_6a4=_6a6;if(!_6a1){_6a7=Math.max(_69d+1,Math.min(last,_69d+_6a3));_6a8=this.compare_fun(_6a7,data);_6a9=(_6a8===0);if((_6a8<0)||(_6a7===_69d+1)){_69d=_6a7;_6a1=_6a9;_6ad=false;}}if(!_6a2){_6aa=Math.min(last-1,Math.max(_69d,last-_6a4));_6ab=this.compare_fun(_6aa,data);_6ac=(_6ab===0);if((_6ab>0)||(_6aa===last-1)){last=_6aa;_6a2=_6ac;_6ad=false;}}}if((last<_69d)||(!_6a1)||(!_6a2)){return;}if(_69e){this._prev_result={data:data,first:_69d,last:last};}return {first:_69d,last:last};}});}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.cheap"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.cheap"]=true);dojo.provide("alp._gmap2_3.cheap");(function(){var AG=alp._gmap2_3;AG.glatlng=function(xy){return new google.maps.LatLng(parseFloat(xy[1]),parseFloat(xy[0]));};AG.xy=function(_6af){return [_6af.lng(),_6af.lat()];};AG.cheap_square_distance=function(xy_a,xy_b,_6b0,_6b1){var dlng=xy_a[0]-xy_b[0],dlat=xy_a[1]-xy_b[1],dx=dlng*_6b0,dy=dlat*_6b1;return dx*dx+dy*dy;};AG.cheap_distance=function(xy_a,xy_b,_6b2,_6b3){return Math.sqrt(AG.cheap_square_distance(xy_a,xy_b,_6b2,_6b3));};AG.cheap_lng2m_at=function(p){return AG.glatlng(p).distanceFrom(AG.glatlng([p[0]+0.01,p[1]]))/0.01;};AG.cheap_lat2m_at=function(p){return AG.glatlng(p).distanceFrom(AG.glatlng([p[0],p[1]+0.01]))/0.01;};AG.cheap_polyline_length=function(_6b4,_6b5,_6b6){if(!(_6b4&&(_6b4.length>0))){return 0;}var p=_6b4[0];if(_6b5==null){_6b5=AG.cheap_lng2m_at(p);}if(_6b6==null){_6b6=AG.cheap_lat2m_at(p);}var ret=0,p=dojun.map(_6b4,f);for(var a=0,_6b7=_6b4.length-1;a<_6b7;a++){ret+=AG.cheap_distance(p[a],p[a+1],_6b5,_6b6);}return ret;function f(xy){return dojo.map(xy,parseFloat);};};AG.cheap_polyline_length_gravitycenter=_6b8;AG.dlatlngmax=function(xy,m){var ret={},gll;gll=AG.glatlng(xy);ret.dlat_max=-gll.lat()+alp.util.dichotomy(m,gll.lat(),90,function(lat){return gll.distanceFrom(new google.maps.LatLng(lat,gll.lng()));});gll=AG.glatlng([0,xy[1]]);ret.dlng_max=-gll.lng()+alp.util.dichotomy(m,0,180,function(lng){return gll.distanceFrom(new google.maps.LatLng(gll.lat(),lng));});return ret;};function _6b8(_6b9,_6ba,_6bb,_6bc){if(!(_6b9&&(_6b9.length>0))){return {length:0};}var pt=_6b9[0];if(_6ba==null){_6ba=AG.cheap_lng2m_at(pt);}if(_6bb==null){_6bb=AG.cheap_lat2m_at(pt);}var _6bd=0,_6be=0,_6bf=0,poly=_6bc?dojo.map(_6b9,_6c0):_6b9;function _6c0(xy){return dojo.map(xy,parseFloat);};for(var i=poly.length-1;i--;){var A=poly[i],B=poly[i+1],Ax=A[0],Ay=A[1],Bx=B[0],By=B[1],BmAx=(Bx-Ax)*_6ba,BmAy=(By-Ay)*_6bb,BA=Math.sqrt(BmAx*BmAx+BmAy*BmAy);_6bd+=BA;_6be+=BA*(Ax+Bx);_6bf+=BA*(Ay+By);}return {length:_6bd,polygrav_x:_6be/(2*_6bd),polygrav_y:_6bf/(2*_6bd)};};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.digitize.models.xy_nearest_finder"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.digitize.models.xy_nearest_finder"]=true);dojo.provide("alp._gmap2_3.digitize.models.xy_nearest_finder");(function(){var AG=alp._gmap2_3,AGD=AG.digitize;dojo.declare("alp._gmap2_3.digitize.XYNearestFinder",AGD.AbstractNearestFinder,{constructor:function(_6c1){this._model=_6c1;this.update();},update:function(){},queryNearestPointAll:function(_6c2){var me=this,_6c3=me._model.getPieces(),best=null,_6c4=+Infinity;dojo.forEach(_6c3,_6c5);return best;function _6c5(_6c6){var _6c7=me.queryNearestPoint(_6c2,_6c6),_6c8=alp.at(_6c7,1),dist=alp.m(_6c8,"distanceFrom",_6c2);if(dist!=null&&dist<_6c4){best=_6c7;_6c4=dist;}};},queryNearestPoint:function(_6c9,opts){var _6ca=dojo.mixin({},opts);_6ca=this._model.hash2piece(_6ca.hash);return _6cb(_6c9,_6ca);}});function _6cb(_6cc,_6cd){if(!(_6cd&&_6cd.gll_arr&&(_6cd.gll_arr.length>0))){return;}var arr=_6cd.gll_arr;if(arr.length<2){return arr[0];}var ret,_6ce=AG.xy(_6cc),_6cf=dojo.map(arr,AG.xy);for(var k=_6cf.length-1;k--;){var xy_a=_6cf[k],xy_b=_6cf[k+1],_6d0=[xy_b[0]-xy_a[0],xy_b[1]-xy_a[1]],_6d1=[_6ce[0]-xy_a[0],_6ce[1]-xy_a[1]],t=Math.max(0,Math.min(1,(_6d0[0]*_6d1[0]+_6d0[1]*_6d1[1])/(_6d0[0]*_6d0[0]+_6d0[1]*_6d0[1]))),_6d2={k:k,xy:[xy_a[0]+t*_6d0[0],xy_a[1]+t*_6d0[1]]},d_x=_6ce[0]-_6d2.xy[0],d_y=_6ce[1]-_6d2.xy[1];_6d2.d2=d_x*d_x+d_y*d_y;if(alp.util.isFiniteNumber(_6d2.d2)&&(!ret||_6d2.d2<ret.d2)){ret=_6d2;}}return ret&&[Math.min(_6cd.seg_ind[ret.k],_6cd.seg_ind[ret.k+1]),AG.glatlng(ret.xy)];};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.digitize.models.BaseModel"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.digitize.models.BaseModel"]=true);dojo.provide("alp._gmap2_3.digitize.models.BaseModel");(function(){dojo.declare("alp._gmap2_3.digitize.BaseModel",null,{_nearestFinder:null,clear:function(){console.error("alp._gmap2_3.digitize.BaseModel.clear(): not implemented for this:",this);},updateNearestFinder:function(){var nf=this._getNearestFinder();if(nf){nf.update();}},queryNearestPointAll:function(_6d3){return alp.m(this._getNearestFinder(),"queryNearestPointAll",_6d3);},queryNearestPoint:function(_6d4,opts){var nf=this._getNearestFinder();return nf&&nf.queryNearestPoint(_6d4,opts);},_getNearestFinder:function(){if(this._opts&&this._opts.noNearestFinder){return;}return (this._nearestFinder=this._nearestFinder||new alp._gmap2_3.digitize.XYNearestFinder(this));},onChangeSegment:function(_6d5){}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.digitize.models.WithAttrModel"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.digitize.models.WithAttrModel"]=true);dojo.provide("alp._gmap2_3.digitize.models.WithAttrModel");(function(){dojo.declare("alp._gmap2_3.digitize.models.WithAttrModel",[alp._gmap2_3.digitize.BaseModel],{attr_dflt:function(){return this._opts&&this._opts.attr_default&&this._opts.attr_default(this);}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.digitize.models.PolylineModel"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.digitize.models.PolylineModel"]=true);dojo.provide("alp._gmap2_3.digitize.models.PolylineModel");(function(){var AG=alp._gmap2_3;dojo.declare("alp._gmap2_3.digitize.PolylineModel",[AG.digitize.AbstractPolylineModel,AG.digitize.models.WithAttrModel],{constructor:function(_6d6,_6d7){this._opts=_6d6||{};if(dojo.isArray(_6d7)){this._nodes=[].concat(_6d7);}else{this._nodes=[];}this.updateNearestFinder();this.attributes=new AG.digitize.models.Attributes(this,this._opts.attributes);},clear:function(){this._nodes=[];this.onGeomChange(this);},getNode:function(_6d8){if(_6d8<0){_6d8+=this._nodes.length;}return this._nodes[_6d8];},updateNode:function(_6d9,_6da){var old=this._nodes[_6d9];this._nodes[_6d9]=_6da;this._length=null;this._segmentLengths=null;this.onUpdateNode(_6d9,_6da,old);this.onGeomChange(this);return old;},getNodeIndex:function(node){return dojo.indexOf(this._nodes,node);},getNodes:function(){return this._nodes.concat();},getVertices:function(){return this.getNodes();},getNodeCount:function(){return this._nodes.length;},insertNodes:function(_6db,_6dc){var idx=(typeof (_6dc)=="undefined")?this._nodes.length:_6dc;var _6dd=[idx,0];this._nodes.splice.apply(this._nodes,_6dd.concat(_6db));this._length=null;this._segmentLengths=null;this.onInsertNodes(_6db,idx);this.onGeomChange(this);},deleteNodes:function(_6de,_6df){var _6e0=(typeof (_6df)=="undefined")?1:_6df;var _6e1=this._nodes.splice(_6de,_6e0);this._length=null;this._segmentLengths=null;this.onDeleteNodes(_6de,_6e0,_6e1);this.onGeomChange(this);return _6e1;},reverse:function(){this._nodes.reverse();this.attributes.reverse();this._segmentLengths=null;this.onGeomChange(this);},toGeoJSON:function(){var json=alp.gmap.toGeoJSON("LINESTRING",this.getNodes());if(json&&!this.attributes.isEmpty()){json.attributes=this.attributes.toJSON();}return json;},getSegmentMidPoint:function(_6e2,_6e3){var n1=this.getNode(_6e2);var n2=this.getNode(_6e2+1);if(!(n1&&n2)){return null;}if(typeof (_6e3)=="undefined"){_6e3=0.5;}var lat=n1.lat()+(n2.lat()-n1.lat())*_6e3;var lng=n1.lng()+(n2.lng()-n1.lng())*_6e3;return new google.maps.LatLng(lat,lng);},getAttributeSegments:function(_6e4){var _6e5=this.attributes.get(_6e4);var _6e6=new Array(_6e5.length);var v=null;for(var i=0;i<_6e5.length;i++){var ap=dojo.delegate(_6e5[i]);ap.vertices=[this.getSegmentMidPoint(Math.floor(ap.from),ap.from%1)];for(var j=Math.ceil(ap.from);j<ap.to;j++){ap.vertices.push(this._nodes[j]);}if(ap.to>=this._nodes.length-1){v=this.getSegmentMidPoint(ap.to-1,1);}else{v=this.getSegmentMidPoint(Math.floor(ap.to),ap.to%1);}ap.vertices.push(v);_6e6[i]=ap;}return _6e6;},getSegmentLengths:function(){if(!this._segmentLengths){var nLen=this._nodes.length;var _6e7=new Array(nLen-1);for(var i=0;i<nLen-1;i++){_6e7[i]=this._nodes[i].distanceFrom(this._nodes[i+1]);}this._segmentLengths=_6e7;}return this._segmentLengths;},getSegmentParts:function(_6e8,_6e9){if(_6e8===undefined){_6e8=0;}if(_6e9===undefined){_6e9=this._nodes.length-1;}_6e8=Math.max(0,Math.min(this._nodes.length-1,_6e8));_6e9=Math.max(0,Math.min(this._nodes.length-1,_6e9));var _6ea=[];for(var i=_6e8;i<_6e9;i++){_6ea.push([[i,this.getNode(i),this.getNode(i+1)]]);}return _6ea;},getSegments:function(){return new Array(Math.max(0,this._nodes.length-1));},getIndexForPoint:function(_6eb){var p=AG.digitize.getClosestPointOnLines(_6eb,this.getVertices());return {i:(p.i+p.fFrom),p:_6eb};}});AG.digitize.PolylineModel.fromGeoJSON=function(_6ec,_6ed){var _6ee=alp.gmap.fromGeoJSON(_6ec,"LINESTRING");var m=new AG.digitize.PolylineModel(_6ed,_6ee);m.attributes.fromJSON(_6ec.attributes);return m;};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.gmap.OOIMap"]){typeof dojo==="undefined"||(dojo._hasResource["alp.gmap.OOIMap"]=true);dojo.provide("alp.gmap.OOIMap");alp.gmap.i18n={};alp.later(function(){alp.gmap.i18n=dojo.i18n.getLocalization("alp","gmap");});(function(f){if(typeof GMap!=="undefined"){f.apply(this);}else{dojo["require"]("alp.google");alp.gmap_asyncdfrd().addCallback(this,f);}})(function(){var AG=alp._gmap2_3;dojo.declare("alp.gmap.OOIMap",alp.gmap.Map,{BOUNDS_PADDING:0.1,data:"",categoryMap:undefined,categoryMapUrl:undefined,markerOptions:undefined,iconOptions:undefined,lineOptions:undefined,poi_infowindow_getter:undefined,poi_infowindow_wait_html:function(){return alp.gmap.i18n.ooi_iw_loading||"Laden...";},poi_infowindow_opts:undefined,poi_link:undefined,poi_in_new_window:undefined,showDefaultIcon:"http://www.alpserver.de/icons/1.3/Standard/coloured/default.png",showArrowView:undefined,showStartMarkerView:undefined,initialViewNoData:undefined,viewOnly:undefined,dataTourMaxPoints:undefined,dataTourMaxPointsPropAngle:undefined,polylineModelOpts:{noNearestFinder:true},postCreate:function(_6ef){alp.util.conlog(this.declaredClass+".postCreate("+_6ef+") starts.");this._draw_enabled=false;if(this.viewOnly){this.dataTourMaxPoints=2000;this.dataTourMaxPointsPropAngle=0.5;if(alp.util.likeIE()){if(dojo.isIE<7){this.dataTourMaxPoints=150;}else{if(dojo.isIE<8){this.dataTourMaxPoints=250;}else{this.dataTourMaxPoints=750;}}this.dataTourMaxPointsPropAngle=0;}}if(window.alpConfig&&window.alpConfig.map){alp.util.mixinDefaults(this,window.alpConfig.map);}this.markerOptions=this.markerOptions||{};this.iconOptions=this.iconOptions||{};this.lineOptions=this.lineOptions||{};if(!this.data){this.data={};}if(this.data&&dojo.isString(this.data)){this.data=dojo.fromJson(this.data);}this._initData();this._installCategoryMap();if(!this.initialView){if((!this._someData)||(!(this.data&&this.data.gBounds))){this.initialView=this.initialViewNoData;}else{var bb=this.data.gBounds;if(bb){var ne=bb.getNorthEast();var sw=bb.getSouthWest();this.initialView=[sw.lng(),sw.lat(),ne.lng(),ne.lat()];}}}this.inherited(arguments);this.gmap_init_cb(this,function(){var _6f0=0;if(this.gmap){if(this.initSetMapType===dojo.indexOf(this.gmap.getMapTypes(),dojo.global.G_SATELLITE_3D_MAP)){_6f0=1500;}}window.setTimeout(dojo.hitch(this,function(){this._draw_enabled=true;this._draw();}),_6f0);});alp.util.conlog(this.declaredClass+".postCreate("+_6ef+") ends.");},updateData:function(_6f1){var o=typeof _6f1==="string"?dojo.fromJson(_6f1):_6f1;if(!(o.tour||(o&&o.pois&&o.pois.length>0))){this.clearData();return;}this._data_cleared=false;this.data=_6f1;this.initialView=null;this.postCreate();},clearData:function(_6f2){if(!this.isDataCleared()){this._data_cleared=true;this.data="{}";if(!_6f2){this.initialView=null;}this.postCreate(true);}},isDataCleared:function(){return this._data_cleared;},highlight:function(id){var i;var _6f3;function f(c){return new GLatLng(c[1],c[0]);};if(id&&(this._last_highlight_id===id)){return;}this._last_highlight_id=id;if(this._highlight){this._highlight.gMarker.setImage(this._getCategoryIconUrlFromPoi(this._highlight,false));dojo.publish("alp/gmap/OOIMap/highlightList/"+this._highlight.id,[false]);this._highlight=null;}if(this._touroverlays){if(this.gmap){dojo.forEach(this._touroverlays,dojo.hitch(this,function(o){o.setMap(null);}));this._touroverlays=[];}}if(id){var poi=this._poiMap[id];if(poi&&poi.gMarker){poi.gMarker.setImage(this._getCategoryIconUrlFromPoi(poi,true));this._highlight=poi;dojo.publish("alp/gmap/OOIMap/highlightList/"+id,[true]);if(this.data&&this.gmap){_6f3=this.data.tours;if(_6f3){for(i=0;i<_6f3.length;i++){if(_6f3[i].id===id){var _6f4=dojo.map(_6f3[i].coordinates,f);var _6f5=new alp._gmap2_3.digitize.PolylineModel(this.polylineModelOpts,_6f4);var _6f6=new alp._gmap2_3.digitize.PolylineView(_6f5,{"lineOptions":this.lineOptions,onepiece:true});_6f6.setMap(this.gmap);this._touroverlays=this._touroverlays||[];this._touroverlays.push(_6f6);}}}}}}},installCategoryMap:function(cmap,url){if(this._installCategoryMap.apply(this,arguments)){this._draw();}},_installCategoryMap:function(cmap,url){cmap=(cmap||this.categoryMap||dojo.getObject("alpConfig.map.categoryMap",false));if(cmap){this.categoryMap=(typeof cmap==="string")?dojo.fromJson(cmap):cmap;return true;}url=url||this.categoryMapUrl||dojo.getObject("alpConfig.map.categoryMapUrl",false);if(url&&(typeof url==="string")){this._catmapxhr=this._catmapxhr||{};this._catmapxhr[url]||(this._catmapxhr[url]=dojo.xhrGet({url:url,load:dojo.hitch(this,function(data,_6f7){this.installCategoryMap(data);})})||true);return false;}return false;},_onMarkerClick:function(id){if(!id){return;}this._marker_clicked(id);var poi=this._poiMap[id];if(!poi){return;}if(this.poi_infowindow_getter){var xy=poi.coordinates,_6f8=new GLatLng(xy[1],xy[0]);alp.gmap.openInfoWindow(this.gmap,_6f8,this.poi_infowindow_wait_html(),this.poi_infowindow_opts);var self=this;this.poi_infowindow_getter(id)(function(_6f9){var _6fa=alp.gmap.domnode_geomconnect(_6f9,function(id){self.iw_poi_clicked(id);},function(id){self.iw_poi_mouseover(id);});alp.gmap.openInfoWindow(self.gmap,_6f8,_6fa,self.poi_infowindow_opts);});return;}if(this.poi_link===false){return;}if(poi&&poi.url){if(this.poi_in_new_window){alp.x.open_win(poi.url);}else{window.location.href=poi.url;}}},_initData:function(){var d=this.data||{};var _6fb=false;var bb=new GLatLngBounds();var x,y;var _6fc;if(d.tour){d.tour.polyView=null;}if(d.tour&&(x=d.tour.encPolyline)&&x.points&&x.zoomFactor&&x.levels&&x.numLevels){_6fc=GPolyline.fromEncoded(dojo.mixin({},x,this.lineOptions));d.tour.coordinates=AG.latlng2xy(_6fc.getPath());}if(d.tour&&this.dataTourMaxPoints&&d.tour.coordinates&&(d.tour.coordinates.length>0)){if(this.data&&this.dataTourMaxPoints&&this.data.tour){var b=this.data.tour;if(b&&b.coordinates&&(b.coordinates.length>this.dataTourMaxPoints)){b.coordinates=alp.util.simplifyGeom(b.coordinates,this.dataTourMaxPoints,this.dataTourMaxPointsPropAngle);}}}if(d.tour&&_6fc){var tb=_6fc.getBounds();if(tb){bb.extend(tb.getSouthWest());bb.extend(tb.getNorthEast());_6fb=true;}this._someData=true;}this._poiMap={};if(d.pois&&(d.pois.length>0)){for(var i=0;i<d.pois.length;i++){var p=d.pois[i];p.gPoint=alp.gmap.fromGeoJSON(p,"POINT");if(p.nobb!==true){bb.extend(p.gPoint);}this._poiMap[p.id]=p;_6fb=true;this._someData=true;}}else{d.pois=[];}if(_6fb){var _6fd=bb.toSpan();var _6fe=_6fd.lng()*this.BOUNDS_PADDING;var _6ff=_6fd.lat()*this.BOUNDS_PADDING;var _700=bb.getSouthWest();var _701=bb.getNorthEast();var _702=new GLatLng(_700.lat()-_6ff,_700.lng()-_6fe);var _703=new GLatLng(_701.lat()+_6ff,_701.lng()+_6fe);var _704=new GLatLngBounds(_702,_703);d.gBounds=_704;}},_draw_previousOverlayList:[],_draw:function(){if(!this._draw_enabled){return;}dojo.forEach(this._draw_previousOverlayList,function(ov){ov.setMap(null);});this._draw_previousOverlayList=[];var _705;var d=this.data||{};var tour,_706;tour=d&&d.tour;if(tour){tour.nodes=tour.nodes||dojo.map(tour.coordinates,function(c){return new GLatLng(c[1],c[0]);});_706=new alp._gmap2_3.digitize.PolylineModel(this.polylineModelOpts,tour.nodes);d.tour.polyView=new alp._gmap2_3.digitize.PolylineView(_706,{lineOptions:this.lineOptions});}if(d.tour&&d.tour.polyView){_705=d.tour.polyView;_705.setMap(this.gmap);this._draw_previousOverlayList.push(_705);var _707=dojo.hitch(this,function(_708){return alp.util.asyncHitch(function(_709){var q;alp.util.conlog(this.declaredClass+": f_check() starts. n_tries:",_709);if(!((alp.util.likeIE()&&(dojo.isIE<8))||alp.util.likeFF())){alp.util.conlog(this.declaredClass+": f_check() ends: neither IE<8, nor FF.");return;}if(dojo.indexOf(this._draw_previousOverlayList,_708)<0){alp.util.conlog(this.declaredClass+": f_check() ends: overlay not in the list.",_708);return;}q=alp.util.likeFF()?"svg":"shape";if(dojo.query(q,this.domNode).length>0){alp.util.conlog(this.declaredClass+": f_check() -> ok.");return;}console.warn(this.declaredClass+": f_check() -> missing polyline workaround #4542",_708);_708.setMap(null);alp.util.asyncHitch(function(){_708.setMap(this.gmap);if(!(_709>123)){_707((_709||0)+1);}},this,123)();},this,87);})(_705);this.tilesLoadedDfrd().addCallback(dojo.partial(_707,0));}if(d&&(d.pois)){var _70a=(!(d.tour&&d.tour.polyView))&&(d.pois&&(d.pois.length===1));for(var i=0;i<d.pois.length;i++){var poi=d.pois[i];var _70b=dojo.delegate(this.markerOptions,{icon:this._getPoiIcon(poi,_70a),title:this._getPoiTitle(poi)});if(!_70b.icon){continue;}poi.gMarker=new GMarker(poi.gPoint,_70b);GEvent.addListener(poi.gMarker,"mouseover",dojo.hitch(this,"highlight",poi.id));if(!poi.persistent_highlight){GEvent.addListener(poi.gMarker,"mouseout",dojo.hitch(this,"highlight",null));}if(poi.url||poi.clickable){GEvent.addListener(poi.gMarker,"click",dojo.hitch(this,"_onMarkerClick",poi.id));}_705=poi.gMarker;_705.setMap(this.gmap);this._draw_previousOverlayList.push(_705);}}var tour,_70c,_706;if(this.showArrowView){tour=this.data&&this.data.tour;if(tour&&this.gmap){_70c=tour.nodes||dojo.map(tour.coordinates,function(c){return new GLatLng(c[1],c[0]);});_706=new alp._gmap2_3.digitize.PolylineModel(this.polylineModelOpts,_70c);var _70d=new alp._gmap2_3.digitize.DirectionArrowView(_706,{subtype:"red"});_705=_70d;_705.setMap(this.gmap);this._draw_previousOverlayList.push(_705);GEvent.addListener(this.gmap,"zoomend",function(){_70d.update();});}}if(this.showStartMarkerView){tour=this.data&&this.data.tour;if(tour&&this.gmap){_70c=tour.nodes||dojo.map(tour.coordinates,function(c){return new GLatLng(c[1],c[0]);});_706=new alp._gmap2_3.digitize.PolylineModel(this.polylineModelOpts,_70c);var _70e=new alp._gmap2_3.digitize.StartMarkerView(_706);_705=_70e;_705.setMap(this.gmap);this._draw_previousOverlayList.push(_705);}}},_getPoiTitle:function(poi){if(poi.name){return poi.name;}if(poi.category){return poi.category;}return this._getCategoryName(poi);},_getCategoryName:function(poi){var c=poi&&poi.cat&&this._getCategory(poi.cat,true);return c&&c.name;},_getCategory:function(_70f,_710){var cm=this.categoryMap;return (_70f&&cm&&cm.items&&(cm.items[_70f]||((!_710)&&cm._default&&cm.items._default)));},_getPoiIcon:function(poi,_711){var _712=new GIcon(G_DEFAULT_ICON);dojo.mixin(_712,this.iconOptions);_712.image=this._getCategoryIconUrlFromPoi(poi,false,_711);if(!_712.image){return null;}return _712;},_getCategoryIconUrlFromPoi:function(poi,_713,_714){var cm=this.categoryMap,def=this.showDefaultIcon||G_DEFAULT_ICON.image,o,_715,_716=poi&&(poi.url?(_713?"iconHighlightUrl":"iconUrl"):(_714?"iconUrl":"iconInactiveUrl"));if(poi.mapicon_url){return poi.mapicon_url;}if(!(cm&&_716)){return def;}o=(poi.cat&&this._getCategory(poi.cat))||this._getCategory("_default")||poi;if(o&&o[_716]){return o[_716];}_715=cm&&(cm[_716]||cm.iconUrl);if(!_715){return def;}o[_716]=(o.img&&dojo.string.substitute(_715,o))||def;return o[_716];},marker_clicked:function(id){alp.util.conlog(this.declaredClass+".marker_clicked( \""+id+"\" )");},iw_poi_clicked:function(id){alp.util.conlog(this.declaredClass+".iw_poi_clicked( \""+id+"\" )");},iw_poi_mouseover:function(id){alp.util.conlog(this.declaredClass+".iw_poi_mouseover( \""+id+"\" )");},_marker_clicked:alp.util.asyncHitch("marker_clicked"),_iw_poi_clicked:alp.util.asyncHitch("iw_poi_clicked"),_iw_poi_mouseover:alp.util.asyncHitch("iw_poi_mouseover")});(function(){var _717=alp.util.mapany();alp.gmap.get_ooimapupdater=function(_718,opts){return _717.get(_718)||_717.set(_718,new alp.gmap._OOIMapUpdater(dojo.mixin({},opts,{ooimap:_718})));};dojo.declare("alp.gmap._OOIMapUpdater",null,{ooimap:undefined,pause_min_ms:alp.util.likeIE()?4000:2000,constructor:function(opts){dojo.mixin(this,opts);if(!(this.ooimap instanceof alp.gmap.OOIMap)){console.error(this.declaredClass+".constructor(",opts,") --> opts.ooimap must be an alp.gmap.OOIMap instance.");}if(_717[this.ooimap]){console.error("alp.gmap._OOIMapUpdater - there can be only one OOIMapUpdater per ooimap!!!");}},updateData:function(json){this._set_todo(json);this._update_view();},clearDataNow:function(_719){this._clear_todo();this._last_done=this._todo;if(this.ooimap){this.ooimap.clearData(_719);}},_get_todo:function(){return this._todo;},_has_todo:function(){return this._todo!==undefined;},_set_todo:function(json){this._todo=json;},_clear_todo:function(){this._set_todo();},did_update_recently:function(){return (alp.util.now_time()-this._get_last_view_update())<this.pause_min_ms;},_update_view:function(_71a){if(!(this._has_todo()&&this.ooimap)){return;}if((_71a!==undefined)&&(_71a!==this._last_view_update)){return;}var todo=this._get_todo();if(todo===this._last_done){return;}var _71b=this.did_update_recently();this._last_view_update=alp.util.now_time();if(_71b){if(!this.ooimap.isDataCleared()){this.ooimap.clearData();}alp.util.asyncHitch("_update_view",this,1+this.pause_min_ms)(this._last_view_update);return;}this.ooimap.updateData(todo);this._last_done=todo;this._clear_todo();},_time_since_last_view_update:function(){return alp.util.now_time()-this._get_last_view_update();},_get_last_view_update:function(){return this._last_view_update||-Infinity;}});})();});}if(typeof dojo==="undefined"||!dojo._hasResource["oa_v2.maplayer"]){typeof dojo==="undefined"||(dojo._hasResource["oa_v2.maplayer"]=true);dojo.provide("oa_v2.maplayer");oa_v2.maplayer.from_datatype=function(name,id){var o=dojo.getObject("alpConfig.oa_v2.default_maplayer");if((name!==undefined)&&o){return o[name]||o["default"]||[];}return alp.cfg.data.type_id.isWinter(id)?["avalanche","skiresort"]:[];};}if(typeof dojo==="undefined"||!dojo._hasResource["oa_v2.maptype"]){typeof dojo==="undefined"||(dojo._hasResource["oa_v2.maptype"]=true);dojo.provide("oa_v2.maptype");oa_v2.maptype.from_datatype=function(name,id){var o=dojo.getObject("alpConfig.oa_v2.default_maptype");if((name!==undefined)&&o){return o[name]||o["default"]||[];}return alp.cfg.data.type_id.isWinter(id,name)?"Winter":0;};}if(typeof dojo==="undefined"||!dojo._hasResource["oa_v2.cfg.ooimap"]){typeof dojo==="undefined"||(dojo._hasResource["oa_v2.cfg.ooimap"]=true);dojo.provide("oa_v2.cfg.ooimap");(function(f){if(typeof GMap!=="undefined"){f.apply(this);}else{dojo["require"]("alp.google");alp.gmap_asyncdfrd().addCallback(this,f);}})(function(){(function(){var o,oa;var _71c="8bit";dojo.getObject("alp._obj",true).DATAFORMAT=_71c;o=dojo.getObject("alpConfig.map",true);oa=dojo.getObject("alpConfig.oa_v2",true);o.hasFullScreen=true;o.fullCtrlHtml=false;(function(){var _71d="avalanche",_71e="skiresort",arr,init,_71f,_720,_721,_722;o.tileLayerOverlays=o.tileLayerOverlays||{};var _723=undefined;if(oa.avalanche){_723=alp.cfg.gtilelayer.germanyavalanche(_71c);o.tileLayerOverlays[_71d]=[_723,{zPriority:4}];}var _724=undefined;if(oa.skiresort){_724=alp.cfg.gtilelayer.germanyskiresort(_71c);o.tileLayerOverlays[_71e]=[_724,{zPriority:5}];}if(oa.auto_maplayers){arr=undefined;_721=oa.tourDataTypeId;_722=oa.tourDataTypeName;if(_721||_722){arr=oa_v2.maplayer.from_datatype(_722,_721);}if(arr){init=(o.tileLayerOverlays_init=o.tileLayerOverlays_init||{});dojo.forEach(arr,function(s){init[s]=oa[s];});_71f=(o.layer_dropdownchecked_init=o.layer_dropdownchecked_init||[]);dojun.forIn(init,function(v,k){if(v&&(0>dojo.indexOf(_71f,k))){_71f.push(k);}});}}})();o=dojo.getObject("alpConfig.oa_v2",true);if(o.transalpNetwork===undefined){o.transalpNetwork=(function(){var q=alp.util.encQueryToObject();var s;if(q.network!==undefined){s=q.network.toLowerCase();return (s=="transalp");}})();}if(o.transalp===undefined){o.transalp=(function(){var q=alp.util.encQueryToObject();var s;if(q.transalp!==undefined){s=q.transalp.toLowerCase();return (s==="")||(s==="t")||(s==="true");}if(o.transalpNetwork!==undefined){return o.transalpNetwork;}return false;})();}o=dojo.getObject("alpConfig.digitize",true);o.arrow_base_url=alp.cfg.alpConfig.digitize.arrow_base_url();o=dojo.getObject("alpConfig.map",true);o.viewOnly=true;o.iconOptions={shadow:alp.cfg.alpConfig.map.iconOptions.shadow(),iconSize:new GSize(21,24),iconAnchor:new GPoint(5,24),maxHeight:10,shadowSize:new GSize(31,24)};o.lineOptions={color:"#ff0000",opacity:1};o.showArrowView=true;o.showStartMarkerView=true;o.initialViewNoData=o.initialViewNoData||"10.215911865234375, 47.558920607496525, 11";(function(){var _725,q;_725=new dojo._Url(document.location);if(_725.query){q=alp.util.encQueryToObject(_725.query);if(q.df){if(["json","7bit","8bit"].indexOf(q.df)>-1){_71c=q.df;}else{throw new Error("Invalid data format \""+q.df+"\". Sticking to \""+_71c+"\".");}}}})();o.initGmapTypes=(function(){var _726={};var _727=alp.cfg.gmaptype.alpstein_map2(_71c,{cz:true});var _728=alp.cfg.gmaptype.alpstein_mapwinter2(_71c,{cz:true});var _729=alp.cfg.gmaptype.satellite([],0,18);var _72a=alp.cfg.gmaptype.alpstein_hybrid2(_71c);var _72b=dojo.global.G_PHYSICAL_MAP;return alp.util.safeConcat([_727,alp.cfg.gmaptype.google_normal(),_729,_72a,dojo.global.G_SATELLITE_3D_MAP,_72b,_728]);})();o.initSetMapType=(function(){var a,mt,_72c,_72d,_72e;mt=alp.util.encQueryToObject().map;if(mt&&mt.toLowerCase()=="3d"&&dojo.global.G_SATELLITE_3D_MAP){return dojo.indexOf(alpConfig.map.initGmapTypes,dojo.global.G_SATELLITE_3D_MAP);}else{_72c=oa.tourDataTypeId;_72d=oa.tourDataTypeName;if(_72c||_72d){_72e=oa_v2.maptype.from_datatype(_72d,_72c);if(_72e){a=alp.gmap.getMapType(alpConfig.map.initGmapTypes,_72e);if(a){return a;}}}}return undefined;})();o.map_nodes=function(){return [this.domNode,".map-bar",".alpDropDownCheckedButtonContainer"];};})();(function(){var a=dojo.getObject("alpConfig.map");if(a&&a.categoryMapUrl2Id){alp.addOnParse(function(){window.setTimeout(function(){function f(url){return function(data,_72f){var _730=dijit.byId(a.categoryMapUrl2Id[url]);if(_730){_730.installCategoryMap(data);}};};alp.util.objForEach(a.categoryMapUrl2Id,function(url){dojo.xhrGet({url:url,load:f(url)});});},0);});}})();alp.addOnParse(function(){alp.util.getDfrd(function(){return dojo.getObject("alp._obj.ooimap")||dijit.byId("base")||undefined;}).addCallback(function(_731){dojo.getObject("alp._obj",true).ooimap=_731;alp.util.getDfrd(function(){return _731&&_731.gmap||undefined;}).addCallback(function(gmap){var last;GEvent.addListener(gmap,"moveend",function(){var c=gmap.getCenter(),z=gmap.getZoom();if(last&&z==1&&Math.abs(c.lat()-24.9999941621492)<1e-10&&Math.abs(c.lng()+39.99999571088)<1e-10){gmap.setCenter(last.c,last.z);}else{last={c:c,z:z};}});});});});});}if(typeof dojo==="undefined"||!dojo._hasResource["oa_v2.ip_geolocation"]){typeof dojo==="undefined"||(dojo._hasResource["oa_v2.ip_geolocation"]=true);dojo.provide("oa_v2.ip_geolocation");(function(f){if(typeof GMap!=="undefined"){f.apply(this);}else{dojo["require"]("alp.google");alp.gmap_asyncdfrd().addCallback(this,f);}})(function(){oa_v2.ip_geolocation=function(){var _732=new GLatLng(51.23440735163458,9.755859375);var zoom=5;if(google&&google.loader&&google.loader.ClientLocation){var o=google.loader.ClientLocation;if(o&&o.latitude&&o.longitude&&(typeof o.latitude==="number")&&(typeof o.longitude==="number")&&o.address&&o.address.country_code&&(o.address.country_code.toLowerCase()==="de")){_732=new GLatLng(o.latitude,o.longitude);zoom=11;}}return [_732.lng(),_732.lat(),zoom];};});}if(typeof dojo==="undefined"||!dojo._hasResource["oa_v2.cfg.tours"]){typeof dojo==="undefined"||(dojo._hasResource["oa_v2.cfg.tours"]=true);dojo.provide("oa_v2.cfg.tours");(function(f){if(typeof GMap!=="undefined"){f.apply(this);}else{dojo["require"]("alp.google");alp.gmap_asyncdfrd().addCallback(this,f);}})(function(){var o=dojo.getObject("alpConfig.map",true);var _733,hash,s;hash=dojo.getObject("dojo.doc.location.hash");hash=hash&&hash.substr(1);if(hash){hash=alp.util.encQueryToObject(hash);s="initSetMapType";if(hash.mt&&(o[s]===undefined)){o[s]=hash.mt;}s="initialView";if(hash.lng&&hash.lat&&hash.z&&(o[s]===undefined)){o[s]=[hash.lng,hash.lat,hash.z];}}else{_733=oa_v2.ip_geolocation();o.initialView=(o.initialViewNoData=_733);}});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.data.primitivesetstate"]){typeof dojo==="undefined"||(dojo._hasResource["alp.data.primitivesetstate"]=true);dojo.provide("alp.data.primitivesetstate");(function(){var CN="alp.data.PrimitiveSetState",AU=alp.util;dojo.declare(CN,alp.data.SetState,{is_same:function(x,y){var x2=[].concat(x),y2=[].concat(y);x2.sort();y2.sort();return AU.equal_array(x2,y2);}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.sortedinsert"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.sortedinsert"]=true);dojo.provide("alp.util.sortedinsert");alp.util.add_sortedinsert=function(arr,opts){arr.sortedinsert=dojo.hitch(new alp.util.SortedInserter(arr,opts),"insert");};alp.util.sortedinsert=function(x,arr,opts){(new alp.util.SortedInserter(arr,opts)).insert(x);};(function(){var CN="alp.util.SortedInserter";dojo.declare(CN,null,{constructor:function(arr,opts){var me=this;me.arr=arr||[];me.compare_fun=opts&&opts.compare_fun;me.no_optim=opts&&opts.no_optim;me._calls=0;if(me.no_optim){me.insert=me._insert;}},insert:function(x){var me=this;if((++me._calls)%100){me.arr.push(x);if(me.compare_fun){me.arr.sort(me.compare_fun);}else{me.arr.sort();}return;}var _734=new Date(),ind=me._insert_ind(x),_735=new Date()-_734;me.arr.push(x);if(me.compare_fun){var _736=new Date();me.arr.sort(me.compare_fun);var _737=new Date()-_736;}else{var _736=new Date();me.arr.sort();var _737=new Date()-_736;}if(_737>5*_735){me.insert=me._insert;}return;},_insert:function(x){this.arr.splice(this._insert_ind(x),0,x);},_insert_ind:function(x){var me=this,arr=me.arr,_738=0,_739=arr.length;if(!(_739>0)){return 0;}if(!me.compare_fun){if(x<arr[0]){return 0;}if(x>arr[_739-1]){return _739;}var _73a,span,_73b,_73c;while(_73a!==(span=_739-_738)){_73a=span;_73b=(_739+_738)>>1;_73c=arr[_73b];if(x<_73c){_739=Math.max(_738,_73b);}else{_738=Math.min(_739,_73b);}}return _739;}else{var _73d=me.compare_fun;if(_73d(x,arr[0])<0){return 0;}if(_73d(x,arr[_739-1])>0){return _739;}var _73a,span,_73b,_73c;while(_73a!==(span=_739-_738)){_73a=span;_73b=(_739+_738)>>1;_73c=arr[_73b];if(_73d(x,_73c)<0){_739=Math.max(_738,_73b);}else{_738=Math.min(_739,_73b);}}return _739;}}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.data.quadtree"]){typeof dojo==="undefined"||(dojo._hasResource["alp.data.quadtree"]=true);dojo.provide("alp.data.quadtree");(function(){var _73e,_73f,_740;var CN="alp.data.QuadTree";dojo.declare(CN,null,{get_xy:null,get_qt:function(id){return _73e(this.get_xy(id),30);},idlist_st:null,constructor:function(cfg){if(!((!!cfg.get_xy)^(!!cfg.get_qt))){throw new Error(CN+".constructor(): you must provide *either* `cfg.get_xy` or `cfg.get_qt`.");}var me=this;me.idlist_st=new alp.data.PrimitiveSetState();dojo.mixin(me,cfg);me._id2qt={};me._qt2idlist=[];alp.util.add_sortedinsert(me._qt2idlist,{compare_fun:function(a,b){return (a[0]<b[0])?-1:+1;}});me.idlist_st.changed_cb(me,"_update_idlist");},has:function(id){return id&&!!this._id2qt[id];},update:function(id,_741){var me=this,_742=me._id2qt[id],_743=me.get_qt(id);if(_742==_743){return;}if(_742){me._delete_id(id);}if(_743){me._id2qt[id]=_743;var span=this._searchqt(_743);if(!span){me._qt2idlist.sortedinsert([_743,[id]]);}else{if(!("first" in span&&"last" in span&&span.first===span.last)){throw new Error(CN+" is buggy #0.");}this._qt2idlist[span.first][1].push(id);}}if(!_741){this._changed();}},search:function(qt){var me=this,span=me._searchqt(qt),_744=[];if(span){for(var a=span.first,_745=span.last;a<=_745;a++){_744=_744.concat(me._qt2idlist[a][1]);}}var _746=new Array(_744.length);dojo.forEach(_744,function(id,ind){_746[ind]=me._id2qt[id];});return {idlist:_744,qtlist:_746};},changed:function(){},_changed:alp.util.asyncHitch("changed"),_update_idlist:function(_747){var me=this,_748=false;me._last_idlist=me._last_idlist||[];dojo.forEach(me._last_idlist,function(id){if(0>dojo.indexOf(_747,id)){me._delete_id(id);_748=true;}});dojo.forEach(_747,function(id){if(!me._id2qt[id]){me.update(id,true);_748=true;}});me._last_idlist=_747;if(_748){this._changed();}},_delete_id:function(id){var _749=this._id2qt[id];if(!_749){throw new Error(CN+" is buggy #1.");}delete this._id2qt[id];var span=this._searchqt(_749);if(!(span&&"first" in span&&"last" in span&&span.first===span.last)){throw new Error(CN+" is buggy #2.");}var arr=this._qt2idlist[span.first][1],ind=dojo.indexOf(arr,id);if(ind<0){throw new Error(CN+" is buggy #3.");}arr.splice(ind,1);if(arr.length<1){this._qt2idlist.splice(span.first,1);}},_searchqt:function(qt){return this._searcher().search(qt);},_searcher:function(){var me=this,ret=new alp.util.SortedDataSearcher(function(){return me._qt2idlist.length;},function(ind,data){var qt=me._qt2idlist[ind][0],n=data.length;if(qt.length>n){qt=qt.substring(0,n);}if(qt<data){return -1;}if(qt>data){return +1;}return 0;});return (this._searcher=function(){return ret;})();}});alp.data.QuadTree.xy2qt=_73e=function(xy,_74a){if(_74a==null){_74a=30;}var n=1<<_74a;return _73f((xy.x*n)>>0,(xy.y*n)>>0,_74a);};alp.data.QuadTree.ijz2qt=_73f=function(i,j,z){var arr=new Array(z),_74b=113;for(var a=z;a--;){arr[a]=_74b+((j&1)<<1)+(i&1);i>>=1;j>>=1;}return String.fromCharCode.apply(String,arr);};var I={"q":0,"r":1,"s":0,"t":1},J={"q":0,"r":0,"s":1,"t":1};alp.data.QuadTree.qt2ijz=_740=function(qt,z,_74c){if(z==null){z=qt.length;}var i=0,j=0;for(var a=0;a<z;a++){i<<=1;j<<=1;var c=qt.charAt(a);i|=I[c];j|=J[c];}var ret={i:i,j:j,z:z};if(_74c){var t=_740(qt.substring(z,z+_74c),_74c);ret.subi=t.i;ret.subj=t.j;}return ret;};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.cluster.abstract_cm_load_oois"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.cluster.abstract_cm_load_oois"]=true);dojo.provide("alp._gmap2_3.cluster.abstract_cm_load_oois");(function(){var CN="alp._gmap2_3.AbstractClusterModelLoadOOIs",AG=alp._gmap2_3;dojo.declare(CN,null,{load_OOIs:_74d});function _74d(_74e){return (new alp.data.OOIs({idlist:_74e,proj:this.url_default_param.proj})).load_dfrd();};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.cluster.cluster_manualooi_model"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.cluster.cluster_manualooi_model"]=true);dojo.provide("alp._gmap2_3.cluster.cluster_manualooi_model");(function(){var AG=alp._gmap2_3,CN="alp._gmap2_3.ClusterManualOOIModel";AG.cluster.MANUALOOI_CATID="manualooi";dojo.declare(CN,null,{add_manual_oois:function(arr){var _74f=dojo.map(arr,function(x){return (typeof x==="string")?x:alp.data.createCustomOOI(x);});this.manual_ooi_ids().merge(_74f);return _74f;},remove_manual_oois:function(_750){this.manual_ooi_ids().subtract(_750);},get_manual_ooi_ids:function(){return this.manual_ooi_ids().get();},manual_ooi_ids:function(){var ret=new alp.data.PrimitiveSetState(),gm=google.maps,me=this,db=alp.db.common(),_751=function(){return alp.m(me,"get_gproj");},_752=function(id){var _753=db.getset(id+alp.data.ooi_db_suffix),ooi=_753&&alp.data.single_ooi(_753).data,xy=ooi&&ooi.id&&((ooi.id===id)||alp.data.ooiid.is_external(id))&&alp.data.ooi_geometry(ooi);if(!xy){console.error("cluster_manualooi_model: insufficient xy data for id:",id);}xy=xy||{};if(typeof xy.lat!=="number"){xy.lat=-80;}if(typeof xy.lng!=="number"){xy.lat=-159;}if(xy){return AG.fromLatLngToUnitPoint(_751(),new gm.LatLng(xy.lat,xy.lng));}},_754=new alp.data.QuadTree({get_xy:_752,idlist_st:ret});var _755=function(name,data){if(!alp.util.ends_with(name,alp.data.ooi_db_suffix)){return;}if(!_751()){alp.util.asyncHitch(_755,null,789)(name,data);return;}var ooi=alp.data.single_ooi(data||db.getset(name)),id=ooi&&ooi.data&&ooi.data.id;if(id&&_754.has(id)){_754.update(id);}};dojo.connect(db,"changed",_755);ret.changed_cb(function(v){_754.idlist_st.set(v);});dojo.connect(_754,"changed",function(){if(me._changed){me._changed(me);}});var _756=(this.manual_ooi_ids=function(){return ret;});_756.qtree=_754;return _756();},get_manual_oois_in_tile:function(x,y,zoom){var me=this,_757=alp.data.QuadTree.ijz2qt(x,y,zoom),_758=me._init().manual_ooi_ids.qtree.search(_757),_759=_758.idlist,_75a=_758.qtlist;return me.get_manual_oois(_759,_75a);},get_manual_oois:function(_75b,_75c){var me=this,db=alp.db.common(),arr=dojo.map(_75b,function(id){return db.getset(id+alp.data.ooi_db_suffix);}),ret=dojo.map(arr,function(x,ind){return alp.data.single_ooi(x,_75b[ind]).data;});dojo.forEach(ret,function(x,ind){var a=alp.data.single_ooi(arr[ind]),_75d=alp.util.get_property(a,"data.category.id")||alp.util.get_property(a,"data.type");ret[ind]=dojo.mixin({t:AG.cluster.MANUALOOI_CATID},x,{id:_75b[ind],ismanualooi:true,t_img:_75d});if(_75c){ret[ind].qt=_75c[ind];}});return ret;},manual_ooi_ids_changed:function(){},_init:function(){var me=this;me.manual_ooi_ids();return (me._init=function(){return me;})();},_manual_ooi_ids_changed:alp.util.asyncHitch("manual_ooi_ids_changed")});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.qt7bit.const"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.qt7bit.const"]=true);dojo.provide("alp._gmap2_3.qt7bit.const");(function(){var AGQ=alp._gmap2_3.qt7bit;AGQ.NBITS=22;AGQ.ID="id";AGQ.CATID="catid";AGQ.GEOM="geom";AGQ.NCHUNKS="____nChunks____";AGQ.NQTDATAPOINT="____nQTDataPoint____";AGQ.FIRST="____first____";AGQ.LAST="____last____";AGQ.DATABBOX="____dataBbox____";})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.math.arr10"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.math.arr10"]=true);dojo.provide("alp.util.math.arr10");(function(){var _75e=alp.util.math.arr10;_75e.from_str10=_75f;_75e.sub1=sub1;_75e.add=add;_75e.div2=div2;_75e.mul=mul;function _75f(_760){var arr=_760.split("").reverse();for(var a=arr.length;a--;){arr[a]=arr[a]>>0;}return arr;};function sub1(v){add(v,-1);};function add(v,_761){var rest=_761;for(var a=0;rest||a<v.length;a++){var sum=(v[a]||0)+rest,y=sum%10,_762=(y<0)?(y+10):y;v[a]=_762;rest=((sum-_762)/10)>>0;}};function div2(v){mul(v,5);v.shift();};function mul(v,_763){_763=Math.abs(_763);var rest=0;for(var a=0;rest||a<v.length;a++){var x=(v[a]||0)*_763+rest,y=x%10,_764=(y<0)?(y+10):y;v[a]=_764;rest=(x/10)>>0;}};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.qt7bit._core"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.qt7bit._core"]=true);dojo.provide("alp._gmap2_3.qt7bit._core");(function(){var AG=alp._gmap2_3,AGQ=AG.qt7bit,_765=AGQ.NBITS;AGQ.qt7bit_2_latlng=_766;AGQ.qt7bit_2_tilexy=_767;AGQ.latlng_2_qt7bitstr=_768;AGQ.latlng_2_qt7bitarr=_769;AGQ.tilexy_2_qt7bitarr=_76a;AGQ.tilexy_2_qt7bitstr=_76b;AGQ.ORIG_NW=_76c;AGQ.ORIG_SE=_76d;AGQ.bitarr_2_bitstr=_76e;AGQ.bitstr_2_bitarr=_76f;AGQ.bitdotstr=_770;AGQ.geom_2_bitarr=_771;AGQ.geom_2_bitstr=_772;AGQ.geomiddle_str=_773;AGQ.geomiddle_arr=_774;AGQ.middle_str=_775;AGQ.middle_arr=_776;AGQ.get_7bit=_777;AGQ.qt7bit_2_int64str10=_778;AGQ.int64str10_2_qt7bitstr=_779;AGQ.int64str10_2_qt7bitarr=_77a;AGQ.set_7bitarr=_77b;AGQ.bit_2_7bybi=_77c;AGQ.qt7bit_plus_1=_77d;AGQ.qt7bit_minus_1=_77e;AGQ.qt7bit_sub=_77f;AGQ.qt7bit_add=_780;var _781=alp.util.lazydef("new google.maps.MercatorProjection(31)"),_782=alp.util.math.arr10;function _77c(bit){bit=bit>>0;return [(bit/7)>>0,bit%7];};function _77b(bit,_783,arr){arr||(arr=[]);var bb=_77c(bit),_784=bb[0],_785=bb[1];while(arr.length<_784+1){arr.push(0);}if(_783){arr[_784]=arr[_784]|(1<<_785);}else{arr[_784]=arr[_784]&~(1<<_785);}return arr;};function _777(bit,arr){var bb=_77c(bit),_786=bb[0],_787=bb[1];return !!(arr[_786]&(1<<_787));};var _788=alp.util.array.rep([0],19);function _778(_789){if(typeof _789==="string"){return _778(_76f(_789));}var arr=_789,_78a=_777(63,arr),sign=_78a?"-":"",v=[].concat(_788);for(var bit=63;bit--;){mul2(v);if(_78a^_777(bit,arr)){add1(v);}}if(_78a){add1(v);}while((v.length>1)&&(0===v[v.length-1])){v.pop();}v.reverse();return sign+v.join("");};function _779(_78b){return _76e(_77a(_78b));};var _78c=alp.util.array.rep([0],10);function _77a(_78d){_78d=dojo.trim(_78d);var _78e=(_78d.charAt(0)==="-");if(/^[\+\-]/.test(_78d)){_78d=_78d.substring(1);}var _78f=_782.from_str10(_78d);if(_78e){_782.sub1(_78f);}var ret=[].concat(_78c);for(var bit=0;bit<63;bit++){if(_78e^(_78f[0]%2)){_77b(bit,1,ret);}_782.div2(_78f);}if(_78e){_77b(63,1,ret);}return ret;};function _768(_790,_791){return _76e(_769(_790,_791));};function _769(_792,_793){_793||(_793=_765);var xy=AG.fromLatLngToPixel(_781(),_792,_793),x=xy.x,y=xy.y;x=(x/256)>>0;y=(y/256)>>0;return _76a({x:x,y:y},_793);};function _76b(xy,_794){return _76e(_76a(xy,_794));};function _76a(xy,_795){_795||(_795=_765);var x=xy.x,y=xy.y,arr=[0],by7=0,bi7=0,mask=1,_796=_795;while(_796--){if(y&1){arr[by7]|=mask;}y>>=1;bi7++;if(bi7===7){arr.push(0);by7++;bi7=0;mask=1;}else{mask<<=1;}if(x&1){arr[by7]|=mask;}x>>=1;bi7++;if(bi7===7){arr.push(0);by7++;bi7=0;mask=1;}else{mask<<=1;}}return arr;};function _76f(s){var n=s.length,ret=new Array(n);for(var a=n;a--;){ret[a]=s.charCodeAt(n-1-a);}return ret;};function _76c(_797){_797=_797||_765;var _798=new Array(Math.ceil(2*_797/7));for(var a=_798.length;a--;){_798[a]=0;}var _799=_76e(_798),_79a=_79b(_798,_797);return {lat:_79a.lat(),lng:_79a.lng(),qt_arr:_798,qt_str:_799};};function _76d(_79c){_79c=_79c||_765;var _79d=_77e(_76c(_79c).qt_arr,_79c),_79e=_76e(_79d),_79f=_79b(_79d,_79c);return {lat:_79f.lat(),lng:_79f.lng(),qt_arr:_79d,qt_str:_79e};};function _76e(arr){var n=arr.length,arr2=new Array(n);for(var a=n;a--;){arr2[a]=String.fromCharCode(arr[n-1-a]);}return arr2.join("");};function _770(_7a0,_7a1){if(typeof _7a0==="string"){return _770(_76f(_7a0),_7a1);}var arr=[].concat(_7a0);arr.reverse();return arr.join(".");};function _771(x,_7a2){if(typeof x==="string"){return _76f(x);}var _7a3,lat,lng;if(x instanceof google.maps.LatLng){_7a3=x;}else{if("lat" in x&&"lng" in x){lat=alp.util.fun_or_not(x.lat);lng=alp.util.fun_or_not(x.lng);if(alp.util.isFiniteNumber(lat)&&alp.util.isFiniteNumber(lng)){_7a3=new google.maps.LatLng(lat,lng);}}}if(_7a3){return _769(_7a3,_7a2||_765);}return x;};function _772(x,_7a4){if(typeof x==="string"){return x;}var _7a5,lat,lng;if(x instanceof google.maps.LatLng){_7a5=x;}else{if("lat" in x&&"lng" in x){lat=alp.util.fun_or_not(x.lat);lng=alp.util.fun_or_not(x.lng);if(alp.util.isFiniteNumber(lat)&&alp.util.isFiniteNumber(lng)){_7a5=new google.maps.LatLng(lat,lng);}}}if(_7a5){return _768(_7a5,_7a4||_765);}return _76e(x);};function _773(_7a6,_7a7){return _76e(_774.apply(null,arguments));};function _774(_7a8,_7a9){var xy0=_767(_7a8),xy1=_767(_7a9);return _76a({x:(xy0.x+xy1.x)>>1,y:(xy0.y+xy1.y)>>1});};function _775(_7aa,_7ab){return _76e(_776.apply(null,arguments));};function _776(_7ac,_7ad){var arr0=typeof _7ac==="string"?_76f(_7ac):_7ac,arr1=typeof _7ad==="string"?_76f(_7ad):_7ad,n=arr0.length,ret=new Array(n);for(var a=n;a--;){ret[a]=(arr0[a]+arr1[a])>>1;}return ret;};function _767(_7ae,_7af){_7af||(_7af=_765);var xy=_7b0(_7ae,_7af);return {x:xy[0],y:xy[1]};};function _79b(_7b1,_7b2){_7b2||(_7b2=_765);var xy=_767(_7b1,_7b2);return AG.fromPixelToLatLng(_781(),new google.maps.Point(xy.x*256,xy.y*256),_7b2);};var _7b3={};function _766(_7b4,_7b5){_7b5||(_7b5=_765);var xy=_767(_7b4,_7b5);var c=_7b3[_7b5];if(!c){c={nw:_76c(_7b5),se:_76d(_7b5)};c.lng_min=c.nw.lng;c.lng_span=c.se.lng-c.nw.lng;c.x_max=_767(c.se.qt_arr,_7b5).x;c.prop_den=1<<(_765-1);c.half_pi=Math.PI/2;c.ratio=180/Math.PI;_7b3[_7b5]=c;}var lng=c.lng_min+c.lng_span*(xy.x/c.x_max),prop=-1+xy.y/c.prop_den,lat=(c.half_pi-2*Math.atan(Math.exp(prop*Math.PI)))*c.ratio;return new google.maps.LatLng(lat,lng);};function _77d(_7b6,_7b7){if(typeof _7b6==="string"){return _76e(_77d(_76f(_7b6),_7b7));}return _780(_7b6,1,_7b7);};function _77e(_7b8,_7b9){if(typeof _7b8==="string"){return _76e(_77e(_76f(_7b8),_7b9));}return _780(_7b8,-1,_7b9);};function _77f(_7ba,k,_7bb){return _780(_7ba,-k,_7bb);};function _780(_7bc,k,_7bd){_7bd=_7bd||_765;if(typeof _7bc==="string"){return _76e(_780(_76f(_7bc),k,_7bd));}var arr=[].concat(_7bc),n=arr.length;for(var by=0;by<n;by++){var bi=by*7,n_bi=Math.min(7,2*_7bd-bi),_7be=1<<n_bi,v=arr[by],_7bf=(v+k)%_7be;while(_7bf<0){_7bf+=_7be;}k-=(_7bf-v);arr[by]=_7bf;k>>=n_bi;}return arr;};var _7c0={},_7c1=!(alp.util.likeIE()&&dojo.isIE<9);function _7b0(_7c2,_7c3){var _7c4,ret;if(typeof _7c2==="string"){_7c4=_7c3+".str:"+_7c2;if(_7c4 in _7c0){return _7c0[_7c4];}_7c2=_76f(_7c2);}var arr=_7c2,_7c5;if(_7c1){_7c5=_7c3+".arr:["+arr.join(",")+"]";if(_7c5 in _7c0){return _7c0[_7c5];}}var x=0,y=0,by7=0,_7c6=arr[by7],bi7=0,mask=1,_7c7=_7c3;while(_7c7--){if(_7c6&1){y|=mask;}_7c6>>=1;bi7++;if(bi7===7){by7++;_7c6=arr[by7];bi7=0;}if(_7c6&1){x|=mask;}_7c6>>=1;bi7++;if(bi7===7){by7++;_7c6=arr[by7];bi7=0;}mask<<=1;}var ret=[x,y];if(_7c4){_7c0[_7c4]=ret;}if(_7c5){_7c0[_7c5]=ret;}return ret;};function mul2(v){var rest=0,a,_7c8,s;for(a=0,_7c8=v.length;a<_7c8;a++){s=2*v[a]+rest;v[a]=s%10;rest=(s/10)>>0;}if(rest){throw new Error("qt7bit: mul2: unexpected overflow!");}};function add1(v){var rest=1,a,_7c9,s;for(a=0,_7c9=v.length;a<_7c9;a++){s=v[a]+rest;v[a]=s%10;rest=(s/10)>>0;}if(rest){throw new Error("qt7bit: add1: unexpected overflow!");}};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.qt7bit"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.qt7bit"]=true);dojo.provide("alp._gmap2_3.qt7bit");}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.cluster.cluster_model"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.cluster.cluster_model"]=true);dojo.provide("alp._gmap2_3.cluster.cluster_model");(function(){var AG=alp._gmap2_3,CN="alp._gmap2_3.ClusterModel",AUO=alp.util.object,AGQ=alp._gmap2_3.qt7bit;dojo.declare(CN,[alp.util.Updater,AG.ClusterManualOOIModel,AG.AbstractClusterModelLoadOOIs],{dbk:{geometry:"geometry",geometry_simplified:"geometry_simplified"},url_default_param:null,constructor:function(cfg){var me=this;me.url_default_param={"proj":"","id":""};if(typeof cfg.proj==="string"){me.url_default_param.proj=cfg.proj;}var _7ca=cfg.base_url||dojo.getObject("alpConfig.base_href")||document.baseURI||"/";if(_7ca.charAt(_7ca.length-1)!=="/"){_7ca+="/";}var _7cb=/_url$/,_7cc=/^http\:\/\//;for(var x in cfg){if(cfg.hasOwnProperty(x)){if(!_7cb.test(x.toLowerCase())){continue;}if(typeof cfg[x]==="string"){cfg[x]=_7cd(cfg[x]);}else{if(typeof cfg[x]==="function"){_7ce(cfg,x);}}}}function _7cd(one){if(!_7cc.test(one)){return (new dojo._Url(_7ca,one)).toString();}return one;};function _7ce(cfg,x){var _7cf=cfg[x];cfg[x]=function(){return _7cd(_7cf.apply(me,arguments));};};alp.util.conlog("cfg:",cfg);me.cfg=dojo.mixin({google_min_zoom_level:0,retryCountMax:5,retryDelayMs:250,tile_sublevels:2,max_requested_urls:1000,v:"1",manualOnly:false,xdomain:null,xdomain_iw_fix_remove_links:true,xdomain_iw_fix:function(html,info){var rx;alp.iw.ensure_css();rx=/(<img\s+([^<>]+\s+)?src\s*=\s*([\'\"](?!http)))([^\'\"]+)\3/gi;html=html.replace(rx,"$1http://www.outdooractive.com$4$3");rx=/(a\s+([^<>]+\s+)?href\s*=\s*([\'\"](?!http)))([^\'\"]+)\3/gi;html=html.replace(rx,"$1http://www.outdooractive.com$4$3");if(me.cfg.xdomain_iw_fix_remove_links){rx=/<\s*\\?\s*a[^<>]+>/gi;html=html.replace(rx,"");}if((html.indexOf(AG.IW_CLASS())<0)&&info&&info.id){html="<div class=\""+AG.IW_CLASS()+"\">"+html+"<input type=\"hidden\" name=\"id-value\" value=\""+alp.util.fun_or_not(info.id)+"\">"+"</div>";}return html;}},cfg);me._tree={};me._loaded={};me._requested_urls=[];me._loadXhrMulti=new alp.util.XhrMulti({xdomain:me.cfg.xdomain});me._iwXhrMulti=new alp.util.XhrMulti({xdomain:me.cfg.xdomain});me._iwGeometryMulti=new alp.util.XhrMulti({xdomain:me.cfg.xdomain});dojo.connect(me._loadXhrMulti,"loading_starts",me,"_cluster_loading_starts");dojo.connect(me._loadXhrMulti,"loading_stops",me,"_cluster_loading_stops");me._changed=alp.util.ratelimit_fun((alp.util.likeIE()&&dojo.isIE<9)?750:-500,me,me._changed);me._alreadyloaded=alp.util.ratelimit_fun(-50,me,me._alreadyloaded);},_static:{},is_cluster_loading:function(){return !!this._cluster_loading;},reset:function(){this._loaded={};if(this._tree){this._tree={};this._requested_urls=[];alp.m(this._loadXhrMulti,"cancel");this._changed(this);}},tour_shortinfo_map_fun:function(){this._tour_shortinfo_map_fun=this._tour_shortinfo_map_fun||(this.cfg&&this.cfg.tour_shortinfo_map_fun)||dojo.getObject("alpConfig.cluster.tour_shortinfo_map_fun");return this._tour_shortinfo_map_fun;},getCat:function(){return this.cfg.cat;},fromPixelToLatLng:function(x,y,z){var ret=AG.fromPixelToLatLng(this.get_gproj(),new google.maps.Point(x,y),z);return ret;},fromLatLngToPixel:function(lat,lng,z){var ret=AG.fromLatLngToPixel(this.get_gproj(),new google.maps.LatLng(lat,lng),z);return ret;},get_gproj:function(){return this._gproj;},set_gproj:function(_7d0){if(!AG.equalProjection(this._gproj,_7d0)){this._gproj=_7d0;this.reset();}},tileint:function(pix,_7d1,_7d2){var ret=Math.floor(pix/this.cfg.tile_size);if(_7d2){ret%=_7d1;}while(ret<0){ret+=_7d1;}return ret;},tilediff:function(_7d3,_7d4,_7d5){var a=(_7d3-_7d4)%_7d5;var b=(_7d4-_7d3)%_7d5;return Math.min(Math.min(Math.abs(a),Math.abs(a+_7d5)),Math.min(Math.abs(b),Math.abs(b+_7d5)));},tile_subtile:function(pix,_7d6){var x=this.tileint(pix.x,_7d6,true);var y=this.tileint(pix.y,_7d6,true);if(this._p_2_sub===undefined){this._init_p_2_sub();}var _7d7=this.tileint(pix.x*this._p_2_sub,this._p_2_sub,true);var _7d8=this.tileint(pix.y*this._p_2_sub,this._p_2_sub,true);return {x:x,y:y,sub_x:_7d7,sub_y:_7d8};},tile_subtile_neighbor:function(x,y,_7d9,_7da,_7db,_7dc,_7dd){if(this._p_2_sub===undefined){this._init_p_2_sub();}return this.tile_subtile(new google.maps.Point((x+(_7d9+_7db)/this._p_2_sub)*this.cfg.tile_size,(y+(_7da+_7dc)/this._p_2_sub)*this.cfg.tile_size),_7dd);},_init_p_2_sub:function(){this._p_2_sub=Math.pow(2,this.cfg.tile_sublevels);},leveloffset:function(zoom){if(typeof this.cfg.level_offset==="number"){return this.cfg.level_offset;}return this.cfg.level_offset[zoom];},setLoadOpts:function(_7de){this._loadOpts=_7de;var _7df=this._last_loadOpts_str;var _7e0=dojo.toJson(_7de);this._last_loadOpts_str=_7e0;if(_7df!==_7e0){this._loadOptsChanged(this);}},updateImpl:function(_7e1,_7e2,_7e3,_7e4,zoom){var _7e5=this._loadOpts||{};var _7e6=Math.pow(2,zoom);if(_7e3<_7e1){_7e3+=_7e6*this.cfg.tile_size;}if(_7e4<0){_7e4=0;}alp.util.conlog("clustermodel.js updateImpl start",_7e1,_7e2,_7e3,_7e4,zoom,_7e5);alp.util.conlog("clustermodel.js updateImpl this:",this);var _7e7=this.tileint(_7e1,_7e6);var _7e8=this.tileint(_7e2,_7e6);var _7e9=this.tileint(_7e3,_7e6);var _7ea=this.tileint(_7e4,_7e6);alp.util.conlog("clustermodel.js updateImpl initial pixels:",_7e1,_7e2,_7e3,_7e4);alp.util.conlog("clustermodel.js updateImpl initial tiles:",_7e7,_7e8,_7e9,_7ea);var _7eb=this.leveloffset(zoom);var _7ec=false;var _7ed;if(_7eb<0){if(!this._isloaded(0,0,0,zoom)){_7ed=this.load_(0,0,0,zoom);_7ec||(_7ec=_7ed);}}else{var z=zoom-_7eb;var bbox=dojo.map([_7e7,_7ea,_7e9,_7e8],function(x){return x>>_7eb;});var _7ee=Math.pow(2,z);for(var x=bbox[0],_7ef=bbox[2];x<=_7ef;x++){var _7f0=x%_7ee;for(var y=bbox[1],_7f1=bbox[3];y<=_7f1;y++){var _7f2=y%_7ee;if(!this._isloaded(_7f0,_7f2,z,zoom)){_7ed=this.load_(_7f0,_7f2,z,zoom);_7ec||(_7ec=_7ed);}}}}if(!_7ec){this._alreadyloaded(this);}},getInfos:function(_7f3,_7f4,_7f5,_7f6,zoom,_7f7){alp.util.conlog("ClusterModel getInfos: arguments (pix_... zoom):",_7f3,_7f4,_7f5,_7f6,zoom);var _7f8=Math.pow(2,zoom);if(_7f5<_7f3){_7f5+=_7f8*this.cfg.tile_size;}if(_7f3<0){_7f3=0;}if(_7f6<0){_7f6=0;}var _7f9=this.tileint(_7f3,_7f8);var _7fa=this.tileint(_7f4,_7f8);var _7fb=this.tileint(_7f5,_7f8);var _7fc=this.tileint(_7f6,_7f8);var ret={tile_sw_x:_7f9,tile_sw_y:_7fa,tile_ne_x:_7fb,tile_ne_y:_7fc};var _7fd=Math.pow(2,zoom);alp.util.conlog("clustermodel.js getInfos tiles, zoom:",_7f9,_7fa,_7fb,_7fc,zoom);var _7fe={};var a=this._tree[zoom];if(a||_7f7){var _7ff=[],_800=(_7f9+_7fb)>>1,_801=(_7fa+_7fc)>>1;if(alp.util.likeIE()&&dojo.isIE<9){for(var x=_7f9,_802=_7fb;x<=_802;x++){for(var y=_7fc,_803=_7fa;y<=_803;y++){_7ff.push([x,y,AGQ.tilexy_2_qt7bitstr({x:x,y:y},zoom)]);}}}else{for(var x=_7f9,_802=_7fb;x<=_802;x++){for(var y=_7fc,_803=_7fa;y<=_803;y++){_7ff.push([x,y,Math.max(Math.abs(x-_800),Math.abs(y-_801))]);}}}_7ff.sort(function(a,b){return a[2]<b[2]?-1:+1;});var _804=new Date();for(var ii=0,n=_7ff.length;ii<n;ii++){var _805=_7ff[ii][0]%_7fd;var _806=_7ff[ii][1]%_7fd;var it=this.getInfosTile(_805,_806,zoom,_7f7);if(it){(_7fe[_805]||(_7fe[_805]={}))[_806]=it;}if(new Date()-_804>125){break;}}if(ii<n){this._trigger_update_later();}}ret.infos=_7fe;alp.util.conlog("clustermodel.js getInfos end",ret.infos);return ret;},_trigger_update_later:function(n_ms){alp.util.asyncHitch("_changed",this,n_ms||500)(this);},getInfosTile:function(x,y,zoom,_807){var me=this,ret=me.fetch_from_tree_(x,y,zoom);if(_807){var arr=this.get_manual_oois_in_tile(x,y,zoom);if(arr.length){ret=(ret&&AUO.copy(ret))||{};dojo.forEach(arr,function(obj){var tile=alp.data.QuadTree.qt2ijz(obj.qt,zoom,me.cfg.tile_sublevels),d=ret[tile.subi]||(ret[tile.subi]={}),e=d[tile.subj]||(d[tile.subj]={}),t=obj.t||AG.cluster.MANUALOOI_CATID,f=e[t]||(e[t]=[]),xy=alp.data.ooi_geometry(obj);f.push({c:1,lat:xy.lat,lng:xy.lng,qt:obj.qt,t:t,t_img:obj.t_img,title:obj.title||"",id:obj.id,ismanualooi:true});});}}return ret;},fetch_from_tree_:function(x,y,zoom){var me=this,c=alp.util.get_property(me._tree,[zoom,x,y]);if(!c){return false;}var _808=zoom+me.cfg.tile_sublevels,subx,d,suby,e,t,arr,i,some,qt;loop:for(var subx in c){if(c.hasOwnProperty(subx)){d=c[subx];for(var suby in d){if(d.hasOwnProperty(suby)){e=d[suby];for(var t in e){if(e.hasOwnProperty(t)){arr=e[t];for(var i=arr.length;i--;){some=arr[i];qt=some&&some.qt;if(qt){if(qt.length!==_808){console.error("#5403 Wrong QT string length (found:"+qt.length+", expected:"+_808+") for z:",zoom,", x:",x,", y:",y,", subx:",subx,", suby:",suby,", t:",t,", arr:",arr,", i:",i,", arr[i]:",some);}break loop;}}}}}}}}return c;},_load_url_template:function(){return this.cfg.cluster_url;},_safe_substitute:function(_809,map){return dojo.string.substitute(_809,map,function(s){return (dojo.isString(s)||isFinite(s)||(dojo.isObject(s)&&s&&(s.length>0)))?s:"";});},_load_url:function(bk_x,bk_y,bk_z,zoom,_80a){return this._safe_substitute(this._load_url_template(),dojo.mixin({},this.url_default_param,{x:bk_x,y:bk_y,z:bk_z,l:zoom},this._loadOpts));},load_:function(bk_x,bk_y,bk_z,zoom,_80b){var _80c=_80c||{};if(_80b===undefined){_80b=this.cfg.retryCountMax;}alp.util.conlog("clustermodel.js loading bk_x bk_y bk_z zoom loadOpts:",bk_x,bk_y,bk_z,zoom,_80c);if(this._isloaded(bk_x,bk_y,bk_z,zoom)){return false;}var url=this._load_url.apply(this,arguments);if(dojo.indexOf(this._requested_urls,url,undefined,true)>-1){return false;}this._requested_urls.push(url);var a=this._requested_urls.length-this.cfg.max_requested_urls;if(a>0){this._requested_urls.splice(0,a);}this._loadXhrMulti.get({url:url,handleAs:"json",load:this._receiveGen(bk_x,bk_y,bk_z,zoom),error:this._retryGen(bk_x,bk_y,bk_z,zoom,_80b)});return true;},_isloaded:function(bk_x,bk_y,bk_z,zoom){if(this.cfg.manualOnly){return true;}var a=this._loaded[bk_z];a=a&&a[bk_x];a=a&&a[bk_y];a=a&&a[zoom];return a!=null||((bk_z>this.cfg.google_min_zoom_level)&&this._isloaded(bk_x>>1,bk_y>>1,bk_z-1,zoom));},_markasloaded:function(bk_x,bk_y,bk_z,zoom){var a=(this._loaded[bk_z]=this._loaded[bk_z]||{});a=a[bk_x]||(a[bk_x]={});a=a[bk_y]||(a[bk_y]={});a[zoom]=true;},_receiveGen:function(bk_x,bk_y,bk_z,zoom){return dojo.hitch(this,function(_80d,_80e){alp.util.conlog("clustermodel.js _receive(z:"+zoom+") start: response, ioArgs:",_80d,_80e);if(_80d.param){if(_80d.param.x!=null){bk_x=_80d.param.x;}if(_80d.param.y!=null){bk_y=_80d.param.y;}if(_80d.param.z!=null){bk_z=_80d.param.z;}}var _80f=this._isloaded(bk_x,bk_y,bk_z,zoom);var z;for(z in _80d.data){if(_80d.data.hasOwnProperty(z)){var r_z=_80d.data[z];alp.util.conlog("clustermodel.js received z, zoom, ==, === :",z,zoom,z==zoom,z===zoom);for(var x in r_z){if(r_z.hasOwnProperty(x)){var r_x=r_z[x];for(var y in r_x){if(r_x.hasOwnProperty(y)){var r_y=r_x[y];for(var subx in r_y){if(r_y.hasOwnProperty(subx)){var _810=r_y[subx];for(var suby in _810){if(_810.hasOwnProperty(suby)){var _811=_810[suby];if(_811&&(_811.length>0)){var a,b,c,d,e,f,i,_812,_813;a=this._tree||(this._tree={});b=a[z]||(a[z]={});c=b[x]||(b[x]={});d=c[y]||(c[y]={});e=d[subx]||(d[subx]={});f=e[suby]||(e[suby]={});for(i=_811.length;i--;){_813=_811[i];_812=""+_813.t;f[_812]=[];}for(i=_811.length;i--;){_813=_811[i];_812=""+_813.t;f[_812]||(f[_812]=[]);f[_812].push(_813);}}}}}}}}}}}}for(z in _80d.data){if(_80d.data.hasOwnProperty(z)){this._markasloaded(bk_x,bk_y,bk_z,z);}}this._changed(this);alp.util.conlog("clustermodel.js _receive end");});},_retryGen:function(bk_x,bk_y,bk_z,zoom,_814){return dojo.hitch(this,function(_815,_816){var _817=this._loadOpts||{};alp.util.conlog("clustermodel.js _retry(z:"+zoom+") start: loadOpts, retryCount, response, ioArgs:",_817,_814,_815,_816);if(_814<1){return;}window.setTimeout(dojo.hitch(this,function(){this.load_(bk_x,bk_y,bk_z,zoom,_814-1);}),this.cfg.retryDelayMs);});},_ooi_iw_url:function(info){var o=dojo.mixin({},this.url_default_param,info);o.id=alp.util.fun_or_not(o.id);return this._safe_substitute(this.cfg.ooi_iw_url,o);},get_ooi_iw:function(info,_818){var me=this,id=alp.util.fun_or_not(info.id);if(info.ismanualooi){_818(this._iw_manual_ooi_html(id));return;}me._iwXhrMulti.cancel();if(alp.data.ooiid.is_external(id)){(new alp.data.SingleOOI(id,{proj:me.url_default_param.proj})).load(function(ooi){_819(dojo.mixin({},info,{id:ooi.data.id}));});}else{_819(info);}function _819(info){me._iwXhrMulti.get({url:me._ooi_iw_url(info),handleAs:"text",load:function(_81a,_81b){if(typeof _81a==="object"){_81a=_81a.html;}var _81c=me.tour_shortinfo_map_fun();if(_81c){_81a=_81c(_81a);}if(_81b&&_81b.jsonp&&me.cfg.xdomain_iw_fix){_81a=me.cfg.xdomain_iw_fix.call(me,_81a,info);}_818(_81a);}});};},_ooi_geometry_url:function(info){return this._safe_substitute(this.cfg.ooi_geometry_url,dojo.mixin({},this.url_default_param,{idlist:alp.util.fun_or_not(info.id)||""}));},get_ooi_geometry:function(info,_81d){var db=alp.db.common(),s;this._iwGeometryMulti.cancel();s=info.id+"."+this.dbk[info&&info.simplified?"geometry_simplified":"geometry"];if(db.has(s)){_81d(dojo.mixin(db.getset(s),{id:info.id}));return;}this._iwGeometryMulti.get({url:this._ooi_geometry_url(info),handleAs:"json",load:function(_81e,_81f){var a=_81e&&_81e[info.id+""];if(!a){if(djConfig.debug){console.error("ClusterModel.get_ooi_geometry... Could not find id \""+info.id+"\" in the received json:",_81e);}return;}_81d(a);}});},_idlist_str:function(_820){return dojo.map(_820.idlist,alp.util.fun_or_not).join(",");},_qttypelist_str:function(_821){var _822=_821.qttypelist,arr=[];for(var qt in _822){if(_822.hasOwnProperty(qt)){var s="",_823=_822[qt];for(var t in _823){if(_823.hasOwnProperty(t)){if(!s){s+=qt;}s+="_"+t;}}if(s){arr.push(s);}}}return arr.join(",")||"none";},_cluster_iw_url:function(_824){return this._safe_substitute(this.cfg.cluster_iw_url,dojo.mixin({},this.url_default_param,{idlist:this._idlist_str(_824),qttypelist:this._qttypelist_str(_824)}));},get_cluster_iw:function(_825,_826){var me=this,db=alp.db.common(),_827=[],_828=_825.qttypelist,_829=_825.idlist,_82a=_825.manual_qtidlist,_82b=!_829.length&&!dojun.keys(_828).length;dojo.forEach(_82a,_82c);_825=alp.nat(_825,"manual_qtidlist");if(_82b){me._receive_cluster_iw_gen(_827,{},_826)();return;}me._iwXhrMulti.cancel();me._iwXhrMulti.get({url:me._cluster_iw_url(_825),handleAs:"json",load:me._receive_cluster_iw_gen(_827,_825,_826)});function _82c(qtid){var qt=qtid[0],id=alp.util.fun_or_not(qtid[1]),data=id&&db.getset(id+alp.data.ooi_db_suffix),ooi=data&&alp.data.single_ooi(data),x=ooi&&ooi.data;if(x){_827.push({id:x.id,qt:qt,t:x.t||AG.cluster.MANUALOOI_CATID,ismanualooi:true,html:me._iw_manual_ooi_html(id)});}};},_iw_manual_ooi_html:function(id){var db=alp.db.common(),data=id&&db.getset(id+alp.data.ooi_db_suffix),ooi=data&&alp.data.single_ooi(data),html=alp.iw.html(ooi);alp.iw.ensure_css();return html;},_receive_cluster_iw_gen:function(_82d,_82e,_82f){var me=this;return function(_830,_831){_830||(_830=[]);var _832=_82e.idlist,_833=_82e.qttypelist,_834=dojo.filter(_830,_835);_836(_834);_834=dojo.map(_834,AUO.copy,dojo);var _837=me.tour_shortinfo_map_fun();if(_837){dojo.forEach(_834,function(o){o.html=_837(o.html);});}if(me.cfg.xdomain_iw_fix&&_831&&_831.jsonp){dojo.forEach(_834,function(o){o.html=me.cfg.xdomain_iw_fix(o.html);});}_82f((_82d||[]).concat(_834),_82e);function _835(item){if(item.ismanualooi){return true;}if(typeof item.qt!=="string"){return false;}if(-1<dojo.indexOf(_832,item.id)){return true;}if(alp.util.get_property(_833,[item.qt,item.t])){return true;}for(var qt in _833){if(_833.hasOwnProperty(qt)){if(item.qt.substring(0,qt.length)===qt){if(_833[qt][item.t]){return true;}}}}return false;};function _836(arr){var _838={};for(var a=0;a<arr.length;){var id=arr[a].id;if(_838[id]){arr.splice(a,1);continue;}_838[id]=1;a++;}};};},changed:function(_839){},alreadyloaded:function(_83a){},loadOptsChanged:function(_83b){},cluster_loading_starts:function(){this._cluster_loading=true;},cluster_loading_stops:function(){this._cluster_loading=false;},_changed:alp.util.asyncHitch("changed"),_alreadyloaded:alp.util.asyncHitch("alreadyloaded"),_loadOptsChanged:alp.util.asyncHitch("loadOptsChanged"),_cluster_loading_starts:alp.util.asyncHitch("cluster_loading_starts"),_cluster_loading_stops:alp.util.asyncHitch("cluster_loading_stops")});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.data.sortedarraystate"]){typeof dojo==="undefined"||(dojo._hasResource["alp.data.sortedarraystate"]=true);dojo.provide("alp.data.sortedarraystate");(function(){var CN="alp.data.SortedArrayState",AUA=alp.util.array;dojo.declare(CN,alp.data.State,{is_same:AUA.equal});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.point"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.point"]=true);dojo.provide("alp._gmap2_3.point");(function(){var AGP=alp._gmap2_3.point,gm=google.maps;AGP.add=_83c;function _83c(one,_83d){return new gm.Point(one.x+_83d.x,one.y+_83d.y);};AGP.sub=_83e;function _83e(one,_83f){return new gm.Point(one.x-_83f.x,one.y-_83f.y);};AGP.alpha=_840;function _840(one,_841){return new gm.Point(_841*one.x,_841*one.y);};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.data.minmaxstate"]){typeof dojo==="undefined"||(dojo._hasResource["alp.data.minmaxstate"]=true);dojo.provide("alp.data.minmaxstate");(function(){var _842=function(v,_843){if(!(alp.util.isFiniteNumber(v)||v===-Infinity||v===+Infinity)){v=_843||0;}return Math.max(this.min,Math.min(this.max,v));};dojo.declare("alp.data.MinMaxState",alp.data.State,{constrain_def:_842,constrain_undef:_842,min:-Infinity,max:+Infinity,setToMin:function(){this.set(this.min);},setToMax:function(){this.set(this.max);},getProp:function(){var v=(this.get()-this.min)/(this.max-this.min);return alp.util.isFiniteNumber(v)?v:0.5;},setProp:function(p){p=Math.max(0,Math.min(1,p));if(p===0){return this.set(this.min);}if(p===1){return this.set(this.max);}if(this.min===this.max){return this.set(this.min);}var v=this.min+p*(this.max-this.min);return this.set(alp.util.isFiniteNumber(v)?v:0);}});alp.data.MinMaxState.constrain_min_max_impl=_842;})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.anim._core"]){typeof dojo==="undefined"||(dojo._hasResource["alp.anim._core"]=true);dojo.provide("alp.anim._core");(function(){var CN="alp.Anim";dojo.declare(CN,null,{st:null,min:0,max:1,init_value:0,speed:null,distorsion:function(x){return x;},interval_ms:79,constructor:function(cfg){dojo.mixin(this,cfg);this.st=this.st||new alp.data.MinMaxState(alp.at(this,["min","max","init_value"]));this.speed=this.speed||(this.st.max-this.st.min);if(!(this.speed>0)){throw new Error(CN+".constructor: speed must be a non-negative number!");}this._queue=[];},cancel:_844,nextAction:_845,nextTarget:_846,currentTarget:_847,nextTargetMax:function(){return this.nextTarget(this.st.max);},nextTargetMin:function(){return this.nextTarget(this.st.min);},isCurrentTargetMax:function(){return this.st.is_same(this.currentTarget(),this.st.max);},isCurrentTargetMin:function(){return this.st.is_same(this.currentTarget(),this.st.min);}});function _844(){this._queue.splice(0);_848(this);return this;};function _845(_849){this._queue.push(_849);_848(this);return this;};function _846(_84a){this._queue.push(_84a);_848(this);return this;};function _847(){var q=this._queue,x=q[0];if(q.length&&typeof x==="number"){return Math.max(this.st.min,Math.min(this.st.max,x));}};function _848(me){function _84b(){me._startDate=new Date();me._startValue=me.st.get();};function _84c(){me._startDate=me._startValue=null;};if(me._startDate==null){_84b();}var q=me._queue,_84d=Math.max(0,new Date()-me._startDate);while(q.length){var todo=q[0];if(typeof todo==="function"){if(dojo.config.debugAtAllCosts){todo();}else{try{todo();}catch(e){console.error("_Anim_check_queue caught an error \""+e+"\" while executing todo: "+todo);}}}else{var min=me.st.min,max=me.st.max,_84e=me.currentTarget();if(!me.st.is(_84e)){var _84f=Math.abs(max-min),d=Math.abs(_84f*me.distorsion(Math.min(1,Math.max(0,_84d/1000*me.speed/_84f))));if(_84e>me._startValue){me.st.set(Math.min(_84e,me._startValue+d));}else{me.st.set(Math.max(_84e,me._startValue-d));}if(!me.st.is(_84e)){alp.util.asyncHitch(_848,null,me.interval_ms)(me);return;}}}q.shift();_84b();}_84c();};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.anim"]){typeof dojo==="undefined"||(dojo._hasResource["alp.anim"]=true);dojo.provide("alp.anim");}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.math.circle_spread"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.math.circle_spread"]=true);dojo.provide("alp.util.math.circle_spread");(function(){var _850=1e-10,AUM=alp.util.math;AUM.circle_spread=alp.util.cache_transform(_851);AUM.circle_spread.default_cfg=function(){return {min_radius:25,min_dist:25,first_angle:function(_852){return Math.PI/2*(1-_852);}};};function _851(n,cfg){cfg=dojo.delegate(AUM.circle_spread.default_cfg(),cfg);var _853=cfg.min_radius,_854=cfg.min_radius+cfg.min_dist*(n-1),_855=Math.max(0,_856(_853)),_857;if(_855>0){_857=_853;}else{_857=alp.util.dichotomy(_855,_853,_854,_856,{n_iter_max:100});}function _856(_858){return _859(_858,n,cfg);};while(_856(_857)<0){_857+=cfg.min_dist/3;}var ret=[],_85a=0,_85b=_85c(_857,n,cfg),_85d=_85b-1,_85e=_857;while(_85a<n){var p=_85f(_85e,_85a,n,cfg),_860=2*Math.PI/p;var _861=cfg.first_angle(_85d),arr=[];for(var i=0;i<p;i++){var pos={r:_85e,a:_861-_860*i};pos.x=pos.r*Math.cos(pos.a);pos.y=pos.r*Math.sin(pos.a);pos.x=Math.round(pos.x/_850)*_850;pos.y=Math.round(pos.y/_850)*_850;arr.push(pos);}arr.reverse();ret=ret.concat(arr);_85a+=p;_85e-=cfg.min_dist;_85d--;}if(_85a!==n||_85e<cfg.min_radius-cfg.min_dist){throw new Error("alp.util.math.circle_spread() has a bug! n:"+n+", n_placed:"+_85a,", radius:"+_85e);}ret.reverse();ret.cfg=ret;return ret;};function _859(_862,n,cfg){var _863=_85c(_862,n,cfg),_864=_862-(_863-1)*cfg.min_dist,_865=_864<(cfg.min_radius-_850)?-Infinity:_862;return _865;};function _85c(_866,n,cfg){var _867=0,_868=0,r=_866;while(_867<n){var dn=_85f(r,_867,n,cfg);_867+=dn;_868++;r-=cfg.min_dist;if(r<0||_867<0||dn<0){return +Infinity;}}return _868;};function _85f(r,_869,n,cfg){var _86a=2*Math.asin(cfg.min_dist/2/r),_86b=Math.floor(2*Math.PI/_86a);return Math.min(n-_869,_86b);};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.math.optim_permute"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.math.optim_permute"]=true);dojo.provide("alp.util.math.optim_permute");(function(){var AUM=alp.util.math,AUA=alp.util.array,_86c="optim_worst";AUM.optim_permute=_86d;function _86d(_86e,cfg){cfg=dojo.delegate({way:_86c},cfg);var n=_86e.length,_86f=new Array(n);if(cfg.way===_86c){_86f=AUA.sort_order(dojun.map(_86e,"costvec -> -Math.max.apply( Math, costvec )")).order;}else{for(var i=n;i--;){_86f[i]=i;}}var _870=_871(_86e,_86f);var _872=alp.util.min_ind(_870,".cost");return _870[_872].path;};function _871(_873,_874){var n=_874.length,prop=new Array(n);for(var i=0;i<n;++i){var ind=_874[i],_875=_873[ind];for(var j=0;j<n;++j){if(!prop[j]){var _876={};_876[j]=true;prop[j]={cost:_875[j],path:[j],visited:_876};continue;}var _876=prop[j].visited,_877=alp.util.min_ind(_875,function(v,ind){return _876[ind]?+Infinity:v;});prop[j].cost+=_875[_877];prop[j].path.push(_877);prop[j].visited[_877]=true;}}for(var j=n;j--;){prop[j].path=AUA.unpermute(prop[j].path,_874);}for(var j=n;j--;){prop[j].path.cost=prop[j].cost;}return prop;};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.math.circle_spread_data"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.math.circle_spread_data"]=true);dojo.provide("alp.util.math.circle_spread_data");(function(){var AUM=alp.util.math,AUA=alp.util.array,_878=2*Math.PI,_879=5,_87a=_878/_879,_87b=1e-10;AUM.circle_spread_data=_87c;AUM.circle_spread_data.default_cfg=AUM.circle_spread.default_cfg;function _87c(_87d,cfg){cfg=dojo.delegate(AUM.circle_spread_data.default_cfg(),cfg);if(_87d.length<1){return [];}var _87e;if(_87d.length>_879){_87e=AUM.circle_spread(_87d.length,cfg);}else{_87e=_87f(_87d,cfg);}_87e=_880(_87e,cfg);return _881(_87d,_87e,cfg);};function _87f(_882,cfg){if(_882.length>_879){throw new Error("alp.util.math.circle_spread_data(): _spread_data_on_one_circle() received too many points!");}var n=_882.length,_883=dojun.map(_882,function(xy){return (Math.atan2(xy.y,xy.x)+_878)%_878;});_883.sort();var _884=new Array(n);for(var prev=0,a=n;a--;){_884[a]=(_883[prev]-_883[a]+_878)%_878;prev=a;}var _885=[].concat(_884),_886,_887={};while(_87a-_87b>_885[_886=alp.util.min_ind(_885)]){_885[_886]=_87a;_887[_886]=true;_888(_885,_887);}var ind=alp.util.min_ind(_884),_889=new Array(n);_889[ind]=(alp.util.angle_wmean([_883[ind],_883[(ind+1)%n]])-(_885[ind]/2)+_878)%_878;for(var i=n-1;i--;){var _88a=ind;ind=(ind+1)%n;_889[ind]=(_889[_88a]+_885[ind])%_878;}var ret=new Array(n);for(var i=n;i--;){var o={r:cfg.min_radius,a:_889[i]};o.x=o.r*Math.cos(o.a);o.y=o.r*Math.sin(o.a);ret[i]=o;}return ret;};function _880(_88b,cfg){var _88c={},rArr=[];for(var i=_88b.length;i--;){var _88d=_88b[i],r=_88d.r;r in _88c||(rArr.push(r),_88c[r]=[]);_88c[r].push(_88d);}rArr.sort();var n=rArr.length,_88e=new Array(n),_88f=new Array(n);for(var i=0;i<n;i++){var _890=i>0?(_88f[i-1]+cfg.min_dist):cfg.min_radius,r=rArr[i];var _891=Math.max(_890/r,_892(r,_88c[r],cfg.min_dist));_88e[i]=_891;_88f[i]=_891*r;}var _893=_88b.length,_894=new Array(_893),i=0;for(var j=n;j--;){var _895=_88f[j],_891=_88e[j],_896=_88c[rArr[j]];for(var k=_896.length;k--;){var pt=_896[k];_894[i++]={a:pt.a,r:_895,x:pt.x*_891,y:pt.y*_891};}}if(i!==_893){throw new Error("circle_spread_data found itself being insane!");}return _894;};function _881(_897,_898,cfg){var n=_898.length,_899=new Array(n);for(var i=n;i--;){var goal=_897[i],_89a=_899[i]=new Array(n),_89b=+Infinity;for(var j=n;j--;){var _89c=_898[j],dx=_89c.x-goal.x,dy=_89c.y-goal.y,cost=dx*dx+dy*dy;_89a[j]=cost;_89b=Math.min(cost,_89b);}for(var j=n;j--;){_89a[j]-=_89b;}}var _89d=AUM.optim_permute(_899);return AUA.permute(_898,_89d);};function _888(da,_89e){var sum=0,_89f=0;for(var i=da.length;i--;){var a=da[i],_8a0=_89e[i];sum+=a;if(!_8a0){_89f+=a;}}if(_878-_87b<sum&&sum<_878+_87b){return;}if(!(_89f>0)){return;}var _8a1=sum-_878,_8a2=(_89f-_8a1)/_89f;if(!(_8a2>0)){throw new Error("alp.util.max.circle_spread_data(): _scale_non_fixed_delta_angles() found a bug (scaling_factor)!");}for(var i=da.length;i--;){if(!_89e[i]){da[i]=_8a2*da[i];}}};function _892(r,_8a3,_8a4){_8a3.sort(function(pt0,pt1){return pt0.a<pt1.a?-1:+1;});var n=_8a3.length,_8a5=+Infinity;for(var i=n;i--;){var pt_i=_8a3[i],pt_j=_8a3[(i+1)%n],dx=pt_i.x-pt_j.x,dy=pt_i.y-pt_j.y;_8a5=Math.min(_8a5,dx*dx+dy*dy);}var _8a6=Math.sqrt(_8a5);return _8a4/_8a6;};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.cluster.abstract_cv_on_cluster_mouseover"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.cluster.abstract_cv_on_cluster_mouseover"]=true);dojo.provide("alp._gmap2_3.cluster.abstract_cv_on_cluster_mouseover");(function(){var AG=alp._gmap2_3,AGP=AG.point,AGQ=AG.qt7bit,AUM=alp.util.math,CN="alp._gmap2_3.AbstractClusterViewOnClusterMouseover",GMAP="_alpGmap",_8a7="_alpInfoArray",ANIM="_alpMouseoverAnim",_8a8="_alpMouseoverSingleMarkerArr",_8a9="_alpMouseoverMelArr",SM_H="_alpH",SM_O="_alpOrigLatLng",SM_T="_alpTargetLatLng",_8aa={speed:7},_8ab=AUM.circle_spread_data.default_cfg();dojo.declare(CN,null,{gmapSt:null,clusterPopup:null,dynamicTooltip:false,clusterPopupMinDist:_8ab.min_dist,clusterPopupMinRadius:_8ab.min_radius,constructor:function(_8ac){if(this.clusterPopup==null){this.clusterPopup=!!alp.at(_8ac,"getDataPointArray");}},on_cluster_mouseover:_8ad});function _8ad(_8ae){if(!this.clusterPopup){return;}var me=this,gmap=me.gmapSt.get(),m=me.model,z=alp.m(_8ae[GMAP],"getZoom"),ocmc=me._ocmc||(me._ocmc=[]),_8af=alp.m(_8ae[ANIM],"isCurrentTargetMax");while(ocmc.length){var _8b0=ocmc.pop();if(_8b0.marker!==_8ae){_8b0();}}if(_8af){return;}if(m.getDataPointArray&&z!=null&&!alp.m(_8ae,"_alpIsClosed",z)){var anim=_8b1(me,_8ae);anim.cancel().nextTargetMax();_8b2.marker=_8ae;ocmc.push(_8b2);if(gmap){AG.event("addListener")(gmap,"zoom_changed",function(){if(!(gmap===_8ae[GMAP]&&z===gmap.getZoom())){_8b3(_8ae);}});}}function _8b2(){anim.cancel().nextTargetMin();};};function _8b3(_8b4){delete _8b4[ANIM];var arr=_8b4[_8a8];delete _8b4[_8a8];while(arr&&arr.length){var _8b5=arr.pop();dojo.disconnect(_8b5[SM_H]);_8b5.setMap(null);}var arr=_8b4[_8a9];delete _8b4[_8a9];while(arr&&arr.length){AG.event("removeListener")(arr.pop());}};function _8b1(me,_8b6){if(!_8b6[ANIM]){var anim=_8b6[ANIM]=new alp.Anim(dojo.delegate(_8aa,me.clusterPopup));var _8b7=_8b6[_8a7],_8b8=[],_8b9=[];for(var i=_8b7.length;i--;){var x=_8b7[i];if(x.ismanualooi){_8b9.push(x);continue;}var arr=x.idlist;if(!arr){_8b8=null;break;}_8b8=_8b8.concat(dojo.map(arr,alp.util.fun_or_not));}if((_8b8&&_8b8.length)||(_8b9&&_8b9.length)){if(me.dynamicTooltip){me.model.load_OOIs(_8b8);}me.model.getDataPointArray(_8b8).addCallback(null,_8ba,me,_8b6,_8b9);}}return _8b6[ANIM];};function _8ba(me,_8bb,_8bc,_8bd){var gmap=me.gmapSt.get();if(!gmap){return;}var arr=_8bd.concat(_8bc),n=arr.length,_8be=_8bb.getPosition(),_8bf=AG.fromLatLngToContainerPixel(gmap,_8be),gm=google.maps,_8c0=(dojo.map(_8bd,function(dp){return AG.qt7bit.qt7bit_2_latlng(dp.geom);}).concat(dojo.map(_8bc,function(info){return new gm.LatLng(info.lat,info.lng);}))),zoom=gmap.getZoom(),_8c1=dojo.map(_8c0,function(_8c2){var _8c3=AG.fromLatLngToContainerPixel(gmap,_8c2);return new google.maps.Point(_8c3.x-_8bf.x,_8c3.y-_8bf.y);}),_8c4=AUM.circle_spread_data(_8c1,{min_dist:me.clusterPopupMinDist,min_radius:me.clusterPopupMinRadius}),cvq=me._mapqueue,_8c5=(dojo.map(_8bd,_8c6).concat(dojo.map(_8bc,_8c7))),_8c8=[_8da(gmap,_8bb,_8c4)];_8bb[_8a8]=_8c5;_8bb[_8a9]=_8c8;function _8c6(dp,ind){var _8c9=_8ca(ind),lat=_8c9.lat(),lng=_8c9.lng(),info={c:1,id:dp[AGQ.ID],lat:lat,lng:lng,t:dp[AGQ.CATID]};return _8c7(info,ind);};function _8c7(info,ind){var _8cb={c:1,info_array:[info],lat:info.lat,lng:info.lng};return _8cc(_8cb,ind);};function _8cc(_8cd,ind){var _8ce=_8ca(ind),x=_8bf.x+_8c4[ind].x,y=_8bf.y+_8c4[ind].y,pix=new google.maps.Point(x,y),_8cf=AG.fromContainerPixelToLatLng(gmap,pix),_8d0=cvq.group_2_marker(_8cd,{middle_anchor:true});_8d0[SM_O]=_8ce;_8d0[SM_T]=_8cf;var _8d1=_8b1(me,_8bb).st;_8d0[SM_H]=_8d1.changed_cb_init(null,_8d2,gmap,_8d0,_8d1);return _8d0;};function _8ca(ind){return _8be;};};function _8d2(gmap,_8d3,_8d4){var _8d5=_8d4.get();if(!(_8d5>_8d4.min)){_8d3.setMap(null);return;}if(gmap!==_8d3.getMap()){_8d3.setMap(gmap);}var gm=google.maps,_8d6=AG.fromLatLngToContainerPixel(gmap,_8d3[SM_O]),_8d7=AG.fromLatLngToContainerPixel(gmap,_8d3[SM_T]),_8d8=AGP.add(_8d6,AGP.alpha(AGP.sub(_8d7,_8d6),_8d5)),_8d9=AG.fromContainerPixelToLatLng(gmap,_8d8);_8d3.setPosition(_8d9);};function _8da(gmap,_8db,_8dc){var _8dd=25+Math.max.apply(Math,dojun.map(_8dc,".r")),_8de=_8dd*_8dd,h;return h=AG.event("addListener")(gmap,"mousemove",_8df);function _8df(_8e0){if(!_8db[ANIM]){AG.event("removeListener")(h);return;}var _8e1=_8db.getPosition(),_8e2=AG.fromLatLngToContainerPixel(gmap,_8e1);if(AG.iwOpen.isLastVisible()){var _8e3=AG.iwOpen.lastLatLng(),_8e4=AG.fromLatLngToContainerPixel(gmap,_8e3),_8e5=AGP.sub(_8e4,_8e2),_8e6=_8e5.x*_8e5.x+_8e5.y*_8e5.y;if(_8e6<=_8de){return;}}var _8e7=AG.fromLatLngToContainerPixel(gmap,_8e0.latLng),_8e8=AGP.sub(_8e7,_8e2),_8e9=_8e8.x*_8e8.x+_8e8.y*_8e8.y;if(_8e9>_8de){_8db[ANIM].cancel().nextTargetMin();}};};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.cluster.const"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.cluster.const"]=true);dojo.provide("alp._gmap2_3.cluster.const");(function(){var AGC=alp._gmap2_3.cluster;AGC.DEFAULT_noZoomInCountMax=function(){return 10;};AGC.DEFAULT_zoomInMaxLevel=function(){return 14;};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.cluster.marker_opts"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.cluster.marker_opts"]=true);dojo.provide("alp._gmap2_3.cluster.marker_opts");(function(){var AG=alp._gmap2_3,AGC=AG.cluster;AGC.marker_opts_arr=function(cfg){cfg=cfg||alp.cfg.cluster_markers();var ret=dojo.map(cfg,function(o){o=dojo.delegate({xy:o.size,anchor_xy:o.anchor},o);o.anchor_xy=o.anchor_xy||[o.xy[0]>>1,o.xy[1]>>1];o.label_offset_y=o.label_offset_y||0;o=alp.cfg._ooi_normalize_xy(o);return {marker_opts:{icon:AG.markerImage_gen(o.url,o.xy,null,o.anchor_xy),shadow:o.shadow_url&&AG.markerImage_gen(o.shadow_url,o.shadow_xy,null,o.anchor_xy),shape:o.shape},label_offset_y:o.label_offset_y};});return (AGC.markers_opts_arr=function(){return ret;})();};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.label"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.label"]=true);dojo.provide("alp._gmap2_3.label");(function(){var AG=alp._gmap2_3,gm=google.maps,_8ea=AG.V2()&&gm.Overlay,_8eb=AG.V3()&&gm.OverlayView;AG.bind_label_to_marker=function(_8ec,_8ed){if(_8ed._alpLabel===_8ec){return;}_8ed._alpLabel=_8ec;var eh=_8ec._alpMarkerEh=_8ec._alpMarkerEh||new alp.util.Eh();eh.eh_clear();alp.m(_8ec,"unbind","position");if(!_8ed){return;}var _8ee=function(){var map=(_8ed.getVisible()&&_8ed.getMap())||null;if(map!==_8ec.getMap()){_8ec.setMap(map);}};_8ee();var _8ef=alp.m(_8ed,"alpMapSt_");if(_8ef){eh.eh_push(_8ef.changed_cb(_8ee));}dojo.forEach(["setVisible","hide","show"],function(s){if(_8ed[s]){eh.eh_push(dojo.connect(_8ed,s,_8ee));}});eh.eh_push(setInterval(_8ee,1789+Math.random()*100>>0),function(h){clearInterval(h);});var _8f0=AG.event("removeListener");if(AG.V3()){eh.eh_push(AG.event("addListener")(_8ed,"map_changed",_8f1),_8f0);eh.eh_push(AG.event("addListener")(_8ed,"visible_changed",_8f1),_8f0);alp.m(_8ec,"bindTo","position",_8ed,"position");}function _8f1(){setTimeout(_8ee,150);};if(AG.V2()){eh.eh_push(AG.event("addListener")(_8ed,"visibilitychanged",_8ee),_8f0);if(_8ed.draggable()){eh.eh_push(AG.event("addListener")(_8ed,"drag",function(_8f2){_8ec.setPosition(_8f2.latLng);}),_8f0);eh.eh_push(AG.event("addListener")(_8ed,"dragend",function(_8f3){_8ec.setPosition(_8f3.latLng);}),_8f0);}var _8f4=function(){_8ec.setPosition(_8ed.getPosition());};eh.eh_push(AG.event("addListener")(_8ed,"position_changed",_8f4),_8f0);_8f4();}};AG.unbind_label_from_marker=function(_8f5){var _8f6=_8f5._alpLabel;if(_8f6){AG.bind_label_to_marker(_8f6);}return _8f6;};var _8f7;if(_8eb){AG.Label=function(opts){opts=_8f7(opts);var me=this;me.setValues(opts);var div=me.div_=dojo.create("div",opts.label_class&&{className:opts.label_class}),_8f8=me.textdiv_=dojo.create("div",{style:opts.label_style,className:opts.label_class&&(opts.label_class+"_text")},div);div.style.cssText="position: absolute; display: none";me.eh_=new alp.util.Eh();};AG.Label.prototype=new _8eb();AG.Label.prototype.setText=function(text){this.set("label_text",text);};AG.Label.prototype.getText=function(){return this.get("label_text").toString();};AG.Label.prototype.onAdd=function(){var me=this,pane=me.getPanes().floatShadow;if(alp.util.likeIE()&&dojo.isIE<9){me.div_.style.display="";}if(me.div_.parentNode!==pane){pane.appendChild(me.div_);}dojo.forEach(["position_changed","text_changed"],function(_8f9){me.eh_.eh_push(AG.event("addListener")(me,_8f9,function(){me.draw();}),AG.event("removeListener"));});};AG.Label.prototype.onRemove=function(){var me=this;if(alp.util.likeIE()&&dojo.isIE<9){me.div_.style.display="none";}else{me.div_.parentNode.removeChild(me.div_);}me.eh_.eh_clear();};AG.Label.prototype.draw=function(){var me=this,map=me.getMap(),_8fa=me.getProjection(),_8fb=alp.m(_8fa,"fromLatLngToDivPixel",me.get("position"))||alp.m(AG,"fromLatLngToDivPixel",map,me.get("position")),div=this.div_;if(div&&_8fb){div.style.left=Math.round(_8fb.x)+"px";div.style.top=Math.round(_8fb.y)+"px";div.style.display="block";}me.textdiv_.innerHTML=me.get("label_text").toString();};}if(_8ea){AG.Label=function(opts){var me=this;me.opts_=_8f7(opts);me.mapSt_=new alp.data.State();me.positionSt_=new alp.data.State();me.textSt_=new alp.data.State({init_value:(opts&&opts.label_text)||""});me.mapSt_.entered_cb(me,"alp_update_");me.positionSt_.changed_cb(me,"redraw");me.textSt_.changed_cb(me,"redraw");};var _8fc=AG.Label.prototype=new _8ea();_8fc.initialize=function(map){this.mapSt_.set(map);};_8fc.remove=function(){this.mapSt_.set(null);};_8fc.copy=function(){return new AG.Label(this.opts_);};_8fc.redraw=function(_8fd){var me=this,map=me.mapSt_.get(),_8fe=me.positionSt_.get(),div=me.div_();if(!map){me.alp_update_();return;}me.textdiv_().innerHTML=me.textSt_.get()||"";if(map&&_8fe){var pix=AG.fromLatLngToDivPixel(map,_8fe);div.style.left=Math.round(pix.x)+"px";div.style.top=Math.round(pix.y)+"px";}};_8fc.setMap=function(map){this.mapSt_.set(map);};_8fc.getMap=function(){return this.mapSt_.get();};_8fc.setPosition=function(_8ff){this.positionSt_.set(_8ff);};_8fc.getPosition=function(){return this.positionSt_.get();};_8fc.setText=function(text){this.textSt_.set(text);};_8fc.getText=function(){return this.textSt_.get();};_8fc.alp_update_=function(map,_900){var me=this,div=me.div_(),p=div.parentNode,pane=map&&map.getPane(google.maps.MAP_MARKER_PANE);if(p){p.removeChild(div);}alp.m(_900,"removeOverlay",me);if(map&&pane){alp.m(map,"addOverlay",me);me.redraw();pane.appendChild(div);}};_8fc.div_=function(){var me=this,ret=dojo.create("div",me.opts_.label_class&&{className:me.opts_.label_class});ret.style.position="absolute";ret.style.zIndex=160490817;return (me.div_=function(){return ret;})();};_8fc.textdiv_=function(){var me=this,ret=dojo.create("div",{style:me.opts_.label_style,className:me.opts_.label_class&&(me.opts_.label_class+"_text")},me.div_());return (me.textdiv_=function(){return ret;})();};}_8f7=function(opts){opts=dojo.mixin({label_text:"",label_class:"alp._gmap2_3.Label",label_anchor:null},opts);opts.label_style=dojo.mixin({position:"relative",marginLeft:"-50%",top:"-8px;",whiteSpace:"nowrap",border:"1px solid blue",padding:"2px",backgroundColor:"white"},opts.label_style);return opts;};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.marker_labeled"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.marker_labeled"]=true);dojo.provide("alp._gmap2_3.marker_labeled");(function(){var AG=alp._gmap2_3;AG.marker_labeled_gen=function(_901,_902){if(typeof _902==="string"){_902={label_text:_902,label_style:{}};}var ret=AG.marker_gen(_901),_903=_902&&new AG.Label(_902);if(_903){AG.bind_label_to_marker(_903,ret);}ret._alpLabel=_903;return ret;};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.cluster.marker"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.cluster.marker"]=true);dojo.provide("alp._gmap2_3.cluster.marker");alp.installLocalization("alp._gmap2_3","cluster");(function(){var AG=alp._gmap2_3,AGC=AG.cluster,_904=alp.util.mapany(),_905,_906=AGC.DEFAULT_noZoomInCountMax(),_907=AGC.DEFAULT_zoomInMaxLevel();AGC.LABEL_CLASS=function(n){return "alp_gmap2_3_ClusterMarker_"+n;};var cm=alp.cfg.cluster_markers(),k=-1;alp.util.add_css("."+AGC.LABEL_CLASS(++k)+" { margin-top : -9px ; margin-left : -"+cm[k].anchor_xy.x+"px ; width : "+cm[k].xy.x+"px; } "+"."+AGC.LABEL_CLASS(k)+"_text { font-family: sans-serif; font-size : 14px; text-align : center; width : "+cm[k].xy.x+"px; } "+"."+AGC.LABEL_CLASS(++k)+" { margin-top : -9px ; margin-left : -"+cm[k].anchor_xy.x+"px ; width : "+cm[k].xy.x+"px; } "+"."+AGC.LABEL_CLASS(k)+"_text { font-family: sans-serif; font-size : 14px; text-align : center; width : "+cm[k].xy.x+"px; } "+"."+AGC.LABEL_CLASS(++k)+" { margin-top : -9px ; margin-left : -"+cm[k].anchor_xy.x+"px ; width : "+cm[k].xy.x+"px; } "+"."+AGC.LABEL_CLASS(k)+"_text { font-family: sans-serif; font-size : 14px; text-align : center; width : "+cm[k].xy.x+"px; } "+"."+AGC.LABEL_CLASS(++k)+" { margin-top : -9px ; margin-left : -"+cm[k].anchor_xy.x+"px ; width : "+cm[k].xy.x+"px; } "+"."+AGC.LABEL_CLASS(k)+"_text { font-family: sans-serif; font-size : 14px; text-align : center; width : "+cm[k].xy.x+"px; } "+"."+AGC.LABEL_CLASS(++k)+" { margin-top : -9px ; margin-left : -"+cm[k].anchor_xy.x+"px ; width : "+cm[k].xy.x+"px; } "+"."+AGC.LABEL_CLASS(k)+"_text { font-family: sans-serif; font-size : 14px; text-align : center; width : "+cm[k].xy.x+"px; } ");AG.cluster.create_marker=function(_908,_909){var p,n,_90a,cmoa,_90b,map=_908.map,_90c,_90d;if(!map){throw new Error("alp._gmap2_3.cluster.create_marker requires `options.map`.");}p="zoomInMaxLevel";if(_908[p]==null){_908[p]=_907;}p="noZoomInCountMax";if(_908[p]==null){_908[p]=_906;}p="clickable";if(_908[p]==null){_908[p]=true;}if(_908.number!=null){cmoa=AGC.marker_opts_arr(_908.cluster_marker_cfg);n=Math.min(cmoa.length-1,Math.max(0,Math.floor(Math.log(_908.number)/Math.log(10))));_90b=(dojo.i18n.getLocalization("alp._gmap2_3","cluster")||{})[(_908.number>1)?"bubble_title_n":"bubble_title_1"]||"${n} item(s) here";_90c=dojo.mixin({},cmoa[n].marker_opts,{title:dojo.string.substitute(_90b,{n:_908.number})});_90d={label_text:""+_908.number,label_class:AGC.LABEL_CLASS(n),label_style:{border:"0px none transparent",backgroundColor:"transparent",top:"",padding:"",marginLeft:""}};}_90c=dojo.mixin({},_90c,{position:_908.position,map:_908.map,clickable:_908.clickable},_908.marker_opts);if(_909||AG.V3()){_90a=AG.marker_labeled_gen(_90c,_90d);_905(_90a,_908);}else{var _90e="";dojo.forEach([_908.zoomInMaxLevel,_908.noZoomInCountMax,_90c.clickable,_90d.label_class,_90c.title],function(s){_90e+="("+s+")";});_90a=(function(_90f){var pool,arr,_910;pool=(_904.get(map)||_904.set(map,{}));arr=(pool[_90f]=pool[_90f]||[]);if(arr&&(arr.length>0)){var _910=arr.pop();alp.m(_910&&_910._alpLabel,"setText",_90d.label_text);_910.setPosition(_908.position);_905(_910,_908);_910.setVisible(true);return _910;}_910=alp.util.unleak(AG.marker_labeled_gen(_90c,_90d));_910._alpPoolRemove=function(){var me=this;me.setVisible(false);arr.push(me);};_905(_910,_908);return _910;})(_90e);}return _90a;};_905=function(_911,_912){if(_911._alpEh){_911._alpEh.eh_clear();}_911._alpEh=new alp.util.Eh();_911._alpIsClosed=_913;function _913(z){return z<_912.zoomInMaxLevel&&(_912.number===null||(_912.number>_912.noZoomInCountMax));};_911._alpEh.eh_push(AG.event("addListener")(_911,"click",dojo.hitch(_911,function(){var z,map=this.getMap();if(!map){return;}z=map.getZoom();if(_911._alpIsClosed(z)){map.setCenter(_911.getPosition());map.setZoom(z+1);}else{if(_912.click_fun){_912.click_fun(_911);}}})),AG.event("removeListener"));if(_912.mouseover_fun){_911._alpEh.eh_push(AG.event("addListener")(_911,"mouseover",_914),AG.event("removeListener"));_911._alpEh.eh_push(AG.event("addListener")(_911,"click",_914),AG.event("removeListener"));}function _914(){_912.mouseover_fun(_911);};};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.iter"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.iter"]=true);dojo.provide("alp.util.iter");alp.util.first_last_iter=function(_915,_916){var _917=true;var _918=function(){var arr=(typeof _915==="function")?_915():_915;var ret=_917?0:(arr.length-1);if(!_916){_918.switchit();}return ret;};_918.switchit=function(){_917=!_917;};return _918;};}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.bg"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.bg"]=true);dojo.provide("alp.util.bg");dojo.declare("alp.util.Background",null,{pause_work_ratio:1,work_max_ms:(alp.util.likeIE()?200:100),pause_min_ms:(alp.util.likeIE()?100:10),pause_max_ms:500,waker_required:true,waker_interval_ms:1000,sleepy:null,constructor:function(opts){var me=this;dojo.mixin(me,opts);me.sleepy=new alp.data.BoolState();me.sleepy.changed_v_cb(true,function(){me.do_some();});if(me.waker_required){window.setInterval(dojo.hitch(me,"waker"),me.waker_interval_ms);}me.waker();},do_some:function(){var args,_919,_91a,me,_91b,_91c,_91d,_91e,_91f,_920;if(this.sleepy.get()){return;}me=dojo.getObject("_instanced.do_some",true,this);if(djConfig.isDebug>2){console.log(this.declaredClass+".do_some( ... ), arguments:",arguments);}args=((arguments.lenth>0)?arguments:me._last_args)||[];me._last_args=args;_91f=alp.util.now_time();_91c=undefined;_91c=(me._thrown>0)&&me._last_pause_start_time&&Math.max(0,_91f-me._last_pause_start_time);if(!(me._thrown>0)){me._thrown=0;}else{me._thrown--;}_91a=false;_920=undefined;while(!(_920>=this.work_max_ms)){_919=this.do_one_impl.apply(this,args);_91e=alp.util.now_time();_920=_91e-_91f;_91a=_91a||_919;if(!_919){break;}}me._last_pause_start_time=undefined;if(_919&&(me._thrown<1)){me._last_pause_start_time=_91e;_91b=_920*this.pause_work_ratio;if(_91c){_91b+=Math.max(_91b,_91c);_91b>>=1;}_91d=Math.max(this.pause_min_ms,Math.min(this.pause_max_ms,_91b));alp.util.asyncHitch("do_some",this,_91d).apply(null,args);me._thrown=1;if(djConfig.isDebug){console.log("alp.util.Background.do_some(): me._thrown:",me._thrown,"last_pause_duration:",_91c,", work_duration:",_920,", desired_pause_duration:",_91b,", pause_duration:",_91d);}}},waker:function(){if(djConfig.isDebug>2){console.log(this.declaredClass+".waker()");}if((!this.do_some._thrown)||(this.do_some._thrown<1)){if(djConfig.isDebug>2){console.log(this.declaredClass+".waker() calling this.do_some()");}this.do_some();}},do_one_impl:function(){throw new Error("alp.util.Background.do_one_impl() not implemented yet. Please implement.");}});}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.cluster.cluster_view_queue"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.cluster.cluster_view_queue"]=true);dojo.provide("alp._gmap2_3.cluster.cluster_view_queue");(function(){var AG=alp._gmap2_3,CN="alp._gmap2_3.ClusterViewQueue",AUO=alp.util.object,_921=/^\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)\s*([\w\W]+)$/,_922=["zoom","x","y","sub_x","sub_y","gmap_name"];dojo.declare(CN,[alp.util.Background],{gmapSt:undefined,selectionDfrd:undefined,marker_opts:undefined,on_cluster_click:undefined,on_cluster_mouseover:undefined,single_ooi_marker_opts:undefined,on_ooi_click:undefined,on_ooi_dblclick:undefined,on_ooi_marker_mouseover:undefined,filter_dz_max:2,max_hidden:alp.util.likeIE()?123:1234,img_default_domain:undefined,constructor:function(opts){var me=this;dojo.forEach(["gmapSt","selectionDfrd"],function(s){if(!opts[s]){console.error(CN+".constructor(): opts."+s+" is mandatory.");return;}});alp.util.mixinDefaults(me,opts);me._gmapEh=new alp.util.Eh();me.gmapSt.left_cb(me,function(last){if(last){me.clear(last);}});me.gmapSt.changed_cb(me,"reinitGmap");this.reinitGmap();dojo.addOnLoad(function(){me.selectionDfrd.addCallback(function(sel){me._selection=sel;return sel;});});},setMap:function(gmap){this.gmapSt.set(gmap);},getMap:function(){return this.gmapSt.get();},reinitGmap:function(){var me=this,gmap=me.gmapSt.get();if(gmap===me._lastReinitGmap){return;}me._lastReinitGmap=gmap;me._gmapEh.eh_clear();if(gmap){gmap=alp.util.unleak(gmap);dojo.forEach(["dragstart","movestart"],function(_923){me._gmapEh.eh_push(AG.event("addListener")(gmap,_923,dojo.hitch(me,"_on_gmap_"+_923)),AG.event("removeListener"));});dojo.forEach(["dragend","moveend","load"],function(_924){me._gmapEh.eh_push(AG.event("addListener")(gmap,_924,alp.util.asyncHitch("_on_gmap_"+_924,me)),AG.event("removeListener"));});}},_on_gmap_dragstart:function(){alp.util.console(1,"log","ClusterViewQueue._on_gmap_dragstart()");this._on_gmap_movestart();},_on_gmap_dragend:function(){alp.util.console(1,"log","ClusterViewQueue._on_gmap_dragend()");this._on_gmap_moveend();},_on_gmap_movestart:function(){alp.util.console(1,"log","ClusterViewQueue._on_gmap_movestart()");this._gmap_moving=true;},_on_gmap_moveend:function(){alp.util.console(1,"log","ClusterViewQueue._on_gmap_moveend()");this._gmap_moving=false;if(this._delayedDfrd){this._delayedDfrd.callback(true);this._delayedDfrd=undefined;}},_on_gmap_load:function(){this._on_gmap_moveend();},_todo:[],_last_will:{},do_one_impl:function do_one_impl(){var _925=arguments,gmap=this.gmapSt.get();if(!(gmap&&this._todo&&(this._todo.length>0))){return false;}if(!gmap.isLoaded()){return false;}this._filter_current_zoom_level();var _926=false;var _927=false;var _928=false;_926=_926||(!this._selection);_928=_928||this._gmap_moving;_927=_927||_926||(!gmap.isLoaded());if(_926){this.selectionDfrd.addCallback(dojo.hitch(this,function(sel){this._selection=sel;return sel;}));}if(_927){this._delayedDfrd=this._delayedDfrd||new alp.util.SafeDeferred();this._delayedDfrd.addCallback(dojo.hitch(this,function(ret){this.do_some.apply(this,_925);return ret;}));}if(_927||_928){alp.util.console(1,"log",this.declaredClass+".do_one_impl(): do_later || abort ,  do_later:",_927,", abort:",_928);return;}this._todo_iter||(this._todo_iter=alp.util.first_last_iter(dojo.hitch(this,function(){return this._todo;}),true));while(this._todo&&(this._todo.length>0)){var _929=this._todo_iter();alp.util.console(1,"log","ClusterViewQueue: next_ind:",_929,", this._todo.length:",this._todo.length);var _92a=this._todo.splice(_929,1)[0];if(!_92a){continue;}var _92b=this._last_will[_92a];this._last_will[_92a]=undefined;if(!_92b){alp.util.console(1,"log","ClusterViewQueue: !action -> skipping this one. action:",_92b);continue;}var name=_92b.name;if(!name){alp.util.console(1,"log","ClusterViewQueue: !name -> skipping this one.");continue;}if(!(this[name]&&(typeof this[name]==="function"))){console.error("ClusterViewQueue.do(): unrecognised action name: ",name," - skipping this action.");continue;}var args=_92b.args;if(!args){console.error("ClusterViewQueue.do(): missing args array - skipping this action.");continue;}var _92c=this[name].apply(this,args);if(!_92c){alp.util.console(1,"log","ClusterViewQueue: !did_some -> trying the next one.");continue;}this._todo_iter.switchit();alp.util.console(1,"log","ClusterViewQueue.do_some() did: action.name:",_92b.name,", action.args:",_92b.args);break;}return _92c;},_where_str_2_cell:function(_92d){var arr=this._where_str_2_cellindex;return alp.util.get_property(this._cells,[arr.zoom,arr.x,arr.y,arr.sub_x,arr.sub_y]);},_where_str_2_cellindex:function(_92e){var ret=_921.exec(_92e).slice(1);for(var a=_922.length;a--;){var _92f=_922[a];ret[_92f]=ret[a];}return ret;},_where_str:function(_930){if(typeof _930==="string"){return _930;}if(!(_930&&_930.length&&(_930.length===6))){console.error("ClusterViewQueue._where_str() expects either a String or a 7-element array: "+"[ Integer: zoom, Integer: tile_x, Integer: tile_y, Integer: sub_x, Integer: sub_y, Integer: qq,  LatLng|LatLng.toString() ],"+" and was given an incorrect \"where\":",_930);return;}var ret="("+_930.join(",")+")";ret+=this.gmap_ind_str();return ret;},gmap_ind:function(gmap){gmap=gmap||this.gmapSt.get();var arr=this._gmap_arr||(this._gmap_arr=[]),ind=dojo.indexOf(arr,gmap);if(ind<0){ind=arr.length;arr.push(gmap);}return ind;},gmap_ind_str:function(gmap){return "_gmap#"+this.gmap_ind(gmap);},gmap_str2ind:function(s){return s.match(/_gmap#(\d+)/)[1]>>0;},group_2_marker:_931,remove_cell_later:function(_932,_933,_934){var _935,_936;_936=this._where_str(_932);this._update_todo(_936,{name:"_remove_cell",args:[_936]},_933);if(!_934){var c=this._where_str_2_cell(_932);if(c){for(var qq=c.length;qq--;){this._hide(c[qq]);}}}},update_marker_later:function(_937,_938,_939){var _93a=this._where_str(_937);this._update_todo(_93a,{name:"_update_marker",args:[_93a,_938]},_939);},_update_todo:function(_93b,will,_93c){if(this._last_will[_93b]){var ind;while((ind=dojo.indexOf(this._todo,_93b))>-1){this._todo.splice(ind,1);}this._last_will[_93b]=undefined;}this._todo[_93c?"unshift":"push"](_93b);this._last_will[_93b]=will;},_remove_cell:function(_93d){var _93e=this._where_str_2_cellindex(_93d),_93f=this._cells,c=_93f[_93e.zoom];c=c&&c[_93e.x];c=c&&c[_93e.y];c=c&&c[_93e.sub_x];c=c&&c[_93e.sub_y];if(!c){return false;}var _940=false;while(c.length){var _941=this._remove_marker(c.pop());_940=_940||_941;}return _940;},_remove_marker:function(_942){var c,g,h;g=this._markers;h=g&&g[_942];if(!h){console.error(CN+"._remove_marker(): found a bug! `h` must not be falsy-null-like.");}if(h){c=this._cells;delete c[h._alpWhereStr];if(h._alpPoolRemove){h._alpPoolRemove();}else{h.setMap(null);if(h._alpUnleak){h._alpUnleak();}}delete g[_942];return true;}return false;},_get_cell:function(zoom,x,y,_943,_944,qq){var c;if(!(c=this._cells)){return null;}if(zoom==null){return c;}if(!(c=c[zoom])){return null;}if(x==null){return c;}if(!(c=c[x])){return null;}if(y==null){return c;}if(!(c=c[y])){return null;}if(_943==null){return c;}if(!(c=c[_943])){return null;}if(_944==null){return c;}if(!(c=c[_944])){return null;}if(qq==null){return c;}if(!(c=c[qq])){return null;}return c;},_set_cell:function(zoom,x,y,_945,_946,qq,val){var c;c=(this._cells=this._cells||{});c=(c[zoom]=c[zoom]||{});c=(c[x]=c[x]||{});c=(c[y]=c[y]||{});c=(c[_945]=c[_945]||{});c=(c[_946]=c[_946]||[]);c[qq]=val;},_update_marker:function _update_marker(_947,_948){var me=this,_949=false,gm=google.maps,gmap=me.gmapSt.get(),c,g,img,icon,info,_94a,_94b,_94c;if(!gmap){console.error(CN+"_update_marker() is buggy: no gmap found.");return;}g=(me._markers=me._markers||{});c=(me._cells=me._cells||{});if(_948){_94b=me._get_cell(_948.zoom,_948.x,_948.y,_948.sub_x,_948.sub_y,_948.qq);_94a=_94b&&g[_94b];if(_94a){if(!(_94a._alpWhereStr===_947&&me._equal_groups(_94a._alpGroup,_948))){_949=_949||me._remove_cell(_94b);}}}_94a=g[_947];if(_94a){if(me._equal_groups(_94a._alpGroup,_948)){me._show(_94a);return _949;}_949=_949||me._remove_cell(_947);}if(!(_948&&_948.c>0)){return _949;}_94a=me.group_2_marker(_948);_94a._alpWhereStr=_947;g[_947]=_94a;me._set_cell(_948.zoom,_948.x,_948.y,_948.sub_x,_948.sub_y,_948.qq,_947);me._show(_94a);return true;},_equal_groups:function(g1,g2){if((!g1)||(!g2)){return false;}var ia1=g1.info_array,ia2=g2.info_array,pix1=g1.pix,pix2=g2.pix;if(!((g1.c===g2.c)&&(g1.zoom===g2.zoom)&&(g1.iconFun===g2.iconFun)&&(!!pix1===!!pix2)&&(!pix1||pix1.equals(pix2))&&(!!ia1===!!ia2)&&(!ia1||ia1.length===ia2.length))){return false;}if(ia1){for(var i=ia1.length;i--;){var _94d=ia1[i],_94e=ia2[i];if(_94d.qt!==_94e.qt){return false;}if(_94d.t!==_94e.t){return false;}}}return true;},_show:function(_94f){if(_94f&&!_94f.getMap()){_94f.setMap(_94f._alpGmap);}},_hide:function(_950){if(_950&&_950.getMap()){_950.setMap(null);}},clear:function(gmap){this.filter_zoom_levels(Infinity,true,gmap);},DECISION_SHOW:2,DECISION_NOTHING:1,DECISION_HIDE:0,DECISION_REMOVE:-1,filter_zoom_levels:function(_951,_952,gmap){var me=this,_953,_954,_955,ind,ms,_956,zref;gmap||(gmap=me.gmapSt.get());if(!gmap){return;}if(typeof _951!=="function"){zref=""+_951;_951=function(z,_957){if(_957&&_957!==gmap){return me.DECISION_REMOVE;}var dz=z-zref;if(dz===0){return me.DECISION_NOTHING;}if(Math.abs(dz)<=me.filter_dz_max){return me.DECISION_HIDE;}return me.DECISION_REMOVE;};}if(me._todo&&(me._todo.length>0)){me._todo=dojo.filter(me._todo,function(_958){var _959=me._last_will&&me._last_will[_958];if(_959&&(_959.name="_update_marker")&&_959.args&&(_959.args.length>1)){return (me.DECISION_HIDE<_951(_959.args[1].zoom));}return true;});}_953=[];if((ms=me._markers)){alp.util.objForEach(ms,function(_95a,_95b){var d,_95c,_95d,tmp;_95c=_951(_95b._alpGroup.zoom,_95b._alpGmap);if((_95c===me.DECISION_HIDE)&&!_95b.getMap()){_95c=me.DECISION_NOTHING;}d=[_95a,_95b,_95c];if(!_952){_95d=_95b.getPosition();_954=gmap.getCenter();tmp=_954||_95d;d.push(alp.util.likeIE()?alp.util.gpoint_d2({x:_95d.lng(),y:_95d.lat()},{x:tmp.lng(),y:tmp.lat()}):tmp.distanceFrom(_95d));}_953.push(d);},me);}if((!_952)&&_953&&(_953.length>0)){ind=_953[0].length-1;_953.sort(function(a,b){return b[ind]-a[ind];});}_956=0;_955=true;dojo.forEach(_953,function(d){var i,_95e,_95f,_960;i=0;_95e=d[i++];_95f=d[i++];_960=d[i++];if((_960===me.DECISION_HIDE)&&(_956>=me.max_hidden)){_960=me.DECISION_REMOVE;}if(_960===me.DECISION_SHOW){me._show(_95f);}if(_960===me.DECISION_NOTHING){return;}if(_960===me.DECISION_HIDE){me._hide(_95f);me._last_will[_95e]=undefined;_956++;return;}if(_960===me.DECISION_REMOVE){me._hide(_95f);me.remove_cell_later(_95e,_955);return;}console.error("ClusterViewQueue.filter_zoom_levels( decisionmaker: ",_951,", do_not_sort_from_center:",_952,"): unknown decision:",_960," for d:",d);});},_filter_current_zoom_level:function(){var me,zoom,gmap=this.gmapSt.get();if(!gmap){console.warn(CN+"._filter_current_zoom_level(): no gmap found!");return;}me=dojo.getObject("_instanced._filter_current_zoom_level",true,this);zoom=gmap.getZoom();if(typeof zoom!=="number"){return;}if(me._last_zoom===zoom&&me._last_gmap===gmap){return;}me._last_zoom=zoom;me._last_gmap=gmap;this.filter_zoom_levels(zoom);},update_rectangle_later:function(zoom,_961,_962,_963,_964){var me=this,_965,_966,_967,_968,e,eq,f,g,ind,_969,_96a,_96b,_96c,_96d,_96e,_96f,tmp,x,y,_970,_971,_972,c0,c1,c2,c3,rx,gmap=this.gmapSt.get();if(!gmap){console.warn(CN+".update_rectangle_later(): no gmap found!");return;}alp.util.console(1,"log",me.declaredClass+".update_rectangle_later( ... ), arguments:",arguments);if(_964){var _973=_964.dbg_t();}_967=me._cells;_96b=me._markers;_96d=1<<zoom;_96e=1<<_962;_96c=0;var _974=me.gmap_ind_str();rx=new RegExp("^\\("+zoom+",("+(function(){var x,y;var _975=[];for(x=_961.tile_sw_x;x<=_961.tile_ne_x;x++){var _976=[];for(y=_961.tile_ne_y;y<=_961.tile_sw_y;y++){_976.push(y%_96d);}_975.push((x%_96d)+",("+_976.join("|")+")");}return _975;})().join("|")+")\\).*$");me._todo=dojo.filter(me._todo,function(s){return !rx.test(s);});me.filter_zoom_levels(zoom);var _977=me.gmap_ind();_965=[];c0=_967&&_967[zoom];for(var _978=_961.tile_sw_x;_978<=_961.tile_ne_x;_978++){x=_978%_96d;c1=c0&&c0[x];e=_963&&_963[x];for(var _979=_961.tile_ne_y;_979<=_961.tile_sw_y;_979++){y=_979%_96d;c2=c1&&c1[y];f=e&&e[y];for(_970=0;_970<_96e;_970++){c3=c2&&c2[_970];g=f&&f[_970];for(_971=0;_971<_96e;_971++){var c4=c3&&c3[_971],h=g&&g[_971],_97a=[];if(h){_97a=[h].concat(h.unmergeable_array);}for(var qq=_97a.length;qq--;){if(!(_97a[qq].c>0)){_97a.splice(qq,1);}}for(var qq=0,_97b=Math.max(_97a.length,(c4&&c4.length)||0);qq<_97b;++qq){var c5=c4&&c4[qq];_966=_97a[qq];if(_966){var _97c={};for(var k in _966){if(!(k in _97c)){_97c[k]=_966[k];}}_966=_97c;_966.zoom=zoom;_966.x=x;_966.y=y;_966.sub_x=_970;_966.sub_y=_971;_966.qq=qq;}_96a=undefined;if(_96b&&c5){_972=c5;_96a=_96b&&_96b[_972];}_969=undefined;if(_966){_969=new google.maps.LatLng(_966.lat,_966.lng);}eq=_96a&&_966&&_969&&_969.equals(_96a.getPosition())&&me._equal_groups(_96a._alpGroup,_966)&&me.gmap_str2ind(_96a._alpWhereStr)===_977;if(eq){me._show(_96a);me._last_will[_96a._alpWhereStr]=null;continue;}var qwe0=[undefined,undefined,undefined,undefined];var qwe=undefined;if(_96a){qwe=qwe||qwe0;qwe[0]=_96a.getPosition();qwe[2]=_96a;qwe[3]=_96a._alpWhereStr;}if(_966){qwe=qwe||qwe0;qwe[0]=_969;qwe[1]=_966;qwe[3]=me._where_str([_966.zoom||zoom,x,y,_970,_971,qq]);}if(qwe){_965.push(qwe);}}}}}}if(_964){var _97d=_964.dbg_t();_964.dbg_t_node_write("<p>"+" - CVQ rectangle decide: "+((_97d-_973)/1000)+" seconds."+"</p>");}if(_964){var _97e=_964.dbg_t();}dojo.forEach(_965,function(d){_968=_968||gmap.getCenter();var _97f=d[0];var tmp=_968||_97f;d.push(alp.util.likeIE()?alp.util.gpoint_d2({x:_97f.lng(),y:_97f.lat()},{x:tmp.lng(),y:tmp.lat()}):tmp.distanceFrom(_97f));});if(_965&&(_965.length>0)){ind=_965[0].length-1;_965.sort(function(a,b){return b[ind]-a[ind];});}if(_964){var _980=_964.dbg_t();_964.dbg_t_node_write("<p>"+" - CVQ rectangle order: "+((_980-_97e)/1000)+" seconds."+"</p>");}if(_964){var _981=_964.dbg_t();}dojo.forEach(_965,function(d){var _982=d[0]&&d[1];if(d[2]){if(_96c<me.max_hidden){me._hide(d[2]);_96c++;}else{me.remove_cell_later(d[3]);}}if(_982){me.update_marker_later(d[3],d[1]);}});if(_964){var _983=_964.dbg_t();_964.dbg_t_node_write("<p>"+" - CVQ rectangle update: "+((_983-_981)/1000)+" seconds."+"</p>");}}});function _931(_984,opt){opt=opt||{};var me=this,gmap=me.gmapSt.get(),gm=google.maps,_985,_986;_986=new gm.LatLng(_984.lat,_984.lng);if(_984.c>1){_985=alp._gmap2_3.cluster.create_marker(dojo.delegate(me.marker_opts,{map:gmap,position:_986,number:_984.c,click_fun:me.on_cluster_click,mouseover_fun:me.on_cluster_mouseover}));_985._alpInfoArray=[].concat(_984.info_array);}else{var _987=dojo.mixin({},me.single_ooi_marker_opts);var ia=_984.info_array;if(ia&&ia.length!==1){console.error(_984);throw new Error(CN+": inconsistent number of OOIs in a singleton cluster!");}var info;if(ia){info=ia[0];}else{if(_984.isUnmergeable){info=_984;}else{throw new Error(CN+": could not understand `alpGroup`. Most likely a bug.");}}var _988,img;img=info.t_img&&(_988=me._selection[info.t_img])&&me._selection[info.t_img].img;img=img||info.t&&(_988=me._selection[info.t])&&me._selection[info.t].img;img=img||"";img=((img.charAt(0)==="/")?this.img_default_domain:"")+img;var s="iconFun";if(info[s]){var o=info[s](img);if(typeof o==="string"){img=o;}else{img=o.url;_988=o;}}var _989;if(_988){_989=alp.cfg._ooi_normalize_xy(dojun.filterIn(alp.at(_988,["size","anchor","origin","scaledSize"]),"!!"));if(_989.size){_989.scaledSize=_989.scaledSize||_989.size;}}var moi=dojo.mixin({},_987.icon,_989);if(moi&&opt.middle_anchor){moi.anchor=new gm.Point(moi.size.width>>1,moi.size.height>>1);}if(img&&moi){_987.icon=AG.markerImage_gen(img,moi.size,moi.origin,moi.anchor,moi.scaledSize);}_987=dojo.mixin({},_987,{map:gmap,position:_986,clickable:true,title:info.title||alp.util.get_property(me._selection,[info.t,"title"])||""});_985=alp.util.unleak(AG.marker_gen(_987));_985._alpInfo=dojo.delegate(info,{id:alp.util.fun_or_not(info.id||info.idlist[0])});if(me.on_ooi_click){AG.event("addListener")(_985,"click",dojo.hitch(me,me.on_ooi_click,_985,info));}if(me.on_ooi_dblclick){AG.event("addListener")(_985,"dblclick",dojo.hitch(me,me.on_ooi_dblckick,_985,info));}if(me.on_ooi_marker_mouseover){AG.event("addListener")(_985,"mouseover",dojo.hitch(me,me.on_ooi_marker_mouseover,_985,info));}}_985._alpGroup=_984;_985._alpGmap=gmap;return _985;};})();}if(typeof dojo==="undefined"||!dojo._hasResource["dojox.collections._base"]){typeof dojo==="undefined"||(dojo._hasResource["dojox.collections._base"]=true);dojo.provide("dojox.collections._base");dojox.collections.DictionaryEntry=function(k,v){this.key=k;this.value=v;this.valueOf=function(){return this.value;};this.toString=function(){return String(this.value);};};dojox.collections.Iterator=function(arr){var a=arr;var _98a=0;this.element=a[_98a]||null;this.atEnd=function(){return (_98a>=a.length);};this.get=function(){if(this.atEnd()){return null;}this.element=a[_98a++];return this.element;};this.map=function(fn,_98b){return dojo.map(a,fn,_98b);};this.reset=function(){_98a=0;this.element=a[_98a];};};dojox.collections.DictionaryIterator=function(obj){var a=[];var _98c={};var _98d={};for(var p in obj){if(p in _98d){continue;}if(!_98c[p]){a.push(obj[p]);}}var _98e=0;this.element=a[_98e]||null;this.atEnd=function(){return (_98e>=a.length);};this.get=function(){if(this.atEnd()){return null;}this.element=a[_98e++];return this.element;};this.map=function(fn,_98f){return dojo.map(a,fn,_98f);};this.reset=function(){_98e=0;this.element=a[_98e];};};}if(typeof dojo==="undefined"||!dojo._hasResource["dojox.collections.Dictionary"]){typeof dojo==="undefined"||(dojo._hasResource["dojox.collections.Dictionary"]=true);dojo.provide("dojox.collections.Dictionary");dojox.collections.Dictionary=function(_990){var _991={};this.count=0;var _992={};this.add=function(k,v){var b=(k in _991);_991[k]=new dojox.collections.DictionaryEntry(k,v);if(!b){this.count++;}};this.clear=function(){_991={};this.count=0;};this.clone=function(){return new dojox.collections.Dictionary(this);};this.contains=this.containsKey=function(k){if(_992[k]){return false;}return (_991[k]!=null);};this.containsValue=function(v){var e=this.getIterator();while(e.get()){if(e.element.value==v){return true;}}return false;};this.entry=function(k){return _991[k];};this.forEach=function(fn,_993){var a=[];var _994={};for(var p in _991){if(p in _994){continue;}if(!_992[p]){a.push(_991[p]);}}dojo.forEach(a,fn,_993);};this.getKeyList=function(){return (this.getIterator()).map(function(_995){return _995.key;});};this.getValueList=function(){return (this.getIterator()).map(function(_996){return _996.value;});};this.item=function(k){if(k in _991){return _991[k].valueOf();}return undefined;};this.getIterator=function(){return new dojox.collections.DictionaryIterator(_991);};this.remove=function(k){if(k in _991&&!_992[k]){delete _991[k];this.count--;return true;}return false;};if(_990){var e=_990.getIterator();while(e.get()){this.add(e.element.key,e.element.value);}}};}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.collect"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.collect"]=true);dojo.provide("alp.util.collect");alp.util.dictFromObj=function(o,_997){var ret=new dojox.collections.Dictionary();for(var k in o){if(_997||o.hasOwnProperty(k)){ret.add(k,o[k]);}}return ret;};}if(typeof dojo==="undefined"||!dojo._hasResource["dojox.collections.ArrayList"]){typeof dojo==="undefined"||(dojo._hasResource["dojox.collections.ArrayList"]=true);dojo.provide("dojox.collections.ArrayList");dojox.collections.ArrayList=function(arr){var _998=[];if(arr){_998=_998.concat(arr);}this.count=_998.length;this.add=function(obj){_998.push(obj);this.count=_998.length;};this.addRange=function(a){if(a.getIterator){var e=a.getIterator();while(!e.atEnd()){this.add(e.get());}this.count=_998.length;}else{for(var i=0;i<a.length;i++){_998.push(a[i]);}this.count=_998.length;}};this.clear=function(){_998.splice(0,_998.length);this.count=0;};this.clone=function(){return new dojox.collections.ArrayList(_998);};this.contains=function(obj){for(var i=0;i<_998.length;i++){if(_998[i]==obj){return true;}}return false;};this.forEach=function(fn,_999){dojo.forEach(_998,fn,_999);};this.getIterator=function(){return new dojox.collections.Iterator(_998);};this.indexOf=function(obj){for(var i=0;i<_998.length;i++){if(_998[i]==obj){return i;}}return -1;};this.insert=function(i,obj){_998.splice(i,0,obj);this.count=_998.length;};this.item=function(i){return _998[i];};this.remove=function(obj){var i=this.indexOf(obj);if(i>=0){_998.splice(i,1);}this.count=_998.length;};this.removeAt=function(i){_998.splice(i,1);this.count=_998.length;};this.reverse=function(){_998.reverse();};this.sort=function(fn){if(fn){_998.sort(fn);}else{_998.sort();}};this.setByIndex=function(i,obj){_998[i]=obj;this.count=_998.length;};this.toArray=function(){return [].concat(_998);};this.toString=function(_99a){return _998.join((_99a||","));};};}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.cluster.cluster_view"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.cluster.cluster_view"]=true);dojo.provide("alp._gmap2_3.cluster.cluster_view");alp.installLocalization("alp._gmap2_3","cluster");(function(){var AG=alp._gmap2_3,AU=alp.util,CN="alp._gmap2_3.ClusterView",_99b=alp._gmap2_3.cluster.MANUALOOI_CATID;dojo.declare(CN,[alp.util.Updater,AG.AbstractClusterViewOnClusterMouseover],{catLeavesOnly:true,catSelDefault:false,catSelCookie:true,catSelCookieName:"alpOutdooractiveCatSel",catSelCookieOpt:{path:"/",expires:999999},extra_buffer:0.66,infoWinOpts:{suppressMapPan:true,opacity:0.88},cluster_iw_height:"150px",do_merge:true,cluster_min_dist_pix:((alp.util.likeIE()&&dojo.isIE<9)?66:function(zoom){return Math.max(5,66-zoom*0.5-(zoom>10?(9*(zoom-10)):0));}),cluster_wait_q:".js-cluster-loading",cluster_wait_display:["none","inline"],lineOptions:{strokeColor:"#FF0000",strokeWeight:5,strokeOpacity:0.85},dblClickMs:500,marker_opts:undefined,infoWin_cluster:null,infoWin_ooi:true,polymouseover:true,polylineModelOpts:{noNearestFinder:true},dataTourMaxPoints:+Infinity,dataTourMaxPointsPropAngle:0.5,catSelStr_init:null,info_window_gmap_shift:function(gmap,x,y){return {x:x+Math.max(10,gmap.getSize().width/7),y:y-Math.max(20,gmap.getSize().height/5)};},info_window_cont_class:"cluster-view-iw",cluster_iw_wait_html:function(){return alp._gmap2_3.cluster.i18n.cluster_iw_loading||"Laden...";},ooi_iw_wait_html:function(){return alp._gmap2_3.cluster.i18n.ooi_iw_loading||"Laden...";},iw_domnode_customconnect:null,img_default_domain:alp.cfg.url.img_default_domain(),gmapSt:null,manualooivis_st:null,updateVisibleIds_st:null,updateVisibleIds_mindelay_ms:500,updateAllIds_st:null,updateAllIds_mindelay_ms:500,boundsIds_st:null,boundsVisibleIds_st:null,allIds_st:null,constructor:function(_99c,_99d,opts){var me=this;alp.util.conlog(CN+".constructor() started.");me.active_st=new alp.data.BoolState({init_value:!alp.at(opts,"init_inactive")});me.active_st.changed_cb(me,"_update_visibility");me._get_polylineview_dfrd=alp.util.cache_transform(me._get_polylineview_dfrd);dojo.mixin(me,opts);if(me.infoWin_cluster==null){me.infoWin_cluster=!me.clusterPopup;}me.model=_99c;me.gmapSt=_99d;me._gmapEh=new alp.util.Eh();me.gmapSt.changed_cb(function(){me.reinitGmap();});me.single_ooi_marker_opts=alp._gmap2_3.marker_opts.ooi_single_default();me.manualooivis_st=new alp.data.BoolState({init_value:true});me.manualooivis_st.changed_cb(function(){me.update(CN+":manulooivis_st changed",true);});me.updateVisibleIds_st=new alp.data.BoolState({init_value:false});me.boundsIds_st=new alp.data.SortedArrayState({init_value:[]});me.boundsVisibleIds_st=new alp.data.SortedArrayState({init_value:[]});me.updateAllIds_st=new alp.data.BoolState({init_value:false});me.allIds_st=new alp.data.SortedArrayState({init_value:[]});var m_st=me.model.updateVisibleIds_st;m_st&&me.updateVisibleIds_st.bind_to(m_st);var _99e=me.model.updateAllIds_st;_99e&&me.updateAllIds_st.bind_to(_99e);dojo.connect(me.model,"changed",me,dojo.hitch(me,me.update,"model changed",true));dojo.connect(me.model,"alreadyloaded",me,dojo.hitch(me,me.update,"model alreadyloaded",true));alp.m(me.model.allIds_st,"bind_to",me.allIds_st,{delay_ms:me.updateAllIds_mindelay_ms});me.reinitGmap();me._view_cluster_loading(false);if(me.cluster_wait_q){dojo.connect(me.model,"cluster_loading_stops",dojo.hitch(me,"_view_cluster_loading",false));dojo.connect(me.model,"cluster_loading_starts",dojo.hitch(me,"_view_cluster_loading",true));}if(me.catSelStr_init){me.getSelectionDfrd().then(function(){me.setCatSelStr(me.catSelStr_init);});}alp.util.conlog(CN+".constructor() finished.");},setMap:function(gmap){this.gmapSt.set(gmap);},getMap:function(){return this.gmapSt.get();},reinitGmap:function(_99f){var me=this,_9a0=me._lastReinitGmap,gmap=me.gmapSt.get();me.clear_tour_overlays();if(gmap===_9a0){return;}me._lastReinitGmap=gmap;if(_9a0){AG.iwCloseAll(_9a0);}me._gmapEh.eh_clear();if(gmap){me._gmapEh.eh_push(AG.event("addListener")(gmap,"clearoverlays",function(){console.log("clearoverlays");}),AG.event("removeListener"));me._gmapEh.eh_push(AG.event("addListener")(gmap,"clearoverlays",alp.util.asyncHitch("update",me,0,"gmap clearoverlays",true)),AG.event("removeListener"));}if(!_99f){this._update_visibility();this.update(CN+".reinitGmap("+_99f+")",true);}},_view_cluster_loading:function(_9a1){dojo.query(this.cluster_wait_q).style("display",this.cluster_wait_display[_9a1?1:0]);},set_active:function(_9a2){this.active_st.set(_9a2);},_update_visibility:function(){var _9a3=this.declaredClass+"._update_visibility()",me=dojo.getObject("_instanced.set_active",true,this),gmap=this.gmapSt.get(),_9a4=gmap&&this.active_st.get();this._view_cluster_loading(this.model.is_cluster_loading());if(_9a4){this.showhide_tour_overlays(true);this.setUpdateActive(_9a3,true,true);this.update(_9a3,true);return;}this.showhide_tour_overlays(false);this.setUpdateActive(_9a3,false);if(this._mapqueue){this._mapqueue.clear();}},is_active:function(){return this.active_st.get();},gmap_ind_str:function(){return this._mapqueue&&this._mapqueue.gmap_ind_str();},update_later:function(_9a5,_9a6,_9a7){var _9a8="_update_later_impl";this[_9a8]||(this[_9a8]=AU.ratelimit_fun(-125,this,this.update));alp.util.asyncHitch(_9a8,this,_9a5)(_9a6,_9a7);},updateImpl:function(_9a9){var me=this;if(!me.is_active()){return;}if(djConfig.isDebug>1){var _9aa=(new Date()).getTime()/1000;console.group("ClusterView.updateImpl( "+_9a9+") "+_9aa);console.trace();}me._mapqueue||(me._mapqueue=_9ab());function _9ab(){var opts=alp.at(me,["gmapSt","marker_opts","single_ooi_marker_opts","img_default_domain"]);dojo.forEach(["on_cluster_click","on_cluster_mouseover","on_ooi_click","on_ooi_dblclick","on_ooi_marker_mouseover"],dojo.hitch(me,function(s){opts[s]=dojo.hitch(me,s);}));opts.selectionDfrd=me.getSelectionDfrd();return new alp._gmap2_3.ClusterViewQueue(opts);};var that=dojo.getObject("_instanced.updateImpl",true,me);var _9ac;var zoom;if(!me.isSelectionInitialized()){me._initSelection();}var gmap=me.gmapSt.get();if(!gmap){if(djConfig.isDebug>1){console.log("ClusterView.updateImpl(): !gmap  -> abort");console.groupEnd();}return;}var proj=AG.getProjection(gmap);if(proj){_9ac=gmap.getWorldBounds();zoom=gmap.getZoom();var pix1=AG.fromLatLngToPixel(proj,_9ac.getSouthWest(),zoom);var pix2=AG.fromLatLngToPixel(proj,_9ac.getNorthEast(),zoom);var _9ad=dojo.toJson({bounds:[pix1.x,pix1.y,pix2.x,pix2.y],zoom:zoom})+me.gmap_ind_str();if((!_9a9)&&that._last_loc_str&&(that._last_loc_str===_9ad)){if(djConfig.isDebug>1){console.log("ClusterView.updateImpl(): that._last_loc_str === loc_str  -> abort");console.groupEnd();}return;}that._last_loc_str=_9ad;}if(me.catSelCookie&&(!me._catSelCookieRead)){var str=dojo.cookie(me.catSelCookieName);alp.util.console(1,"log","-------------------------------------------------- clusterview got cookie:",str);if(str){me.setCatSelStr(str,false);}me._catSelCookieRead=true;}if(me.catSelCookie&&me._catSelCookieRead){me._updateCatSelCookie();}alp.util.getDfrd(function(){return gmap.getWorldBounds()||undefined;}).then(function(_9ae){var ws={};ws.bounds=_9ae;ws.bounds_sw=_9ae.getSouthWest();ws.bounds_ne=_9ae.getNorthEast();ws.bounds_north=alp.util.angle_delta(ws.bounds_ne.lat(),0,180,90);ws.bounds_south=alp.util.angle_delta(ws.bounds_sw.lat(),0,180,90);ws.bounds_east=alp.util.angle_delta(ws.bounds_ne.lng(),0,360,180);ws.bounds_west=alp.util.angle_delta(ws.bounds_sw.lng(),0,360,180);ws.bounds_dateline_crossed=(ws.bounds_west>ws.bounds_east);ws.zoom=gmap.getZoom();ws.ntiles_zoom=Math.pow(2,ws.zoom);ws.npix_zoom=ws.ntiles_zoom*me.model.cfg.tile_size;AG.getProjectionDfrd(gmap).then(function(proj){alp.util.console(1,"log","ClusterView.updateImpl() effective start",ws.bounds,ws.zoom);ws.proj=proj;ws.dbg_t_out="";ws.dbg_t_node_write=alp.util.asyncHitch(function(a){ws.dbg_t_out+="\n"+a;},me,0);ws.dbg_t=function(){return (new Date()).getTime();};for(var a=0;a<100;a++){var f=me["_updateStep"+a];if(f){if(!alp.util.likeIE()){f.call(me,ws);}else{alp.util.asyncHitch(f,me,125)(ws);}}}alp.util.asyncHitch(function(){ws.dbg_t_node=dojo.byId("dbg_t_measure");if(!ws.dbg_t_node){return;}ws.dbg_t_node.innerHTML=ws.dbg_t_out;})();});});if(djConfig.isDebug>1){console.log("ClusterView.updateImpl(): done");console.groupEnd();}},_updateStep0:function(ws){if(ws.failed){return;}var me=this,_9af=ws.dbg_t();_9b0();if(!(ws.modelinfos&&ws.modelinfos.infos)){ws.failed=true;return false;}alp.util.console(1,"log","ws.infos:",ws.infos);var _9b1=ws.dbg_t();ws.dbg_t_node_write("<p>"+"dbg_t_end_0 - dbg_t_start_0: "+((_9b1-_9af)/1000)+" seconds."+"</p>");return true;function _9b0(){var gmap=ws.gmap=me.gmapSt.get(),gm=google.maps;if(!gmap){return;}ws.modelinfos=undefined;ws.infos=undefined;var sw=ws.bounds.getSouthWest();var ne=ws.bounds.getNorthEast();var _9b2=AG.fromLatLngToPixel(ws.proj,sw,ws.zoom);var _9b3=AG.fromLatLngToPixel(ws.proj,ne,ws.zoom);if(_9b3.x<_9b2.x){_9b3.x+=ws.npix_zoom;}var _9b4=gmap.getSize();alp.util.conlog("ClusterView: map_size:",_9b4);var size=new gm.Size(Math.min(ws.npix_zoom,_9b4.width*(1+me.extra_buffer*2)),Math.min(ws.npix_zoom,_9b4.height*(1+me.extra_buffer*2)));alp.util.conlog("ClusterView: size:",size);var _9b5=new gm.Size(Math.max(0,size.width-_9b4.width),Math.max(0,size.height-_9b4.height));alp.util.conlog("ClusterView: delta_size:",_9b5);var _9b6=new gm.Point(Math.round(_9b2.x-_9b5.width/2),Math.round(_9b2.y+_9b5.height/2));alp.util.conlog("ClusterView: pix_sw:"+_9b6);var _9b7=new gm.Point(Math.round(_9b3.x+_9b5.width/2),Math.round(_9b3.y-_9b5.height/2));alp.util.conlog("ClusterView: pix_ne:",_9b7.toString(),_9b7.x);ws.modelinfos=me.model.getInfos(_9b6.x,_9b6.y,_9b7.x,_9b7.y,ws.zoom,me.manualooivis_st.get());ws.infos=ws.modelinfos&&ws.modelinfos.infos;};},_updateStep1:function(ws){if(ws.failed){return;}var _9b8=ws.dbg_t(),AU=alp.util,bcc=ws.bounds_cat_count={},_9b9=ws.bounds_cat_ids={},_9ba=[],_9bb=[],_9bc=this._last_uvids,now=new Date(),_9bd=this.updateVisibleIds_st.get(),_9be=_9bc?(this.updateVisibleIds_mindelay_ms-(now-_9bc)):0,_9bf=_9be>0,_9c0=_9bd&&!_9bf,_9c1=ws.bounds_dateline_crossed,_9c2=ws.bounds_west,_9c3=ws.bounds_east,_9c4=ws.bounds_south,_9c5=ws.bounds_north;if(_9bd&&_9bf){this.update_later(100+_9be,"need_to_uvids  &&  uvids_too_early",true);}_9c6(null,ws.infos);if(_9c0){this._last_uvids=now;var _9c7=this.manualooivis_st.get();for(var _9c8 in _9b9){if(_9b9.hasOwnProperty(_9c8)){var _9c9=_9b9[_9c8];_9ba=_9ba.concat(_9c9);var _9ca=(_9c8===_99b),vis=_9ca?_9c7:this.isCategoryVisible(_9c8);if(vis){_9bb=_9bb.concat(_9c9);}}}_9ba.sort();_9bb.sort();}this.catCounted(ws.bounds_cat_count);if(_9c0){this.cat2idsCounted(_9b9);this.boundsIds_st.set(_9ba);this.boundsVisibleIds_st.set(_9bb);}var _9cb=ws.dbg_t();ws.dbg_t_node_write("<p>"+"dbg_t_end_1 - dbg_t_start_1: "+((_9cb-_9b8)/1000)+" seconds."+"</p>");function _9c6(x,o){if(!o){return;}if(!("c" in o&&"lat" in o&&"lng" in o&&"t" in o)){for(var k in o){if(o.hasOwnProperty(k)){_9c6(k,o[k]);}}return;}var lat=o.lat;if(lat<_9c4||_9c5<lat){return;}var lng=o.lng;if(_9c1){if(_9c3<lng&&lng<_9c2){return;}}else{if(lng<_9c2||_9c3<lng){return;}}var _9cc=o.t;if(bcc[_9cc]==null){bcc[_9cc]=0;}bcc[_9cc]+=o.c;var _9cd=_9c0&&o.idlist;if(_9cd){_9b9[_9cc]=(_9b9[_9cc]||[]).concat(_9cd);}};},_updateStep2:function(ws){if(ws.failed){return;}var _9ce=ws.dbg_t();dojo.hitch(this,function(){ws.groups={};var x,y,_9cf,_9d0,_9d1,info,a,b1,b2,b3,b4,e,f,g,h,o,_9d2=this.manualooivis_st.get();for(x in ws.infos){if(ws.infos.hasOwnProperty(x)){e=ws.infos[x];for(y in e){if(e.hasOwnProperty(y)){f=e[y];for(_9cf in f){if(f.hasOwnProperty(_9cf)){g=f[_9cf];for(_9d0 in g){if(g.hasOwnProperty(_9d0)){h=g[_9d0];for(_9d1 in h){if(h.hasOwnProperty(_9d1)){var _9d3=(_9d1===_99b),vis=_9d3?_9d2:this.isCategoryVisible(_9d1);if(vis){if(!_9d3&&this._selection){if(this._selection[_9d1]==null){if(djConfig.isDebug>1){console.error("clusterview.js: updateImpl: Unknown category catid",_9d1," in this._selection:",this._selection);}continue;}}for(a=h[_9d1].length;a--;){info=h[_9d1][a];if(info.ismanualooi){if(!_9d2){continue;}}b1=ws.groups[x]||(ws.groups[x]={});b2=b1[y]||(b1[y]={});b3=b2[_9cf]||(b2[_9cf]={});b4=b3[_9d0]||(b3[_9d0]=[]);b4.push(info);}}}}}}}}}}}}})();alp.util.console(1,"log","ws.groups:",ws.groups);var _9d4=ws.dbg_t();ws.dbg_t_node_write("<p>"+"dbg_t_end_2 - dbg_t_start_2: "+((_9d4-_9ce)/1000)+" seconds."+"</p>");},_updateStep3:function(ws){if(ws.failed){return;}var _9d5=ws.dbg_t();dojo.hitch(this,function(){var gmap=ws.gmap;ws.merged_groups={};ws.msub_arr=[];var e,f,g,h,o,x,y,_9d6,_9d7;for(x in ws.groups){if(ws.groups.hasOwnProperty(x)){e=ws.groups[x];for(y in e){if(e.hasOwnProperty(y)){f=e[y];for(_9d6 in f){if(f.hasOwnProperty(_9d6)){g=f[_9d6];for(_9d7 in g){if(g.hasOwnProperty(_9d7)){h=g[_9d7];if(h.length>0){o=this._merge_groups(h,ws.zoom,ws.proj,ws.ntiles_zoom);this._put_group(ws.merged_groups,o,ws.proj,ws.ntiles_zoom);ws.msub_arr.push(o);}}}}}}}}}})();var _9d8=ws.dbg_t();ws.dbg_t_node_write("<p>"+"dbg_t_end_3 - dbg_t_start_3: "+((_9d8-_9d5)/1000)+" seconds."+"</p>");},_updateStep4:function(ws){if(ws.failed){return;}var _9d9=ws.dbg_t(),me=this;ws.do_merge=alp.util.fun_or_not(me.do_merge,ws.zoom);ws.cluster_min_dist_pix=alp.util.fun_or_not(me.cluster_min_dist_pix,ws.zoom);alp.util.console(1,"log","ws.do_merge: "+ws.do_merge);doit();alp.util.console(1,"log","ws.merged_groups:",ws.merged_groups);var _9da=ws.dbg_t();ws.dbg_t_node_write("<p>"+"dbg_t_end_4 - dbg_t_start_4: "+((_9da-_9d9)/1000)+" seconds."+"</p>");function doit(){if(!ws.do_merge){return;}var _9db=Math.pow(2,ws.zoom);var tsub=me.model.cfg.tile_sublevels;var _9dc=Math.pow(2,tsub);var _9dd=me.model.cfg.tile_size;var _9de=_9dd/_9dc;var _9df=ws.cluster_min_dist_pix*ws.cluster_min_dist_pix;var _9e0=new dojox.collections.ArrayList(ws.msub_arr);_9e0.sort(function(o1,o2){return o2.c-o1.c;});_9e0.forEach(_9e1);function _9e1(o){var e=me._get_group(ws.merged_groups,o);if(e){var _9e2=[];var _9e3=_9db<2;for(var a=-1;a<2;a++){for(var b=-1;b<2;b++){if((a===0)&&(b===0)){continue;}var f=me.model.tile_subtile_neighbor(e.x,e.y,e.sub_x,e.sub_y,a,b,_9db);var g=me._get_group(ws.merged_groups,f);if(g){if(alp.util.gpoint_d2(e.pix,g.pix)<_9df){if(!_9e3||0>dojo.indexOf(_9e2,g)){_9e2.push(g);}}}}}if(_9e2.length>0){var h=[e].concat(_9e2);var _9e4=me._merge_groups(h,ws.zoom,ws.proj,ws.ntiles_zoom);dojo.forEach(h,function(g){ws.merged_groups[g.x][g.y][g.sub_x][g.sub_y]=null;});me._put_group(ws.merged_groups,_9e4,ws.proj,ws.ntiles_zoom);}}};};},_updateStep6:function(ws){if(ws.failed){return;}var _9e5=ws.dbg_t();alp.util.console(1,"log","ClusterView display update --> this._mapqueue.update_rectangle_later(...) ");dojo.hitch(this,function(){this._mapqueue.update_rectangle_later(ws.zoom,ws.modelinfos,this.model.cfg.tile_sublevels,ws.merged_groups,ws);})();alp.util.console(1,"log","ClusterView.updateImpl() end");var _9e6=ws.dbg_t();ws.dbg_t_node_write("<p>"+"dbg_t_end_6 - dbg_t_start_6: "+((_9e6-_9e5)/1000)+" seconds."+"</p>");},_merge_groups:function(h,zoom,gp,_9e7){if(_9e7===undefined){_9e7=Math.pow(2,zoom);}var _9e8=0,_9e9=[],lat=[],lng=[],_9ea=[],info,_9eb=[];for(var a=h.length;a--;){info=h[a];if(!info){continue;}if(info.info_array){_9ea=_9ea.concat(info.info_array);if(info.unmergeable_array){_9eb=_9eb.concat(info.unmergeable_array);}}else{if(info.isUnmergeable){_9eb.push(info);continue;}else{_9ea.push(info);}}_9e9.push(info.c);lat.push(info.lat);lng.push(info.lng);_9e8+=info.c;}var m,pix,_9ec,_9ed;if(!(_9e8>0)){if(_9eb.length>0){var _9ee=_9eb[0];_9ec=_9ee.lat;_9ed=_9ee.lng;}}else{if(!alp.util.likeIE()){_9ec=alp.util.angle_wmean(lat,_9e9);_9ed=alp.util.angle_wmean(lng,_9e9);}else{_9ec=alp.util.mean(lat);_9ed=alp.util.mean(lng);}}pix=AG.fromLatLngToPixel(gp,new google.maps.LatLng(_9ec,_9ed),zoom);m=this.model.tile_subtile(pix,_9e7);var o={info_array:_9ea,c:_9e8,lat:_9ec,lng:_9ed,pix:pix,zoom:zoom,x:m.x,y:m.y,sub_x:m.sub_x,sub_y:m.sub_y,unmergeable_array:_9eb};return o;},_get_group:function(_9ef,o){var e=_9ef[o.x];if(!e){return undefined;}var f=e[o.y];if(!f){return undefined;}var g=f[o.sub_x];if(!g){return undefined;}var h=g[o.sub_y];if(!h){return undefined;}return h;},_put_group:function(_9f0,o,gp,_9f1){var o_x=o.x,o_y=o.y,_9f2=o.sub_x,_9f3=o.sub_y,e=_9f0[o_x]||(_9f0[o_x]={}),f=e[o_y]||(e[o_y]={}),g=f[_9f2]||(f[_9f2]={}),old=g[_9f3],h;if(!old){g[_9f3]=o;return;}if(o.zoom!==old.zoom){console.error("Inconsistent zoom levels! o:",o,", old:",old);g[_9f3]=o;return;}g[_9f3]=this._merge_groups([old,o],o.zoom,gp,_9f1);},on_ooi_dblclick:function(_9f4,info){alp.util.conlog("on_ooi_dblclick",_9f4,info);},on_ooi_click:function(_9f5,info){var me=dojo.getObject("_instanced.on_ooi_click",true,this);me._lastTime=(new Date()).getTime();alp.util.asyncHitch("_on_ooi_click",this,this.dblClickMs,_9f5,info,me._lastTime)();},_on_ooi_click:function(_9f6,info,time){var you=dojo.getObject("_instanced.on_ooi_click",true,this);var gmap=_9f6._alpGmap;if(!gmap){console.error(CN+"._on_ooi_click(): missing marker._alpGmap on marker:",_9f6);return;}if(you._lastTime>time){you._lastTime++;gmap.setCenter(_9f6.getPosition());var z=gmap.getZoom();alp.util.asyncHitch("setZoom",gmap,0,z+1)();return;}alp.util.conlog("on_ooi_click: this:",this,", marker:",_9f6,", info:",info);if(info.c!==1){console.error("clusterview.js _on_ooi_click: wrong info.c != 1",info);return;}if(!info.id){info=dojo.delegate(info,{id:info.idlist[0]});}if(!info.id){console.error("ClusterView:_on_ooi_click: could not extract the OOI id!");return;}if(this.infoWin_ooi){this.openInfoWindowOOI(info,gmap,_9f6.getPosition());}else{if(info.id){this._ooi_clicked(info.id);}}},openInfoWindowOOI:function(info,gmap,_9f7,opt){if(typeof info==="string"){info={id:info};}var me=this,ret=new alp.util.SafeDeferred();gmap=gmap||me.gmapSt.get();if(!gmap){return;}if(_9f7){me._prepareGmapForInfo(_9f7,gmap);me.openInfoWindow(gmap,_9f7,me.ooi_iw_wait_html,me.infoWinOpts);}var _9f8=alp.at(opt,"html_source")||function(_9f9,data){return function(_9fa){me.model.get_ooi_iw(info,_9fa);};};var _9fb=function(_9fc,data){_9f8(_9fc,data)(function(html){me._prepareGmapForInfo(_9fc,gmap);alp.util.asyncHitch(function(){me.openInfoWindow(gmap,_9fc,html,me.infoWinOpts);ret.callback(true);})();});};if(_9f7){_9fb(_9f7);}else{(new alp.data.SingleOOI(info.id,opt)).load(function(data){var geom=alp.data.ooi_geometry(data);geom&&_9fb(new google.maps.LatLng(geom.y,geom.x),data);});}return ret;},openInfoWindow:function(gmap,_9fd,_9fe,opts){var _9ff=alp.util.fun_or_not(_9fe);if(!gmap){throw new Error(CN+".openInfoWindow: missing gmap parameter!");}AG.iwCloseAll(gmap);var self=this,_a00=alp._gmap2_3.iw_domnode_geomconnect(_9ff,function(id,_a01,_a02){self._ooi_clicked(id,_a01,_a02);},function(id,_a03,_a04){self.on_ooi_mouseover(id,_a03,_a04);}),_a05=dojo.create("div",{className:self.info_window_cont_class});var a=self.iw_domnode_customconnect;if(a){a=typeof a==="function"?[a]:a;dojo.forEach(a,function(f){f.call(self,_a00);});}_a05.appendChild(_a00);alp._gmap2_3.iwOpen(gmap,_9fd,_a05,opts);},on_ooi_marker_mouseover:function(_a06,info){alp.util.conlog("on_ooi_mouseover: this:",this,", marker:",_a06,", info:",info);if(this._last_ooi_marker_mouseover===_a06){return;}this._last_ooi_marker_mouseover=_a06;if(info.c!==1){console.error("clusterview.js : on_ooi_marker_mouseover: wrong info.c != 1",info);this.on_ooi_mouseover();return;}if(this.dynamicTooltip){var id=AU.fun_or_not(info.id);this.model.load_OOIs([id]).then(_a07);}this.on_ooi_mouseover(info.id);function _a07(_a08){var one=alp.data.single_ooi(_a08,id),_a09=AU.get_property(one,"data.title");if(_a09){_a06.setTitle(_a09);}};},showhide_tour_overlays:function(_a0a){this._touroverlays().forEach(function(map,_a0b){_a0b.setMap(_a0a?map:null);});},clear_tour_overlays:function(){var me=this;me.showhide_tour_overlays(false);me._touroverlays().clear();},_touroverlays:function(){var ret=alp.util.mapany();return (this._touroverlays=function(){return ret;})();},on_ooi_mouseover:function(id,_a0c){id=alp.util.fun_or_not(id);var me=dojo.getObject("_instanced.on_ooi_mouseover",true,this);if(me._last_id===id){return;}me._last_id=id;if(!id){this.clear_tour_overlays();return;}if(this.polymouseover){var _a0d=dojo.hitch(this,function(_a0e){var gmap=this.gmapSt.get();if(!gmap){return;}this.clear_tour_overlays();_a0e.setMap(gmap);this._touroverlays().set(_a0e,gmap);});this._get_polylineview_dfrd(id).addCallback(_a0d);}},_get_polylineview_dfrd:function(id){var me=this,ret=new alp.util.SafeDeferred();me.model.get_ooi_geometry({id:id,simplified:true},function(json){var _a0f,_a10=id+".clusterview_geom_simplified_coord",db=alp.db.common();if(typeof json==="string"){json=dojo.fromJson(json);}if((!json.coordinates)&&json.tour&&json.tour){json.coordinates=json.tour.coordinates||(json.tour.encPolyline&&AG.decodePolyline(json.tour.encPolyline).xy);}_a0f=json.coordinates;var n=me.dataTourMaxPoints,pa=me.dataTourMaxPointsPropAngle;if(n&&_a0f){_a0f=alp.util.simplifyGeom(_a0f,n,pa);}db.getset(_a10,_a0f);var path=dojo.map(_a0f,function(c){return new google.maps.LatLng(c[1],c[0]);}),opt=dojo.mixin({path:path},me.lineOptions),_a11=AG.polyline_gen(opt);ret.callback(_a11);});return ret;},_prepareGmapForInfo:function(_a12,gmap){gmap=gmap||_a12._alpGmap;if(!this.clusterPopup){var c=alp.m(_a12,"getPosition")||_a12,proj=AG.getProjection(gmap);if(proj){var z=gmap.getZoom(),pix=AG.fromLatLngToPixel(proj,c,z),_a13=this.info_window_gmap_shift(gmap,pix.x,pix.y);c=AG.fromPixelToLatLng(proj,_a13,z);}gmap.setCenter(c);}},on_cluster_click:function(_a14){var me=dojo.getObject("_instanced.on_cluster_click",true,this);me._lastTime=(new Date()).getTime();alp.util.asyncHitch("_on_cluster_click",this,this.dblClickMs,_a14,me._lastTime)();},_on_cluster_click:function(_a15,time){var you=dojo.getObject("_instanced.on_cluster_click",true,this);if(!_a15){return;}if(you._lastTime>time){you._lastTime++;var gmap=_a15._alpGmap;gmap.setCenter(_a15.getPosition());var z=gmap.getZoom();alp.util.asyncHitch("setZoom",gmap,0,z+1)();return;}var _a16=_a15._alpInfoArray;if((!_a16)||(!_a16.length)||(_a16.length<1)){console.error("clusterview.js  on_cluster_click: missing _alpInfoArray field!");return;}alp.util.conlog("on_cluster_click: this:",this,", marker:",_a15,", infoArray:",_a16);if(!this.infoWin_cluster){return;}alp.util.conlog("ClusterView infoArray",_a16);this._prepareGmapForInfo(_a15);this.openInfoWindow(_a15._alpGmap,_a15.getPosition(),this.cluster_iw_wait_html,this.infoWinOpts);this.infoArray_fetch_visible_cb(_a16,this,function(json,_a17){alp.util.conlog("clusterview.js  content received: json:",json);var _a18=-Infinity;var rx=/\"\s*width:\s*\d+\s*px\s*\"/g;var rx2=/\d+/;var html="";dojo.forEach(json,dojo.hitch(this,function(a){if(!this.isCategoryVisible(a.t)){return;}html+=a.html;dojo.forEach(a.html.match(rx),function(s){try{var w=parseInt(s.match(rx2)[0],10);if((!isNaN(w))&&isFinite(w)){_a18=Math.max(_a18,w);}}catch(e){}});}));var s="";s+="<div style=\"overflow-y:"+(alp.util.likeIE()?"scroll":"auto")+"; overflow-x: hidden; max-height: "+this.cluster_iw_height+";";s+="width:350px; position: relative\" >"+"<div style=\"height: 8px;\"></div>"+html+"</div>";if(!_a15._alpGmap){return;}this._prepareGmapForInfo(_a15);setTimeout(dojo.hitch(this,function(){this.openInfoWindow(_a15._alpGmap,_a15.getPosition(),s,this.infoWinOpts);}),0);});},infoArray_fetch_visible_idlist_cb:function(_a19,_a1a){var cb=dojo.hitch.apply(dojo,[].slice.call(arguments,1)),_a1b=this.clusteriwlist_visible(_a19),_a1c=_a1b.idlist.concat(dojun.map(_a1b.manual_qtidlist,"x->x[1]")),_a1d=_a1b.qttypelist;if(_a1c&&!(_a1d&&0<dojun.keys(_a1d).length)){cb(_a1c);return;}this.infoArray_fetch_visible_cb(_a19,function(data){cb(dojun.map(data,".id"));});},infoArray_fetch_visible_cb:function(_a1e,_a1f){var cb=dojo.hitch.apply(dojo,[].slice.call(arguments,1));this.model.get_cluster_iw(this.clusteriwlist_visible(_a1e),cb);},clusteriwlist_visible:function(_a20){var me=this,_a21={},_a22=[],_a23=[],_a24=me.manualooivis_st.get();dojo.forEach(_a20,_a25);return {qttypelist:_a21,idlist:dojo.map(_a22,alp.util.fun_or_not),manual_qtidlist:dojo.map(_a23,alp.util.fun_or_not)};function _a25(info){var _a26=_a24&&info.ismanualooi;if(!(_a26||me.isCategoryVisible(info.t))){return;}if(_a26){if(info.idlist){_a23=_a23.concat(dojo.map(info.idlist,function(id){return [info.qt,id];}));return;}if(info.id){_a23.push([info.qt,info.id]);return;}}else{if(info.idlist){_a22=_a22.concat(info.idlist);return;}if(info.id){_a22.push(info.id);return;}}alp.util.set_property(_a21,[info.qt,info.t],true);};},setAllCatVisible:function(_a27,_a28){if(!this._selection){this._initSelection();}if(!this._selection){console.error("clusterview.js setAllCatVisible( enabled:",_a27,"): this._selection initialisation failed.");return;}var s=this._selection,_a29=false;for(var _a2a in s){if(s.hasOwnProperty(_a2a)){if(s[_a2a].enabled===_a27){continue;}s[_a2a].enabled=_a27;_a29=true;if(!_a28){this._catSelChangedAsync(_a2a,s[_a2a].enabled);}}}if(_a29&&!_a28){this.update("ClusterView.setAllCatVisible("+_a27+","+_a28+")",true);}},setCatSelected:function(_a2b,_a2c,_a2d,_a2e){var _a2f=dojo.getObject("_instanced.updateImpl",true,this);if(djConfig.isDebug>2){console.group("clusterview.js setCatSelected( origin:",_a2b,"catid:",_a2c,", enabled:",_a2d,"): start.");}if(typeof _a2c!=="string"){_a2c=""+_a2c;}if(!this._selection){this._initSelection();}if(!this._selection){console.error("clusterview.js setCatSelected( origin:",_a2b,"catid:",_a2c,", enabled:",_a2d,"): this._selection initialisation failed.");if(djConfig.isDebug>2){console.groupEnd();}return;}if(!this._selection[_a2c]){console.error("clusterview.js setCatSelected( origin:",_a2b,"catid:",_a2c,", enabled:",_a2d,"): this._selection[ "+_a2c+" ] is undefined.");if(djConfig.isDebug>2){console.groupEnd();}return;}if(this._selection[_a2c].enabled!==_a2d){this._selection[_a2c].enabled=_a2d;this._catSelChangedAsync(_a2c,this._selection[_a2c].enabled);if(djConfig.isDebug>2){console.group("ClusterView.setCatSelected: update children");}var cs=this._selection[_a2c].children;for(var x in cs){if(cs.hasOwnProperty(x)){if(djConfig.isDebug>2){console.log("child x:",x);}this.setCatSelected("ClusterView.setCatSelected(origin:"+_a2b+") - updateChildren",x,_a2d,true);}}if(djConfig.isDebug>2){console.groupEnd();}if(djConfig.isDebug>2){console.group("ClusterView.setCatSelected: update parents");}var _a30=this._selection[_a2c];var _a31;while((_a31=_a30.parent)){if(djConfig.isDebug>2){console.log("parent_id:",_a31);}_a30=this._selection[_a31];var _a32=false;for(var c in _a30.children){if(_a30.children.hasOwnProperty(c)){_a32=_a32||this._selection[c].enabled;if(_a32){break;}}}if(djConfig.isDebug>2){console.log("parent_id:",_a31," -> ",_a32,_a30.enabled);}if(_a32!==_a30.enabled){_a30.enabled=_a32;_a2f._last_loc_str=null;if(djConfig.isDebug>2){console.log("parent_id:",_a31,", newState:",_a32,", current.enabled:",_a30.enabled,"this._selection[ parent_id ].enabled:",this._selection[_a31].enabled);}this._catSelChangedAsync(_a31,this._selection[_a31].enabled);}}if(djConfig.isDebug>2){console.groupEnd();}if(!_a2e){this.update("ClusterView.setCatSelected("+_a2b+","+_a2c+","+_a2d+","+_a2e+")",true);if(this.catSelCookie){this._updateCatSelCookie();}}}if(djConfig.isDebug>2){console.groupEnd();}},isCategoryChecked:function(_a33){if(typeof _a33!=="string"){_a33=""+_a33;}if(!this._selection){this._initSelection();}if(!this._selection){return this.catSelDefault;}if(!this._selection[_a33]){return this.catSelDefault;}return this._selection[_a33].enabled;},isCategoryLeaf:function(_a34){if(!this._selection[_a34]){console.error("clusterview.js isCategoryLeaf( catid:",_a34," ): this._selection[ "+_a34+" ] is undefined.");return true;}return !this._selection[_a34].children;},isCategoryVisible:function(_a35){if(_a35===alp._gmap2_3.cluster.MANUALOOI_CATID){return this.manualooivis_st.get();}var ret=this.isCategoryChecked(_a35);if(ret&&this.catLeavesOnly&&this._selection[_a35]){ret=this.isCategoryLeaf(_a35);}return ret;},areAllCatVisible:function(){if(!this._selection){return true;}for(var _a36 in this._selection){if(this._selection.hasOwnProperty(_a36)){if(this.catLeavesOnly&&(!this.isCategoryLeaf(_a36))){continue;}if(!this.isCategoryChecked(_a36)){return false;}}}return true;},whichCatVisible:function(){if(!this._selection){this._initSelection();}var ret=[];for(var _a37 in this._selection){if(this._selection.hasOwnProperty(_a37)){if(this.isCategoryVisible(_a37)){ret.push(_a37);}}}return ret;},getParents:function(_a38){var o,sel=this.getSelection(),ret=[];_a38=_a38+"";o={parent:_a38};while(o.parent&&(o=sel&&sel[o.parent])&&o.parent){ret.unshift(o.parent);}return ret;},getSelection:function(){if(!this._selection){this._initSelection();}return this._selection;},getSelectionDfrd:function(){return this._selectionDfrd||(this._selectionDfrd=new alp.util.SafeDeferred());},_initSelection:function(){if(!this._selection){var cat=this.model.getCat();if(!cat){return undefined;}var _a39={},_a3a="children";alp.util.treeForEach(cat,_a3a,dojo.hitch(this,function(c,tree,_a3b){_a39[c]=dojun.filterIn(tree[c],function(v,k){return (k!==_a3a)||(dojun.keys(v).length>0);});_a39[c].enabled=this.catSelDefault;_a39[c].parent=_a3b;}));this._selection=_a39;this.getSelectionDfrd().callback(this._selection);this.getSelectionDfrd().addErrback(this,function(_a3c){console.error(this.declaredClass+"._initSelection() failed, results:",_a3c);});}},isSelectionInitialized:function(){return !!this._selection;},connectCheckbox:function(_a3d){if(djConfig.isDebug>1){console.group("ClusterView.connectCheckbox: ");console.log("checkbox:",_a3d);}var me=this;dojo.connect(_a3d,"_alpOnclick",this,function(e){if(djConfig.isDebug){console.log("clusterview.js  checkbox.onclick, checkbox:",_a3d,"checkbox.checked:",_a3d.checked);}var _a3e=dojo.attr(_a3d,"catid");var t=typeof _a3e;if((t==="number")||(t==="string")){_a3e=[_a3e];}var _a3f=true;dojo.forEach(_a3e,dojo.hitch(me,function(_a40){me.setCatSelected("ClusterView.connectCheckbox()",_a40,_a3d.checked,_a3f);}));me.update("ClusterView.connectCheckbox() after setCatSelected()",true);},true);alp.util.console(1,"log","ClusterView.connectCheckbox - middle: ",_a3d);var _a41=function(sel){var _a42=dojo.attr(_a3d,"catid");if(_a42){var t=typeof _a42;if((t==="number")||(t==="string")){_a42=[_a42];}if(_a42.length>0){for(var a=0,_a43=_a42.length;a<_a43;a++){var _a44=_a42[a],_a45=sel[_a44];if(_a45){(_a45.cblist||(_a45.cblist=[])).push(_a3d);}}}}return sel;};this.getSelectionDfrd().addCallback(_a41);if(djConfig.isDebug>1){console.groupEnd();}},_updateCatSelCookie:function(){var _a46=dojo.cookie(this.catSelCookieName);dojo.cookie(this.catSelCookieName,this.getCatSelStr(),this.catSelCookieOpt);var _a47=this.getCatSelCookie();alp.util.conlog("clusterview current catselcookie:",_a47);if(_a46!==_a47){this._catSelCookieChangedAsync(_a47);}},getCatSelCookie:function(){return dojo.cookie(this.catSelCookieName);},getCatSelStr:function(){return alp.util.iawEncode(dojo.map(this._getSelectionCatidSorted(),function(_a48){return this.isCategoryChecked(_a48)?1:0;},this));},setCatSelStr:function(str,_a49){if(!str){return;}var b=alp.util.iawDecode(str);var a=this._getSelectionCatidSorted();if(a.length!==b.length){console.warn("clusterview setCatSelStr error",a.length,b.length);return;}var cmax=Math.min(a.length,b.length);for(var c=0;c<cmax;c++){var _a4a=a[c];if((!this.catLeavesOnly)||this.isCategoryLeaf(_a4a)){this.setCatSelected("ClusterView.setCatSelStr()",_a4a,!!b[c],true);}}if(!_a49){this.update(CN+".setCatSelStr(\""+str+"\", "+_a49+")",true);}},_getSelectionCatidSorted:function(){var _a4b=new dojox.collections.ArrayList();var _a4c;for(_a4c in this._selection){if(this._selection.hasOwnProperty(_a4c)){_a4b.add(_a4c);}}_a4b.sort();return _a4b.toArray();},catSelChanged:function(_a4d,_a4e){this.getSelectionDfrd().addCallback(function(sel){var _a4f=sel[_a4d].cblist||[];dojo.forEach(_a4f,function(cb){cb.checked=_a4e;});return sel;});},catCounted:function(_a50){},cat2idsCounted:function(_a51){},catSelCookieChanged:function(_a52){},ooi_clicked:function(id,_a53){},_catSelChangedAsync:alp.util.asyncHitch("catSelChanged"),_catCounted:alp.util.asyncHitch("catCounted"),_catSelCookieChangedAsync:alp.util.asyncHitch("catSelCookieChanged"),_ooi_clicked:alp.util.asyncHitch("ooi_clicked")});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.cluster.cluster_controller"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.cluster.cluster_controller"]=true);dojo.provide("alp._gmap2_3.cluster.cluster_controller");(function(){var AG=alp._gmap2_3,CN="alp._gmap2_3.ClusterController";dojo.declare(CN,[alp.util.Updater],{default_model_ctor:alp._gmap2_3.ClusterModel,default_model_opts:{},default_view_ctor:alp._gmap2_3.ClusterView,default_view_opts:{},constructor:function(gmap,_a54,opts){var me=this;me.url_or_source=_a54;me.marker_opts=(opts&&opts.marker_opts);me.model_ctor=(opts&&opts.model_ctor)||me.default_model_ctor;me.model_opts=dojo.mixin({},(opts&&opts.model_opts)||me.default_model_opts);me.view_ctor=(opts&&opts.view_ctor)||me.default_view_ctor;me.view_opts=dojo.mixin({},(opts&&opts.view_opts)||me.default_view_opts,{init_inactive:opts&&opts.init_inactive});me.gmapSt=(gmap instanceof alp.data.State)?gmap:new alp.data.State({init_value:gmap});me._gmapEh=new alp.util.Eh();me.gmapSt.changed_cb(function(){me.reinitGmap();});var s=typeof _a54;if(s=="object"){me._init(_a54);}else{if(s=="string"){dojo.xhrGet({url:_a54,handleAs:"json",load:dojo.hitch(me,me._init)});}else{throw new Error("Invalid type "+s);}}},_init:function(_a55){alp.util.conlog("--==================== clustercontroller init started --"+_a55);var me=this;me._cfg=_a55;me._model=new me.model_ctor(dojo.mixin({},me._cfg,me.model_opts));dojo.forEach(["manual_ooi_ids_changed","cluster_loading_starts","cluster_loading_stops"],function(_a56){dojo.connect(me._model,_a56,me,"_"+_a56);});me._view=new me.view_ctor(me._model,me.gmapSt,me.view_opts);me.reinitGmap(true);me.modelDfrd().callback(me._model);me.viewDfrd().callback(me._view);me.update(CN+"._init("+_a55+")");alp.util.conlog("--==================== clustercontroller init finished --");},init_dfrd:function(){return this.viewDfrd();},init_cb:alp.util.dfrd_cb("init_dfrd"),setMap:function(gmap){this.gmapSt.set(gmap);},getMap:function(){return this.gmapSt.get();},reinitGmap:function(_a57){var me=this,gmap=me.gmapSt.get(),gm=google.maps;if(gmap===me._lastReinitGmap){return;}me._lastReinitGmap=gmap;me._gmapEh.eh_clear();if(!gmap){return;}me._gmapEh.eh_push(AG.event("addListener")(gmap,"bounds_changed",alp.util.asyncHitch(function(){me.update("gmap moveend");},me)),AG.event("removeListener"));if(!_a57){this.update(CN+".reinitGmap()",undefined,true);}},set_active:function(_a58){var _a59=_a58&&(!this.is_active());this.viewDfrd().addCallback(this,function(view){view.set_active(_a58);if(_a59){view.setUpdateActive("clustercontroller.set_active",true,true);this.setUpdateActive("clustercontroller.set_active",true,true);this.update();this._is_active_changed();}});},is_active:function(){var ret=this._view&&this._view.is_active();if(djConfig.isDebug>1){console.log("---------- "+this.declaredClass+".is_active(): returning: "+ret);}return ret;},active_st_dfrd:function(){var ret=new alp.util.SafeDeferred();this.view_cb(function(view){ret.callback(view.active_st);});return (this.active_st_dfrd=function(){return ret;})();},active_st_cb:alp.util.dfrd_cb("active_st_dfrd"),getCat:function(){return this._model&&this._model.getCat();},setAllCatVisible:function(_a5a,_a5b){this.view_cb(function(view){view.setAllCatVisible(_a5a,_a5b);});},setCatSelected:function(_a5c,_a5d){if(djConfig.isDebug){console.group("ClusterController.setCatSelected( "+_a5c+","+_a5d+")");}var ret=this._view&&this._view.setCatSelected("ClusterController.setCatSelected()",_a5c,_a5d);if(djConfig.isDebug){console.log("ClusterController.setCatSelected( "+_a5c+","+_a5d+") returning ret:",ret);console.groupEnd();}return ret;},setSelection:function(_a5e){this._selection=_a5e;this.update(CN+".setSelection("+_a5e+")");},getSelection:function(){return this._view&&this._view.getSelection();},isSelected:function(c){var a=this.getSelection();return a&&a[c]&&a[c].enabled;},modelDfrd:function(){return (this._modelDfrd=this._modelDfrd||new alp.util.SafeDeferred());},model_cb:function(){var dfrd=this.modelDfrd();dfrd.addCallback.apply(dfrd,arguments);},viewDfrd:function(){return (this._viewDfrd=this._viewDfrd||new alp.util.SafeDeferred());},view_cb:function(){var dfrd=this.viewDfrd();dfrd.addCallback.apply(dfrd,arguments);},infoArray_fetch_visible_idlist_cb:function(_a5f,_a60){var args=arguments;this.view_cb(function(view){view.infoArray_fetch_visible_idlist_cb.apply(view,args);});},set_manual_ooi_vis:function(_a61){this.view_cb(function(view){view.manualooivis_st.set(_a61);});},get_manual_ooi_vis:function(){var view=this._view;return view&&view.manualooivis_st.get();},add_manual_oois:function(arr){this.model_cb(function(_a62){_a62.add_manual_oois(arr);});},remove_manual_oois:function(_a63){this.model_cb(function(_a64){_a64.remove_manual_oois(_a63);});},get_manual_ooi_ids:function(){var _a65=this._model;return (_a65&&_a65.get_manual_ooi_ids())||[];},setDataPointIcon:function(_a66,_a67){this.model_cb(function(_a68){_a68.setDataPointIcon(_a66,_a67);});},unsetDataPointIcon:function(_a69){this.model_cb(function(_a6a){_a6a.unsetDataPointIcon(_a69);});},setDataPointUnmergeable:function(_a6b,_a6c){this.model_cb(function(_a6d){_a6d.setDataPointUnmergeable(_a6b,_a6c);});},updateImpl:function(_a6e,_a6f){if(djConfig.isDebug){var _a70=alp.util.now_time();console.group(CN+".updateImpl() "+_a70);console.log(CN+".updateImpl() start",_a6e,", this:",this,", this && this.declaredClass:",this&&this.declaredClass);}var me=this,that=dojo.getObject("_instanced.updateImpl",true,this);_a6e||(_a6e=that._last_loadOpts);that._last_loadOpts=_a6e;if(!me.is_active()){if(djConfig.isDebug){console.groupEnd();}return;}var gmap=me.gmapSt.get(),_a71=[gmap,me._model,me._view];if(!alp.util.and(_a71)){if(djConfig.isDebug){console.log("!all( [gmap:",gmap,", me._model:",me._model,", me._view:",me._view,"] )  -> abort");console.groupEnd();}return;}AG.getProjectionDfrd(gmap).then(function(proj){var _a72=gmap.getBounds(),sw=_a72.getSouthWest(),ne=_a72.getNorthEast(),zoom=gmap.getZoom(),_a73=me._view.getCatSelStr(),_a6e=that._last_loadOpts;alp.util.conlog(CN+".updateImpl() effective start",_a72,zoom);me._model.set_gproj(proj);proj=me._model.get_gproj();var _a74=AG.fromLatLngToPixel(proj,sw,zoom),_a75=AG.fromLatLngToPixel(proj,ne,zoom);if((!_a6f)&&me._eqLastUpdate(zoom,_a74,_a75,_a73,_a6e)){if(djConfig.isDebug){console.log("                Update already done");console.groupEnd();}return;}me._model.setLoadOpts(_a6e);me._model.update(CN+".updateImpl()",_a74.x,_a74.y,_a75.x,_a75.y,zoom);});if(djConfig.isDebug){console.log(CN+".updateImpl() end");console.groupEnd();}},_eqLastUpdate:function(zoom,_a76,_a77,_a78,_a79){var o=this._last;var _a7a=dojo.toJson(_a79);if(!this._model){return false;}var _a7b=Math.pow(2,zoom);var _a7c=dojo.map([_a76.x,_a76.y,_a77.x,_a77.y],function(a){return this._model.tileint(a,_a7b);},this);var gmap=this.gmapSt.get();if(o&&(o.zoom===zoom)&&(o.tile_bbox&&((o.tile_bbox[0]===_a7c[0])&&(o.tile_bbox[1]===_a7c[1])&&(o.tile_bbox[2]===_a7c[2])&&(o.tile_bbox[3]===_a7c[3])))&&(o.catselstr===_a78)&&(o.loadOptsStr===_a7a)&&(o.gmap===gmap)){return true;}o={};o.zoom=zoom;o.tile_bbox=_a7c;o.catselstr=_a78;o.loadOptsStr=_a7a;o.gmap=gmap;this._last=o;return false;},is_active_changed:function(){},manual_ooi_ids_changed:function(){},cluster_loading_starts:function(){},cluster_loading_stops:function(){},_is_active_changed:alp.util.asyncHitch("is_active_changed"),_manual_ooi_ids_changed:alp.util.asyncHitch("manual_ooi_ids_changed"),_cluster_loading_starts:alp.util.asyncHitch("cluster_loading_starts"),_cluster_loading_stops:alp.util.asyncHitch("cluster_loading_stops")});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.qt7bit.abstract_loader_all_ids"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.qt7bit.abstract_loader_all_ids"]=true);dojo.provide("alp._gmap2_3.qt7bit.abstract_loader_all_ids");(function(){var CN="alp._gmap2_3.qt7bit.AbstractLoaderAllIds",AGQ=alp._gmap2_3.qt7bit,_a7d={};dojo.declare(CN,null,{allIds_listen_once:function(_a7e){_a7f(this).add(_a7e);_a80(this);},allIds_drop:function(_a81){_a7f(this).remove(_a81);}});var _a82="_allIds_listener_once_set_instance";function _a7f(_a83){return _a83[_a82]||(_a83[_a82]=new alp.data.SetState({do_not_clone:true}));};function _a80(_a84){var ws=AGQ.WORLD_SPAN();if(_a84.isloaded(ws)){_a85(_a84);}else{_a86(_a84);_a84.load_all();}};function _a86(_a87){var s="_allIds_all_loaded_h";_a87[s]||(_a87[s]=dojo.connect(_a87,"all_chunks_loaded",function(){_a85(_a87);}));};function _a85(_a88){var _a89=_a7f(_a88),_a8a=_a89.get();if(!(0<_a8a.length)){return;}var o=_a88.get(AGQ.WORLD_SPAN(),true);var _a8b=[];for(var k in o){if(!(o in _a7d)){_a8b=_a8b.concat(o[k].get_all_ids());}}for(var i=_a8a.length;i--;){_a8a[i].set([].concat(_a8b));}_a89.set([]);};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.qt7bit.datapoint"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.qt7bit.datapoint"]=true);dojo.provide("alp._gmap2_3.qt7bit.datapoint");(function(){var CN="alp._gmap2_3.qt7bit.DataPoint",AG=alp._gmap2_3,AGQ=AG.qt7bit,ID=AGQ.ID,_a8c=AGQ.CATID,GEOM=AGQ.GEOM;dojo.declare(CN,null,{constructor:function(spec){if(!alp.util.and([ID,_a8c,GEOM],function(key){return key in spec&&spec[key]!=null;})){throw new Error(CN+"() requires all 3 values `"+ID+"`, `"+_a8c+"` and `"+GEOM+"`.");}this[ID]=spec[ID];this[_a8c]=spec[_a8c];this[GEOM]=AGQ.geom_2_bitstr(spec[GEOM]);},equals:function(_a8d){return 0===this.compareTo(_a8d);},compareTo:function(_a8e){var _a8f=this[GEOM],_a90=_a8e[GEOM];if(_a8f<_a90){return -1;}if(_a8f>_a90){return +1;}var _a91=this[ID],_a92=_a8e[ID];if(_a91<_a92){return -1;}if(_a91>_a92){return +1;}var _a93=this[_a8c],_a94=_a8e[_a8c];if(_a93<_a94){return -1;}if(_a93>_a94){return +1;}return 0;}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.qt7bit.chunk_extend_bitidcache"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.qt7bit.chunk_extend_bitidcache"]=true);dojo.provide("alp._gmap2_3.qt7bit.chunk_extend_bitidcache");(function(){var AG=alp._gmap2_3,AGQ=AG.qt7bit,GEOM=AGQ.GEOM,_a95=AGQ.CATID,ID=AGQ.ID;AGQ.chunk_extend_bitidcache=_a96;function _a96(_a97,cfg){var _a98=cfg.qt7bit_length,_a99=cfg.id_length;var _a9a=new alp.util.SafeDeferred();_a97.has_idcache=_a9b;_a97.ensure_idcache=_a9c;_a97.get_byid=_a9d;_a97.get_bybitid=_a9e;var _a9f={insert_in_bitidcache:_aa0,remove_from_bitidcache:_aa1};return _a9f;var _aa2;function _a9b(){return !!_aa2;};var _aa3;function _a9c(){if(_aa3){return _a9a;}_aa3=true;_aa9(_a97,cfg).then(function(_aa4){_aa2=_aa4;_a9a.callback(true);});return _a9a;};function _a9d(id){return _a9e(AGQ.int64str10_2_qt7bitstr(id),id);};function _a9e(_aa5,id){var o=_aa2[_aa5];if(!o){return;}var spec={};spec[_a95]=o[_a95];spec[GEOM]=o[GEOM];spec[ID]=id||AGQ.qt7bit_2_int64str10(_aa5);return new AGQ.DataPoint(spec);};function _aa1(_aa6){_a9a.then(function(){delete _aa2[_aa6];});};function _aa0(_aa7,_aa8,geom){_a9a.then(function(){var o={};o[_a95]=_aa8;o[GEOM]=geom;_aa2[_aa7]=o;});};};function _aa9(_aaa,cfg){var _aab=cfg.qt7bit_length,_aac=cfg.id_length;var ret=new alp.util.SafeDeferred(),_aad={},_aae=_aaa.cat_data,_aaf=dojun.keys(_aae),_ab0=_aaf.length,_ab1=0,c=0;_ab2();return ret;function _ab2(){var t=new Date(),_ab3=0;for(;_ab1<_ab0;_ab1++,c=0){var _ab4=_aaf[_ab1],x=_aae[_ab4],str=x.data;while(c<str.length){var _ab5=c+_aab,end=_ab5+_aac,geom=str.substring(c,_ab5),_ab6=str.substring(_ab5,end),o={};o[_a95]=_ab4;o[GEOM]=geom;_aad[_ab6]=o;c=end;if(!((++_ab3)&255)){var _ab7=new Date()-t;if(_ab7>129){return setTimeout(_ab2,90+_ab7);}}}}ret.callback(_aad);};};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.qt7bit.span"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.qt7bit.span"]=true);dojo.provide("alp._gmap2_3.qt7bit.span");(function(){var CN="alp._gmap2_3.qt7bit.Span",AG=alp._gmap2_3,AGQ=AG.qt7bit;AGQ.WORLD_SPAN=_ab8;function _ab8(_ab9){return new AGQ.Span(AGQ.ORIG_NW(_ab9).qt_str,AGQ.ORIG_SE(_ab9).qt_str);};dojo.declare(CN,null,{constructor:function(_aba,_abb){if(typeof _aba!=="string"){throw new Error(CN+".ctor failure on qt7bit_from: must be a string");}if(typeof _abb!=="string"){throw new Error(CN+".ctor failure on qt7bit_to: must be a string");}if(_aba.length!=_abb.length){throw new Error(CN+".ctor failure: qt7bit_from and qt7bit_to must have the same length");}if(!(_aba<=_abb)){throw new Error(CN+".ctor failure: qt7bit_from must be <= qt7bit_to");}this.from=_aba;this.to=_abb;},equals:function(_abc){return this.from===_abc.from&&this.to===_abc.to;},intersection:function(_abd){var _abe=this.from,t_to=this.to,_abf=_abd.from,o_to=_abd.to,_ac0=_abe>_abf?_abe:_abf,i_to=t_to<o_to?t_to:o_to;if(_ac0<=i_to){return new AGQ.Span(_ac0,i_to);}return null;},intersects:function(_ac1){var _ac2=this.from,t_to=this.to,_ac3=_ac1.from,o_to=_ac1.to,_ac4=_ac2>_ac3?_ac2:_ac3,i_to=t_to<o_to?t_to:o_to;return _ac4<=i_to;},is_a_single_point:function(){return this.from.length&&this.from===this.to;},lessthan:function(_ac5){return this.to<_ac5.from;},contains_one:function(_ac6){return this.from<=_ac6&&_ac6<=this.to;},from_latlng:function(){return AGQ.qt7bit_2_latlng(this.from);},to_latlng:function(){return AGQ.qt7bit_2_latlng(this.to);},from_arr:function(){return AGQ.bitstr_2_bitarr(this.from);},to_arr:function(){return AGQ.bitstr_2_bitarr(this.to);},from_dotstr:function(){return AGQ.bitdotstr(this.from);},to_dotstr:function(){return AGQ.bitdotstr(this.to);},from_int64str:function(){return AGQ.qt7bit_2_int64str10(this.from);},to_int64str:function(){return AGQ.qt7bit_2_int64str10(this.to);},to_center:function(){return this.to_bounds().getCenter();},to_bounds:function(){var nw=this.from_latlng(),se=this.to_latlng(),gm=google.maps;return new gm.LatLngBounds(new gm.LatLng(se.lat(),nw.lng()),new gm.LatLng(nw.lat(),se.lng()));},toString:function(){return CN+"(from:\""+this.from+"\" ("+this.from_latlng()+"), to:\""+this.to+"\" ("+this.to_latlng()+"))";}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.qt7bit.chunk_extend"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.qt7bit.chunk_extend"]=true);dojo.provide("alp._gmap2_3.qt7bit.chunk_extend");(function(){var AG=alp._gmap2_3,AGQ=AG.qt7bit,GEOM=AGQ.GEOM,_ac7=AGQ.CATID,ID=AGQ.ID;AGQ.chunk_extend=function(_ac8,_ac9){if(_ac8.no_data){throw new Error("alp._gmap2_3.qt7bit.chunk_extend() needs a final chunk of data, not a summary chunk.");}if(alp.util.and(["get_cat_span","search_span","decode_one"],function(s){return typeof _ac8[s]==="function";})){return _ac8;}var _aca=_ac8.qt_start.length,_acb=10,_acc=_aca+_acb;_acd();var _ace={};_acf();_ac8.add_datapoint=_ad0;_ac8.decode_one=_ad1;_ac8.get_all_ids=_ad2;_ac8.get_cat_span=_ad3;_ac8.get_datapoint=_ad4;_ac8.remove_datapoint=_ad5;_ac8.search_span=_ad6;var _ad7=AGQ.chunk_extend_bitidcache(_ac8,{qt7bit_length:_aca,id_length:_acb});return _ac8;var _ad8;function _ad2(){if(_ad8){return _ad8;}var ret=[],i=0;for(var _ad9 in _ace){if(_ace.hasOwnProperty(_ad9)){var c=_ace[_ad9],n=c.n;ret[i+n-1]=null;for(var j=n;j--;){ret[i++]=this.decode_one(_ad9,j).id();}}}return _ad8=ret;};function _ad3(_ada){var c=_ace[_ada];if(!c){return null;}if("span" in c){return c.span;}var n=c.n;if(!(n>0)){return c.span=null;}return c.span=new AGQ.Span(_ad1(_ada,0).qt7bit,_ad1(_ada,n-1).qt7bit);};function _ad4(_adb){var _adc=_adb[_ac7],geom=_adb[GEOM],id=_adb[ID],o=_ad6(_adc,new AGQ.Span(geom,geom));if(o){for(var i=o.first,_add=o.last;i<=_add;i++){var o=_ad1(_adc,i);if(o.id()===id){return {dataPoint:_adb};}}}return false;};function _ad5(_ade){var _adf=_ade[_ac7],geom=_ade[GEOM],id=_ade[ID],o=_ad6(_adf,new AGQ.Span(geom,geom));if(o){for(var i=o.first,_ae0=o.last;i<=_ae0;i++){var o=_ad1(_adf,i);if(o.id()===id){_ae1(_adf,i);return {dataPoint:_ade};}}}return false;};function _ad0(_ae2){var _ae3=_ae2[_ac7],geom=_ae2[GEOM],id=_ae2[ID],i=_ae4(_ae3,geom);_ae5(_ae3,i,geom,id);return {dataPoint:_ae2};};function _ad6(_ae6,_ae7,_ae8,last,_ae9){if(!(_ae6 in _ace)){return null;}var c=_ace[_ae6],_aea=(c.searcher||(c.searcher=_aeb(c)));return _aea.search(_ae7,_ae8,last,_ae9);};function _ad1(_aec,_aed){var c=_ace[_aec],_aee=c.decoded,ret=_aee[_aed];if(ret){return ret;}var arr=c.arr,x=arr[_aed];if(!x){var ia=_aed*_acc,ib=ia+_aca,ic=ib+_acb,s=c.s;x=arr[_aed]=[s.substring(ia,ib),s.substring(ib,ic)];}var _aef;return _aee[_aed]={catid:_aec,qt7bit:x[0],bitid:x[1],id:function(){return (_aef=_aef||AGQ.qt7bit_2_int64str10(x[1]));}};};function _acd(){var x;for(var _af0 in _ac8.cat_data){if(_ac8.cat_data.hasOwnProperty(_af0)){x=_ac8.cat_data[_af0];if(x.data.length!==x.n*_acc){throw new Error("qt7bit_chunk_extend:_sanity_check(): inconsistency detected!");}break;}}};function _acf(){var _af1=_ac8.cat_data;for(var _af2 in _af1){if(_af1.hasOwnProperty(_af2)){_af3(_af2);}}};function _af3(_af4){var _af5=_ac8.cat_data[_af4],n=_af5.n;_ace[_af4]={catobj:_af5,n:n,s:_af5.data,arr:new Array(n),decoded:new Array(n),searcher:null};};function _ae1(_af6,i){var _af7=_ac8.cat_data[_af6],_af8=i*_acc,end=(i+1)*_acc,_af9=_af7.data.substring(_af8+_aca,end);_ad7.remove_from_bitidcache(_af9);_af7.data=_af7.data.substring(0,_af8)+_af7.data.substring(end);_af7.n--;_ac8.n--;_af3(_af6);};function _ae4(_afa,geom){var _afb=_ac8.cat_data[_afa];if(!_afb){return 0;}var data=_afb.data,ret=0;for(var a=0;a<data.length;ret++,a+=_acc){if(geom<data.substring(a,a+_aca)){break;}}return ret;};function _ae5(_afc,i,geom,id){var _afd=_ac8.cat_data[_afc];if(!_afd){_afe(_afc);if(i!==0){throw new Error("chunk_extend: _insert_in_cat() found a bug!");}_afd=_ac8.cat_data[_afc];}var _aff=i*_acc,_b00=AGQ.int64str10_2_qt7bitstr(id);_afd.data=(_afd.data.substring(0,_aff)+geom+_b00+_afd.data.substring(_aff));_afd.n++;_ac8.n++;_af3(_afc);_ad7.insert_in_bitidcache(_b00,_afc,geom);};function _afe(_b01){if(_ac8.cat_data[_b01]){throw new Error("chunk_extend: _create_cat("+_b01+"): the chunk already has the category!");}_ac8.cat_data[_b01]={data:"",n:0};_af3(_b01);};function _aeb(c){var n=c.n,s=c.s,arr=c.arr,opt={};if(_ac9){opt.read_only_optim=_ac9;opt.data_compare_fun=function(_b02,_b03){if(_b02.lessthan(_b03)){return -1;}if(_b03.lessthan(_b02)){return +1;}return 0;};}return new alp.util.SortedDataSearcher(n,_b04,null,opt);function _b04(_b05,_b06){var x=arr[_b05];if(!x){var ia=_b05*_acc,ib=ia+_aca,ic=ib+_acb;x=arr[_b05]=[s.substring(ia,ib),s.substring(ib,ic)];}var _b07=x[0];if(_b06.contains_one(_b07)){return 0;}if(_b07<_b06.from){return -1;}if(_b07>_b06.to){return +1;}throw new Error("qt7bit_chunk_extend:_create_searcher():compare_fun(): found a bug!");};};};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.qt7bit.loader_spandata_api_idsearch"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.qt7bit.loader_spandata_api_idsearch"]=true);dojo.provide("alp._gmap2_3.qt7bit.loader_spandata_api_idsearch");(function(){var AG=alp._gmap2_3,AGQ=AG.qt7bit;AGQ.loader_spandata_api_idsearch=function(){return {async_fetch_byid:_b08};};function _b08(id){var me=this,ret=new alp.util.SafeDeferred(),_b09=Array.prototype.slice,_b0a=AGQ.int64str10_2_qt7bitstr(id),NW=AGQ.ORIG_NW(),SE=AGQ.ORIG_SE(),_b0b=NW.qt_str,_b0c=SE.qt_str;_b0d();return ret;var arr,n,_b0e,t;function _b0d(){arr=[].concat(me._start_end_span_arr);n=arr.length;_b0e=true;t=new Date();_b0f(0);};function _b10(_b11){var _b12=new Date()-t,args=_b09.call(arguments,1);if(_b12<200){_b11.apply(null,args);}else{setTimeout(function(){t=new Date();_b11.apply(null,args);},100+_b12);}};function _b0f(i){if(n!=me._start_end_span_arr.length){_b10(_b0d);return;}if(i>=n){if(_b0e){ret.callback(false);}else{ret.callback(null);}return;}var span=arr[i],key=span.key,_b13=me._key2data[key];if(_b13.no_data||(i<1&&_b0b!==span.from)||(i>(n-2)&&_b0c!==span.to)||(i<(n-1)&&AGQ.qt7bit_plus_1(span.to)<arr[i+1].from)){_b0e=false;}if(_b13.no_data){_b10(_b0f,i+1);return;}if(_b13.has_idcache()){_b14(_b13,i);}else{_b13.ensure_idcache().then(function(){t=new Date();_b14(_b13,i);});}};function _b14(_b15,i){var _b16=_b15.get_bybitid(_b0a);if(_b16){ret.callback({dataPoint:_b16});}else{_b10(_b0f,i+1);}};};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.qt7bit.loader_spandata"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.qt7bit.loader_spandata"]=true);dojo.provide("alp._gmap2_3.qt7bit.loader_spandata");(function(){var CN="alp._gmap2_3.qt7bit.LoaderSpanData",AG=alp._gmap2_3,AGQ=AG.qt7bit,GEOM=AGQ.GEOM;AGQ.LoaderSpanData=_b17;dojo.mixin(_b17.prototype,AGQ.loader_spandata_api_idsearch(),api());function api(){return {has_key:function(key){return key in this._key2data;},delete_key:function(key){if(!this.has_key(key)){throw new Error(CN+".delete_key(): key not found!");}delete this._key2data[key];var _b18=this._key2startendspan[key];delete this._key2startendspan[key];var _b19=this._start_end_span_arr.sortedsearch(_b18);if(_b19==null||_b19.first!==_b19.last){throw new Error(CN+".delete_key() detected a bug! #1 There should one and only one span. `where`:"+dojo.toJson(_b19));}this._start_end_span_arr.splice(_b19.first,1);var _b1a=this._key2firstlastspan[key];delete this._key2firstlastspan[key];var _b19=this._first_last_span_arr.sortedsearch(_b1a);if(_b19==null||_b19.first!==_b19.last){throw new Error(CN+".delete_key() detected a bug! #2 There should one and only one span. `where`:"+dojo.toJson(_b19));}this._first_last_span_arr.splice(_b19.first,1);},set:function(key,_b1b){if(this.has_key(key)&&this._key2data[key]===_b1b){return;}if(this.has_key(key)){this.delete_key(key);}this._key2data[key]=_b1b;var _b1c=new AGQ.Span(_b1b.qt_start,_b1b.qt_end);if(key!==_b1c.from){throw new Error(CN+".set() found a bug! #1");}_b1c.key=key;this._key2startendspan[key]=_b1c;this._start_end_span_arr.sortedinsert(_b1c);var _b1d=new AGQ.Span(_b1b.qt_first,_b1b.qt_last);if(_b1b.qt_first!==_b1d.from){throw new Error(CN+".set() found a bug! #2");}_b1d.key=key;this._key2firstlastspan[key]=_b1d;this._first_last_span_arr.sortedinsert(_b1d);},get_datapoint:function(_b1e){var _b1f=_b1e[GEOM],span=new AGQ.Span(_b1f,_b1f),o=this.get_span(span);for(var k in o){if(o.hasOwnProperty(k)){var _b20=o[k];if(_b20.no_data){continue;}return _b20.get_datapoint(_b1e);}}return null;},remove_datapoint:function(_b21){var _b22=_b21[GEOM],span=new AGQ.Span(_b22,_b22),o=this.get_span(span);for(var k in o){if(o.hasOwnProperty(k)){var _b23=o[k];if(_b23.no_data){continue;}if(_b23.remove_datapoint(_b21)){return;}}}throw new Error(CN+".remove_datapoint(): did not find the datapoint!");},add_datapoint:function(_b24){var _b25=this.get_datapoint(_b24);if(_b25==null){return null;}if(_b25!==false){throw new Error(CN+".add_datapoint(): the datapoint already exists! This is fobidden. Please call remove_datapoint() first.");}var _b26=_b24[GEOM],span=new AGQ.Span(_b26,_b26),o=this.get_span(span);for(var k in o){if(o.hasOwnProperty(k)){var _b27=o[k];if(_b27.no_data){continue;}if(_b27.add_datapoint(_b24)){return true;}}}throw new Error(CN+".add_datapoint(): found a bug! The safety checks were not enough.");},get_span:function(_b28,_b29){var _b2a=_b29?this._start_end_span_arr:this._first_last_span_arr,a=_b2a.sortedsearch(_b28),ret={};if(a!=null){for(var b=a.first,_b2b=a.last;b<=_b2b;b++){var span=_b2a[b],key=span.key;ret[key]=this._key2data[key];}}return ret;},intersection_list:function(_b2c,_b2d){var _b2e=this._start_end_span_arr,_b2f=_b2c._start_end_span_arr,ret=[];for(var a=_b2e.length;a--;){var t_se=_b2e[a];for(var b=_b2f.length;b--;){var o_se=_b2f[b],i=t_se.intersection(o_se);if(i&&(!_b2d||!i.is_a_single_point())){ret.push({intersection:i,this_start_end:t_se,other_start_end:o_se});}}}return ret;},intersects_span:function(_b30){return !!this._start_end_span_arr.sortedsearch(_b30);},contains_span:function(_b31){var _b32=this._start_end_span_arr,a=_b32.sortedsearch(_b31);if(a==null){return false;}var _b33=_b32[a.first],_b34=_b32[a.last];if(!(_b33.from<=_b31.from&&_b31.to<=_b34.to)){return false;}var _b35=this._key2data[_b33.from],_b36=this._key2data[_b34.from];if(_b36.chunk_ind-_b35.chunk_ind!==a.last-a.first){return false;}_b37();return true;function _b37(){var _b38=[];for(var b=a.first;a<=a.last;a++){var span=_b32[b],data=this._key2data[span.from];_b38.push(data.chunk_ind);}for(var b=1,_b39=_b38.length;b<=_b39;b++){if(_b38[b]!=1+_b38[b-1]){throw new Error(CN+": contains_span() detected a bug!");}}};}};};function _b17(){this._key2data={};this._key2startendspan={};this._key2firstlastspan={};this._first_last_span_arr=[];this._start_end_span_arr=[];var opt={data_compare_fun:function(a,b){if(a.lessthan(b)){return -1;}if(b.lessthan(a)){return +1;}return 0;}};alp.util.add_sortedsearch(this._first_last_span_arr,opt);alp.util.add_sortedinsert(this._first_last_span_arr,opt);alp.util.add_sortedsearch(this._start_end_span_arr,opt);alp.util.add_sortedinsert(this._start_end_span_arr,opt);};})();}if(typeof dojo==="undefined"||!dojo._hasResource["dojo.DeferredList"]){typeof dojo==="undefined"||(dojo._hasResource["dojo.DeferredList"]=true);dojo.provide("dojo.DeferredList");dojo.declare("dojo.DeferredList",dojo.Deferred,{constructor:function(list,_b3a,_b3b,_b3c,_b3d){this.list=list;this.resultList=new Array(this.list.length);this.chain=[];this.id=this._nextId();this.fired=-1;this.paused=0;this.results=[null,null];this.canceller=_b3d;this.silentlyCancelled=false;if(this.list.length===0&&!_b3a){this.callback(this.resultList);}this.finishedCount=0;this.fireOnOneCallback=_b3a;this.fireOnOneErrback=_b3b;this.consumeErrors=_b3c;dojo.forEach(this.list,function(d,_b3e){d.addCallback(this,function(r){this._cbDeferred(_b3e,true,r);return r;});d.addErrback(this,function(r){this._cbDeferred(_b3e,false,r);return r;});},this);},_cbDeferred:function(_b3f,_b40,_b41){this.resultList[_b3f]=[_b40,_b41];this.finishedCount+=1;if(this.fired!==0){if(_b40&&this.fireOnOneCallback){this.callback([_b3f,_b41]);}else{if(!_b40&&this.fireOnOneErrback){this.errback(_b41);}else{if(this.finishedCount==this.list.length){this.callback(this.resultList);}}}}if(!_b40&&this.consumeErrors){_b41=null;}return _b41;},gatherResults:function(_b42){var d=new dojo.DeferredList(_b42,false,true,false);d.addCallback(function(_b43){var ret=[];dojo.forEach(_b43,function(_b44){ret.push(_b44[1]);});return ret;});return d;}});}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.qt7bit.loader"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.qt7bit.loader"]=true);dojo.provide("alp._gmap2_3.qt7bit.loader");(function(){var AG=alp._gmap2_3,AGQ=AG.qt7bit,AU=alp.util,AUO=alp.util.object,CN="alp._gmap2_3.qt7bit.Loader",_b45="_reset_count",_b46="_load_xhr_cache",_b47=AGQ.NCHUNKS,_b48=AGQ.NQTDATAPOINT,_b49=AGQ.FIRST,LAST=AGQ.LAST,_b4a=AGQ.DATABBOX,META={},_b4b={};META[_b48]=1;META[_b49]=1;META[LAST]=1;META[_b4a]=1;dojo.declare(CN,AGQ.AbstractLoaderAllIds,{cm2_url:"http://192.168.80.128:8080/cgi-bin/clusmod2/c_serve_chunk.py?from=${qt7bit_from}&to=${qt7bit_to}&proj=${proj}",cm2_chunk_url:"http://192.168.80.128:8080/cgi-bin/clusmod2/c_serve_chunk.py?chunk_ind=${chunk_ind}&proj=${proj}",proj:null,xdomain:null,nbits:AGQ.NBITS,read_only_optim:true,cluster_meta_st:null,isloading_st:null,constructor:function(cfg){dojo.mixin(this,dojun.filterIn(cfg||{},"!=null"));this.isloading_st=new alp.data.BoolState();this.cluster_meta_st||(this.cluster_meta_st=new alp.data.ObjectState());this._preferred_qt7bit_span_st=new alp.data.State();alp.util.ratelimit_method(-3000,this,"_load_preferred_span");this._preferred_qt7bit_span_st.changed_cb(this,"_load_preferred_span");this._reset();},isloaded:function(_b4c){return this._fulldata.contains_span(_b4c);},reset:function(){this._reset();this._changed();},get:function(_b4d,_b4e){return dojo.mixin({},this._summary.get_span(_b4d,_b4e),this._fulldata.get_span(_b4d,_b4e));},load_all:function(){this.load(AGQ.WORLD_SPAN());},load:function(_b4f){console.log(CN+".load("+_b4f+") starts.");var me=this;me._preferred_qt7bit_span_st.set(_b4f);return !me.isloaded(_b4f);},_load_preferred_span:function(){var me=this,_b50=me._preferred_qt7bit_span_st.get();if(me.isloaded(_b50)){return;}_b50=AGQ.WORLD_SPAN();var url=dojo.string.substitute(AU.fun_or_not(me.cm2_url),{qt7bit_from:_b50.from_int64str(),qt7bit_to:_b50.to_int64str(),proj:me.proj}),_b51=AU.fun_or_not(me.cm2_url_getInputMeta);me._load(url,_b51);},load_chunk:function(_b52){console.log(CN+".load_chunk("+_b52+")");if(!AU.isInteger(_b52)){throw new Error(CN+".load_chunk(): chunk_ind must be an integer!");}if(this._is_chunk_loaded[_b52]){return false;}var url=dojo.string.substitute(AU.fun_or_not(this.cm2_chunk_url),{chunk_ind:_b52,proj:this.proj}),_b53=AU.fun_or_not(this.cm2_url_getInputMeta);return !!this._load(url,_b53);},getNChunks_dfrd:function(){var me=this,s="_nChunks_dfrd",_b54;return me[s]||(me[s]=AU.getDfrd(function(){return (me._nChunks!=null)?me._nChunks:_b54;}));},getNChunks_cb:AU.dfrd_cb("getNChunks_dfrd"),changed:function(){},alreadyloaded:function(){},all_chunks_loaded:function(){},modifiedDataPoint:function(o){},getDataPoint:function(_b55){if(typeof _b55==="string"){return this._async_fetch_byid(_b55);}else{return this._async_fetch_bydatapoint(_b55);}},getDataPointArray:function(_b56){var ret=new AU.SafeDeferred();dojo.DeferredList.prototype.gatherResults(dojo.map(_b56,this.getDataPoint,this)).addCallback(plop);return ret;function plop(arr){ret.callback(dojun.map(arr,".dataPoint"));};},removeDataPoint:function(_b57){var ret=new AU.SafeDeferred(),me=this;me.getDataPoint(_b57).then(_b58);return ret;function _b58(_b59){var _b5a=false;if(_b59){var _b5b=_b59.dataPoint;me._sync_remove_datapoint(_b5b);me._modifiedDataPoint(_b5a={oldDataPoint:_b5b});}ret.callback(_b5a);};},addDataPoint:function(_b5c){var ret=new AU.SafeDeferred(),me=this;me.getDataPoint(_b5c).then(_b5d);return ret;function _b5d(_b5e){if(_b5e){ret.callback(false);return;}me._async_add_datapoint(_b5c,ret);};},_reset:function(){this._is_chunk_loaded={};this._queue={};this[_b45]=(this[_b45]>>0)+1;delete this._nChunks;delete this._nChunks_dfrd;this._fulldata=new AGQ.LoaderSpanData();this._summary=new AGQ.LoaderSpanData();this.isloading_st.set(false);},_changed:AU.asyncHitch("changed"),_alreadyloaded:AU.asyncHitch("alreadyloaded"),_all_chunks_loaded:AU.asyncHitch("all_chunks_loaded"),_modifiedDataPoint:AU.asyncHitch("modifiedDataPoint"),_load:function(url,_b5f){var me=this,_b60=me[_b46]||(me[_b46]={}),dfrd=_b60[url];if(dfrd&&dfrd.fired<0){var args=arguments;dfrd.addCallback(function(_b61){me._load.apply(me,args);return _b61;});return false;}if(dfrd&&dfrd.fired<1){me._receive(me[_b45],_b5f,dfrd.ioArgs.xhr.responseText,dfrd.ioArgs);return false;}_b62();return true;function _b62(){me.isloading_st.set(true);_b60[url]=AU.xhr_auto_xd({url:url,url_xd:url,headers:{"Accept":"application/json"},handleAs:"text",load:dojo.hitch(me,"_receive",me[_b45],_b5f),error:function(_b63,_b64){console.error(CN+"._load (async) received an error from dojo.io.script: ",_b63,_b64);}});};},_receive:function(_b65,_b66,_b67,_b68){var me=this;if(me[_b45]!==_b65){return;}_b67=this._parse_response(_b67);console.log(CN+"_receive:",_b67,_b68);var _b69=me._fulldata,_b6a=me._summary,_b6b=false,_b6c=_b66?{inputMeta:AUO.copy(_b66)}:{};if(!(_b67&&_b67.answer&&_b67.request)){console.error(CN+"._receive():  invalid response:",_b67," to ioArgs:",_b68);return;}var _b6d=false;var ra=_b67.answer;for(var _b6e in ra){if(!(ra in _b4b)){_b6f(ra[_b6e],_b6e);var s="_inconsistency_has_already_reset_once";if(_b6d&&!me[s]){me[s]=true;var _b70=CN+"._receive(): inconsistency detected between `fulldata` and `summary`."+" Most likely we landed in the middle of browser cache expiration (see also Alpstein#8108)."+" Resetting and reloading everything.";console.error(_b70);setTimeout(function(){throw new Error(_b70);});me.reset();return;}}}if(_b6b){me._changed();}else{me._alreadyloaded();}me._update_queue(_b67,_b68);me.cluster_meta_st.set(_b6c);function _b6f(_b71,_b72){if(_b72===_b47){var _b73=_b71;if(typeof _b73!=="number"){console.error(CN+"._receive(): `nChunks` must be a number! Received a "+(typeof _b73)+": ",_b73);return;}if(me._nChunks==null){me._nChunks=_b73;return;}if(me._nChunks!=_b73){var _b74=CN+"._receive(): inconsistent `nChunks`! Current: "+me._nChunks+",  received: "+_b73;console.error(_b74);setTimeout(function(){throw new Error(_b74);});me._nChunks=_b73;}return;}if(_b72 in META){_b6c[_b72]=_b71;return;}if(_b69.has_key(_b72)){return;}if(_b71.no_data&&_b6a.has_key(_b72)){return;}if(_b71.no_data){_b6a.set(_b72,_b71);}else{if(_b69.has_key(_b72)){return;}_b69.set(_b72,AGQ.chunk_extend(_b71,me.read_only_optim));if(_b6a.has_key(_b72)){_b6a.delete_key(_b72);}_b6d=_b75(_b69,_b6a);if(_b6d){return;}if(null==_b71.chunk_ind[0]){throw new Error(CN+"._receive(): chunk_ind must be an integer!");}me._is_chunk_loaded[_b71.chunk_ind[0]]=true;}_b6b=true;};},_update_queue:function(_b76,_b77){var me=this,q=me._queue;dojun.forIn(_b76.answer,function(x){dojo.forEach(x.chunk_ind,function(_b78){if(x.no_data&&!me._is_chunk_loaded[_b78]){q[_b78]=x.centroid;}else{if(_b78 in q){delete q[_b78];}}});});var arr=[];dojun.forIn(q,function(_b79,_b7a){arr.push([_b79,_b7a]);});if(!arr.length){me.isloading_st.set(false);me._all_chunks_loaded();return;}var _b7b=me._preferred_qt7bit_span_st.get(),_b7c=_b7b.to_bounds(),_b7d=_b7c.getCenter(),_b7e=_b7d.lat(),_b7f=_b7d.lng();arr.sort(function(a,b){return v(a)<v(b)?-1:+1;});var _b80=arr[0][1];me.load_chunk(_b80>>0);function v(cc){var _b81=cc[0];return Math.abs(_b81.lat-_b7e)+Math.abs(_b81.lng-_b7f);};},_parse_response:function(_b82){return typeof _b82==="string"?dojo.fromJson(_b82):_b82;},_async_fetch_bydatapoint:function(_b83){var me=this,ret=new AU.SafeDeferred(),h;if(null==_b84()){h=dojo.connect(me,"changed",_b84);}return ret;function _b84(){var _b85=me._fulldata.get_datapoint(_b83);if(_b85!=null){if(h!=null){dojo.disconnect(h);}ret.callback(_b85);}return _b85;};},_sync_remove_datapoint:function(_b86){this._fulldata.remove_datapoint(_b86);},_async_add_datapoint:function(_b87,dfrd,_b88){var me=this,h;if(null==_b89()){h=dojo.connect(me,"changed",_b89);}function _b89(){var _b8a=me._fulldata.add_datapoint(_b87);if(_b8a!=null){if(h!=null){dojo.disconnect(h);}var _b8b=dojo.mixin({},_b88,{dataPoint:_b87});me._modifiedDataPoint(_b8b);dfrd.callback(_b8b);}return _b8a;};},_async_fetch_byid:function(id){var ret=new AU.SafeDeferred(),me=this;me.getNChunks_cb(_b8c);return ret;function _b8c(){me._fulldata.async_fetch_byid(id).then(_b8d);};function _b8d(_b8e){if(_b8e!=null){ret.callback(_b8e);return;}me.getNChunks_cb(_b8f);};function _b8f(_b90){for(var a=_b90;a--;){if(!me._is_chunk_loaded[a]){me.load_chunk(a).addCallback(_b8c);return;}}_b8c();};}});function _b75(_b91,_b92){var _b93=_b91.intersection_list(_b92,true).concat(_b91.intersection_list(_b91,true)).concat(_b92.intersection_list(_b92,true));for(var a=_b93.length;a--;){var o=_b93[a];if(!o.this_start_end.equals(o.other_start_end)){return true;}}return false;};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.cluster.cluster_model_2"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.cluster.cluster_model_2"]=true);dojo.provide("alp._gmap2_3.cluster.cluster_model_2");(function(){var AG=alp._gmap2_3,AU=alp.util,AUA=AU.array,AGC=AG.cluster,_b94=AGC.DEFAULT_noZoomInCountMax(),_b95=AGC.DEFAULT_zoomInMaxLevel(),AGQ=AG.qt7bit,AUO=AU.object,ID=AGQ.ID,_b96=AGQ.CATID,GEOM=AGQ.GEOM,_b97="_tree2",CN="alp._gmap2_3.ClusterModel2",C=dojo.declare(CN,alp._gmap2_3.ClusterModel,{default_tile_sublevels:1,updateVisibleIds_st:null,updateAllIds_st:null,allIds_st:null,cluster_meta_st:null,constructor:function(cfg){var me=this;me.cfg.tile_sublevels=(AU.likeIE()&&dojo.isIE<9)?1:2;if(me.cfg.proto){me.cfg.cm2_url="http://192.168.80.128:8080/cgi-bin/clusmod2/c_serve_chunk.py?from=${qt7bit_from}&to=${qt7bit_to}&proj=${proj}";me.cfg.cm2_chunk_url="http://192.168.80.128:8080/cgi-bin/clusmod2/c_serve_chunk.py?chunk_ind=${chunk_ind}&proj=${proj}";me.cfg.cluster_iw_url="http://192.168.80.128:8080/cgi-bin/clusmod2/d_serve_iw.py?idlist=${idlist}&proj=${proj}";me.cfg.ooi_iw_url="http://192.168.80.128:8080/cgi-bin/clusmod2/d_serve_iw.py?idlist=${id}&proj=${proj}";}me.cfg=dojo.delegate({search_depth_merge:2,search_depth_extract:0},me.cfg);me.cfg.cluster_meta_st||(me.cfg.cluster_meta_st=new alp.data.ObjectState());me._dataPointIcon={};me._dataPointUnmergeable={};me._dataPointUnmergeable_per_cat_arr={};me._dataPointUnmergeable_per_cat_span={};me._dataPointUnmergeable_n=0;me.updateVisibleIds_st=new alp.data.BoolState({init_value:false});me.updateAllIds_st=new alp.data.BoolState({init_value:false});me.allIds_st=new alp.data.SortedArrayState({init_value:null});me._loadXhrMulti=null;me._qt7bitloader=new AGQ.Loader(alp.at(me.cfg,["proj","cm2_url","cm2_url_getInputMeta","cm2_chunk_url","cm2_chunk_url_getInputMeta","xdomain","nbits","cluster_meta_st"]));me.updateVisibleIds_st.changed_v_cb(true,me,"clearAllClusters");me.updateAllIds_st.changed_v_cb(true,me,"_update_all_ids_later");me.updateAllIds_st.changed_v_cb(false,me,"_forget_all_ids");dojo.connect(me,"reset",function(){if(me.updateAllIds_st.get()){me._update_all_ids_later();}});dojo.connect(me._qt7bitloader,"changed",me,function(){this._changed(this);});dojo.connect(me._qt7bitloader,"alreadyloaded",me,function(){this._alreadyloaded(this);});var st=me._qt7bitloader.isloading_st;st.changed_v_cb(true,function(){me._cluster_loading_starts();});st.changed_v_cb(false,function(){me._cluster_loading_stops();});},mix_cfg:function(_b98){dojo.mixin(this.cfg,_b98);this._qr7bitloader.mix_cfg(_b98);this.reset();},reset:function(){C.superclass.reset.apply(this,arguments);this[_b97]={};this._qt7bitloader.reset();this._changed(this);},getDataPoint:function(){return this._qt7bitloader.getDataPoint.apply(this._qt7bitloader,arguments);},getDataPointArray:function(){return this._qt7bitloader.getDataPointArray.apply(this._qt7bitloader,arguments);},removeDataPoint:function(){this._ensure_on_modifiedDataPoint();return this._qt7bitloader.removeDataPoint.apply(this._qt7bitloader,arguments);},addDataPoint:function(){this._ensure_on_modifiedDataPoint();return this._qt7bitloader.addDataPoint.apply(this._qt7bitloader,arguments);},setDataPointIcon:function(_b99,_b9a){var me=this;me.getDataPoint(_b99).then(function(_b9b){var _b9c=_b9b&&_b9b.dataPoint;if(!_b9c){throw new Error(CN+".setDataPointIcon("+_b99+", ... ) could not find the datapoint.");}var _b9d=AGQ.int64str10_2_qt7bitstr(_b9c[ID]),fun=(typeof _b9a==="function")?_b9a:function(){return _b9a;};me._dataPointIcon[_b9d]=fun;me.clearClusterAtPoint(_b9c[GEOM]);});},unsetDataPointIcon:function(_b9e){var me=this;me.getDataPoint(_b9e).then(function(_b9f){var _ba0=_b9f&&_b9f.dataPoint;if(!_ba0){throw new Error(CN+".unsetDataPointIcon("+_b9e+") could not find the datapoint.");}var _ba1=AGQ.int64str10_2_qt7bitstr(_ba0[ID]);delete me._dataPointIcon[_ba1];me.clearClusterAtPoint(_ba0[GEOM]);});},setDataPointUnmergeable:function(_ba2,_ba3){var me=this;me.getDataPoint(_ba2).then(function(_ba4){var _ba5=_ba4&&_ba4.dataPoint;if(!_ba5){throw new Error(CN+".setDataPointUnmergeable("+_ba2+", "+_ba3+") could not find the datapoint.");}var _ba6=AGQ.int64str10_2_qt7bitstr(_ba5[ID]),_ba7=!!_ba3;if((!!me._dataPointUnmergeable[_ba6])!=_ba7){if(_ba7){me._add_to_unmergeable(_ba5,_ba6);}else{me._remove_from_unmergeable(_ba5,_ba6);}me.clearClusterAtPoint(_ba5[GEOM]);}});},clearAllClusters:function(){this[_b97]={};this._changed(this);},clearClusterAtPoint:function(_ba8){var _ba9=this[_b97],_baa;if(_ba9){var z=AGQ.NBITS,tile=AGQ.qt7bit_2_tilexy(_ba8,z),x=tile.x,y=tile.y,a,b;for(;z>-1;z--,x>>=1,y>>=1){a=_ba9[z];if(!a){continue;}b=a[x];if(!b){continue;}if(y in b){delete b[y];_baa=true;}}}if(_baa){this._changed(this);}},load_:function(bk_x,bk_y,bk_z,zoom,_bab){if(_bab===undefined){_bab=this.cfg.retryCountMax;}AU.conlog(CN+" loading bk_x bk_y bk_z zoom:",bk_x,bk_y,bk_z,zoom);var _bac=this._bk_2_qt7bit(bk_x,bk_y,bk_z,zoom),_bad=this._qt7bitloader.load(_bac);if(!_bad){this._alreadyloaded(this);}return _bad;},_isloaded:function(bk_x,bk_y,bk_z,zoom){if(this.cfg.manualOnly){return true;}return this._qt7bitloader.isloaded(this._bk_2_qt7bit(bk_x,bk_y,bk_z,zoom));},_bk_2_qt7bit:function(bk_x,bk_y,bk_z,zoom){var me=this,_bae=me._qt7bitloader.nbits,_baf=_bae-bk_z,_bb0={x:bk_x<<_baf,y:bk_y<<_baf},_bb1=AGQ.tilexy_2_qt7bitarr(_bb0,_bae),_bb2=[].concat(_bb1);for(var bit=2*_baf;bit--;){var by=(bit/7)>>0,bybi=bit%7;_bb2[by]|=(1<<bybi);}return new AGQ.Span(AGQ.bitarr_2_bitstr(_bb1),AGQ.bitarr_2_bitstr(_bb2));},_add_to_unmergeable:function(_bb3,_bb4){var me=this;if(_bb4 in me._dataPointUnmergeable){throw new Error(CN+"._add_to_unmergeable() found a bug!");}me._dataPointUnmergeable_n++;me._dataPointUnmergeable[_bb4]=_bb3;var _bb5=_bb3[_b96],_bb6=me._dataPointUnmergeable_per_cat_arr,_bb7=me._dataPointUnmergeable_per_cat_span;var arr=_bb6[_bb5];if(!arr){arr=_bb6[_bb5]=[];AU.add_sortedinsert(arr,{compare_fun:_bb8});AU.add_sortedsearch(arr,{data_compare_fun:_bb8});}function _bb8(dp0,dp1){return dp0.compareTo(dp1);};arr.sortedinsert(_bb3);_bb7[_bb5]=new AGQ.Span(arr[0][GEOM],arr[arr.length-1][GEOM]);},_remove_from_unmergeable:function(_bb9,_bba){var me=this;if(!(_bba in me._dataPointUnmergeable)){throw new Error(CN+"._remove_from_unmergeable() found a bug!");}me._dataPointUnmergeable_n--;delete me._dataPointUnmergeable[_bba];var _bbb=_bb9[_b96],_bbc=me._dataPointUnmergeable_per_cat_arr,_bbd=me._dataPointUnmergeable_per_cat_span,arr=_bbc[_bbb],o=arr.sortedsearch(_bb9);if(!(o&&o.first===o.last&&AU.isInteger(o.first))){throw new Error(CN+"._remove_from_unmergeable() found a bug when searching! "+(o&&o.first)+" "+(o&&o.last));}var ind=o.first;if(!(-1<ind)){throw new Error(CN+"._remove_from_unmergeable() found a bug in index!");}arr.splice(ind,1);if(arr.length>0){_bbd[_bbb]=new AGQ.Span(arr[0][GEOM],arr[arr.length-1][GEOM]);}else{delete _bbc[_bbb];delete _bbd[_bbb];}},fetch_from_tree_:function(x,y,zoom){var me=this,_bbe=me[_b97]||(me[_b97]={}),_bbf=[zoom,x,y],ret=AU.get_property(_bbe,_bbf);if(ret){return ret;}var _bc0=Math.min(AGQ.NBITS-1,zoom+me.cfg.search_depth_merge);if(_bc0<zoom){throw new Error("cluster_model_2._get_clusters(): bug! zoom must be <= from_z_max.");}for(var _bc1=zoom+1;_bc1<=_bc0;_bc1++){ret=me._merge_clusters(x,y,zoom,_bc1);if(ret){return ret;}}var _bc0=Math.min(AGQ.NBITS-1,zoom+me.cfg.search_depth_extract);if(zoom<_bc0){return me._merge_clusters(x,y,zoom,_bc0,true);}var o=me._get_clusters_from_qt7bit(x,y,zoom);return o.finaldata||o.summarydata;},_merge_clusters:function(x,y,zoom,_bc2,_bc3){var me=this,_bc4=me[_b97],ret=AU.get_property(_bc4,[zoom,x,y]),_bc5=me.updateVisibleIds_st.get();if(ret){return ret;}var dz=_bc2-zoom,n=1<<dz,_bc6=_bc4[_bc2]||(_bc4[_bc2]={}),_bc7=x<<dz,_bc8=_bc7+n,_bc9=y<<dz,_bca=_bc9+n,_bcb=[],_bcc=true;for(var _bcd=_bc7;_bcd<_bc8;_bcd++){for(var _bce=_bc9;_bce<_bca;_bce++){var _bcf=[_bcd,_bce],o=AU.get_property(_bc6,_bcf);if(o){_bcb.push(o);continue;}if(!_bc3){return null;}o=me._get_clusters_from_qt7bit(_bcd,_bce,_bc2);var fd=o.finaldata;if(fd){_bcb.push(fd);continue;}_bcb.push(o.summarydata);_bcc=false;}}var ret={},_bd0=me.cfg.tile_sublevels,nsub=1<<_bd0,_bd1=nsub-1;dojo.forEach(_bcb,_bd2);if(_bcc){AU.set_property(_bc4,[zoom,x,y],ret);}return ret;function _bd2(o){var a,b,c,d;for(var subx in o){if(o.hasOwnProperty(subx)){a=o[subx];for(var suby in a){if(a.hasOwnProperty(suby)){b=a[suby];for(var _bd3 in b){if(b.hasOwnProperty(_bd3)){c=b[_bd3];for(var i=0,_bd4=c.length;i<_bd4;i++){d=c[i];var tx=d.tx>>dz,ty=d.ty>>dz,_bd5=tx&_bd1,_bd6=ty&_bd1,to_a=ret[_bd5]||(ret[_bd5]={}),to_b=to_a[_bd6]||(to_a[_bd6]={}),to_c=to_b[_bd3]||(to_b[_bd3]=[]);if(!to_c.length||d.isUnmergeable||(to_c.length&&to_c[0].isUnmergeable)){var _bd7={c:d.c,t:_bd3,lat:d.lat,lng:d.lng,tx:tx,ty:ty};if(d.idlist){_bd7.idlist=_bc5?AUA.map_fun_or_not(d.idlist):d.idlist;}if(d.iconFun){_bd7.iconFun=d.iconFun;}if(d.isUnmergeable){_bd7.isUnmergeable=d.isUnmergeable;}to_c.push(_bd7);continue;}var to_d=to_c[0],_bd8,_bd9;if(!AU.likeIE()){var lat=[to_d.lat,d.lat],lng=[to_d.lng,d.lng],_bda=[to_d.c,d.c];_bd8=AU.angle_wmean(lat,_bda);_bd9=AU.angle_wmean(lng,_bda);}else{_bd8=(to_d.lat+d.lat)/2;_bd9=(to_d.lng+d.lng)/2;}to_d.c+=d.c;to_d.lat=_bd8;to_d.lng=_bd9;if(_bc5||!(zoom<_b95&&to_d.c>_b94)&&to_d.idlist&&d.idlist){to_d.idlist=to_d.idlist.concat(d.idlist);if(_bc5){to_d.idlist=AUA.map_fun_or_not(to_d.idlist);}}}}}}}}}};},_get_clusters_from_qt7bit:function(x,y,zoom){var me=this,_bdb=me[_b97],_bdc=[zoom,x,y],_bdd=AU.get_property(_bdb,_bdc),_bde=me.updateVisibleIds_st.get();if(_bdd){return {finaldata:_bdd};}_bdd={};var _bdf=me._bk_2_qt7bit(x,y,zoom,zoom),_be0=me._qt7bitloader.get(_bdf),_be1=me._qt7bitloader.nbits,_be2=me.cfg.tile_sublevels,nsub=1<<_be2,_be3=nsub-1,_be4=zoom+_be2;var _be5=[];for(var subx=0;subx<nsub;subx++){for(var suby=0;suby<nsub;suby++){var st={subx:subx,suby:suby,tx:(x<<_be2)+subx,ty:(y<<_be2)+suby};st.qt7bit_span=me._bk_2_qt7bit(st.tx,st.ty,_be4,_be4);_be5.push(st);}}_be5.sort(function(st_a,st_b){return st_a.qt7bit_span.lessthan(st_b.qt7bit_span)?+1:-1;});var _be6=me._isloaded(x,y,zoom,zoom);dojun.forIn(_be0,_be7);if(_be6){AU.set_property(_bdb,_bdc,_bdd);return {finaldata:_bdd};}return {summarydata:_bdd};function _be7(_be8,_be9){var _bea=_be8.qt_last;if(!_bdf.intersects(new AGQ.Span(_be9,_bea))){return;}var _beb=_be9.length;var c=_be8.centroid,_bec=c?AGQ.latlng_2_qt7bitstr(new google.maps.LatLng(c.lat,c.lng)):AGQ.middle_str(_be9,_bea),geo=_bed(_bec),_bee=_be8.cat_data;if(_be8.no_data){_be6=false;for(var _bef in _bee){if(_bee.hasOwnProperty(_bef)){_bf0(_bef);}}}else{for(var _bef in _bee){if(_bee.hasOwnProperty(_bef)){_bf1(_bef);}}}function _bf0(_bf2){_c03(geo,_bf2,{c:_be8.cat_data[_bf2].n});};function _bf1(_bf3){var _bf4=_be8.get_cat_span(_bf3);if(!(_bf4&&_bdf.intersects(_bf4))){return;}var ibe=_be8.search_span(_bf3,_bdf);if(!ibe){return;}var _bf5=ibe.first,_bf6=ibe.last,_bf7=me._dataPointIcon,_bf8=me._dataPointUnmergeable;for(var i_st=_be5.length;i_st--;){var st=_be5[i_st];ibe=_be8.search_span(_bf3,st.qt7bit_span,_bf5,_bf6,true);if(!ibe){continue;}var _bf9=ibe.first,_bfa=ibe.last;_bf5=_bfa+1;if(_bf9==_bfa){var elt=_be8.decode_one(_bf3,_bf9);if(st.qt7bit_span.contains_one(elt.qt7bit)){_bfb(elt);}}else{if(_bf9<_bfa){var _bfc=_be8.decode_one(_bf3,_bf9),end=_be8.decode_one(_bf3,_bfa),_bfd=AGQ.geomiddle_str(_bfc.qt7bit,end.qt7bit);if(st.qt7bit_span.contains_one(_bfd)){var dpu=me._dataPointUnmergeable,_bfe=me._dataPointUnmergeable_per_cat_span,_bff={},_c00=0;if(_bf3 in _bfe){if(st.qt7bit_span.intersects(_bfe[_bf3])){for(var kk=_bf9;kk<=_bfa;kk++){var elt=_be8.decode_one(_bf3,kk);if(dpu[elt.bitid]){_bff[kk]=true;_c00++;_bfb(elt);}}}}var mc=_bfa-_bf9+1-_c00,_c01={c:mc};if(mc>1){if(_bde||!(zoom<_b95&&mc>_b94)){var _c02=_c01.idlist=new Array(mc);if(_c00>0){for(var jj=0,kk=_bf9;kk<=_bfa;kk++){if(_bff[kk]){continue;}var elt=_be8.decode_one(_bf3,kk);_c02[jj++]=elt.id;}}else{for(var jj=0,kk=_bf9;kk<=_bfa;kk++){var elt=_be8.decode_one(_bf3,kk);_c02[jj++]=elt.id;}}if(jj!==mc){throw (CN+"._get_clusters_from_qt7bit(): place_final_clusters(): found a bug in the cluster case: mc:"+mc+", jj(final):"+jj);}if(_bde){_c02=_c01.idlist=AUA.map_fun_or_not(_c02);}}var geo=_bed(_bfd);_c03(geo,_bf3,_c01);}else{if(mc>0){for(var jj=0,kk=_bf9;kk<=_bfa;kk++){if(!_bff[kk]){var elt=_be8.decode_one(_bf3,kk);if(st.qt7bit_span.contains_one(elt.qt7bit)){_bfb(elt);}break;}}}}}}else{console.error(CN+" populate_ret() found a bug: !(i_begin < i_ret) , i_begin:"+_bf9+", i_end:"+_bfa);}}}};};function _bed(_c04){var _c05=AGQ.qt7bit_2_latlng(_c04,_be1),_c06=AGQ.qt7bit_2_tilexy(_c04,_be1),tx=_c06.x>>(_be1-_be4),ty=_c06.y>>(_be1-_be4);return {latlng:_c05,tilexy:_c06,zx:_c06.x>>(_be1-zoom),zy:_c06.y>>(_be1-zoom),tx:tx,ty:ty,subx:_be3&tx,suby:_be3&ty};};function _bfb(elt){var geo=_bed(elt.qt7bit),_c07=elt.bitid,obj={c:1,id:elt.id,idlist:[_bde?AU.fun_or_not(elt.id):elt.id]};if(_c07 in me._dataPointIcon){obj.iconFun=me._dataPointIcon[_c07];}if(_c07 in me._dataPointUnmergeable){obj.isUnmergeable=!!me._dataPointUnmergeable[_c07];}_c03(geo,elt.catid,obj);};function _c03(geo,_c08,obj){if(geo.zx!==x||geo.zy!==y){return;}var obj2={t:_c08,lat:geo.latlng.lat(),lng:geo.latlng.lng(),qt:function(){return alp.data.QuadTree.ijz2qt(geo.tx,geo.ty,_be4);},tx:geo.tx,ty:geo.ty};for(var k in obj){if(obj.hasOwnProperty(k)){obj2[k]=obj[k];}}var subx=geo.subx,suby=geo.suby,a=_bdd[subx]||(_bdd[subx]={}),b=a[suby]||(a[suby]={}),c=b[_c08]||(b[_c08]=[]);c.push(obj2);};},_ensure_on_modifiedDataPoint:function(){var me=this;me._ensure_on_modifiedDataPoint=function(){};dojo.connect(me._qt7bitloader,"modifiedDataPoint",function(o){if(o.oldDataPoint){me.clearClusterAtPoint(o.oldDataPoint[AGQ.GEOM]);}if(o.dataPoint){me.clearClusterAtPoint(o.dataPoint[AGQ.GEOM]);}});},_update_all_ids_later:function(){this._qt7bitloader.load_all();this._qt7bitloader.allIds_listen_once(this.allIds_st);},_forget_all_ids:function(){this._qt7bitloader.allIds_drop(this.allIds_st);this.allIds_st.set(null);}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.data.pagermodel"]){typeof dojo==="undefined"||(dojo._hasResource["alp.data.pagermodel"]=true);dojo.provide("alp.data.pagermodel");(function(){var _c09=function(){throw new Error(this.declaredClass+" is abstract. Provide your own implementation.");},_c0a=Array.prototype.slice;var CN="alp.data.PagerAbstractModel";dojo.declare(CN,null,{constructor:function(){},content_dfrd:function(a){_c09();},content_cb:function(a){var dfrd=this.content_dfrd(a);dfrd.addCallback.apply(dfrd,Array.prototype.slice.call(arguments,1));},contents_dfrd:function(arr){if(!(arr&&(arr.length>0))){var ret=new alp.util.SafeDeferred();ret.callback([]);return ret;}var _c0b=dojo.map(arr,this.content_dfrd,this);return dojo.DeferredList.prototype.gatherResults(_c0b);},contents_cb:function(arr){var dfrd=this.contents_dfrd(arr);dfrd.addCallback.apply(dfrd,Array.prototype.slice.call(arguments,1));},nitems:function(){_c09();},item_cb:function(i){var cb=dojo.hitch.apply(dojo,_c0a.call(arguments,1));this.contents_cb([i],_c0c);function _c0c(arr){if(null==arr[0]){throw new Error(CN+".item_cb: got an empty item #"+i,arr[0]);}cb(arr[0]);};},changed:function(){},_changed:alp.util.asyncHitch("changed")});dojo.declare("alp.data.PagerReadOnlyModel",alp.data.PagerAbstractModel,{constructor:function(_c0d){this._data=_c0d||[];},content_dfrd:function(a){var ret=new alp.util.SafeDeferred();ret.callback(this._data[a]);return ret;},nitems:function(){return this._data.length;}});dojo.declare("alp.data.PagerReadWriteModel",alp.data.PagerAbstractModel,{constructor:function(_c0e){this._data=_c0e||[];},content_dfrd:function(a){var ret=new alp.util.SafeDeferred();ret.callback(this._data[a]);return ret;},nitems:function(){return this._data.length;},insert:function(_c0f,html){var _c10=Math.max(0,Math.min(this.nitems(),_c0f));if(_c0f!==_c10){console.error(this.declaredClass+".insert("+_c0f+","+html+") fixed the index to "+_c10);}this._data.splice(_c10,0,html);this._changed();},push:function(html){this._data.push(html);this._changed();},del:function(_c11){if(this.nitems()<1){console.error(this.declaredClass+".pop(): model empty.");return;}var _c12=Math.max(0,Math.min(this.nitems()-1,_c11));if(_c11!==_c12){console.error(this.declaredClass+".del("+_c11+") fixed the index to "+_c12);}var ret=this._data.splice(_c12,1);this._changed();return ret;},pop:function(){if(this.nitems()<1){console.error(this.declaredClass+".pop(): model empty.");return;}var ret=this._data.pop();this._changed();return ret;}});dojo.declare("alp.data.PagerPagingModel",alp.data.PagerAbstractModel,{buffer_npages:2,nipp:10,init_json:undefined,constructor:function(nipp,_c13,opts){this.nipp=nipp;this.loadPageImpl=_c13;dojo.mixin(this,opts);this._nitems=undefined;this._items=undefined;this._init_dfrd=new alp.util.SafeDeferred();this._loading={};if(this.init_json){this.install_load_result(dojo.isString(this.init_json)?dojo.fromJson(this.init_json):this.init_json);}this.init();},init:function(){if((!this.is_initialized())&&(!this._is_initializing)){this._is_initializing=true;this._load_page(0);}},init_dfrd:function(){return this._init_dfrd;},init_cb:function(){var dfrd=this.init_dfrd();dfrd.addCallback.apply(dfrd,arguments);},is_initializing:function(){return !!this._is_initializing;},is_initialized:function(){return this._init_dfrd.fired===0;},_load_page:function(p,nipp,_c14){var ret;nipp=nipp||(this.nipp*(1+this.buffer_npages));this._loading=this._loading||{};this._loading[nipp]=this._loading[nipp]||{};if(this._loading[nipp][p]){if(_c14){return;}return this._loading[nipp][p];}ret=(this._loading[nipp][p]=this.loadPageImpl(p,nipp));ret.addCallback(this,function(){this._loading[nipp][p]=undefined;});ret.addCallback(this,"install_load_result");return ret;},install_load_result:function(_c15){if(!(_c15&&(_c15.nitems!==undefined)&&(_c15.items!==undefined))){console.error(this.declaredClass+".install_load_result() received a wrong load_result object:",_c15);return;}var _c16=false;if(this._nitems!==_c15.nitems){this._nitems=_c15.nitems;this._items=new Array(this._nitems);_c16=true;}dojun.forIn(_c15.items,function(v,k){v=v||null;this._items=this._items||[];if(this._items[k]!==v){this._items[k]=v;_c16=true;}},this);if(!this.is_initialized()){_c16=true;this._init_dfrd.callback(true);}if(_c16){this._changed();}},is_initialized:function(){return this._init_dfrd.fired===0;},nitems:function(){if(!this.is_initialized()){return 0;}return this._nitems;},content_dfrd:function(a){var _c17,ret;ret=new alp.util.SafeDeferred();_c17=this.contents_dfrd([a]);_c17.addCallbacks(function(arr){ret.callback(arr[0]);},function(){ret.cancel();});ret.addErrback(function(){_c17.cancel();});return ret;},contents_dfrd:function(arr){var arr2=(arr||[]).slice(),ret=new alp.util.SafeDeferred();this._init_dfrd.addCallback(this,function(){var a,_c18,_c19,_c1a,_c1b,_c1c,_c1d,_c1e,_c1f,_c20,_c21,_c22;_c1e=this.nipp;_c18=dojo.hitch(this,function(arr){return dojo.filter(arr,function(n){return (n>-1)&&(n<this._nitems)&&(this._items[n]===undefined);},this);});_c22=[];_c19=alp.util.minmax(arr2);if(_c19&&(_c19.length>0)){_c1a=_c19[1];for(a=_c1a+1;a<_c1a+1+_c1e*this.buffer_npages;a++){_c22.push(a);}}_c22=_c18(_c22);_c1b=_c18(arr2);_c1f=_c1e*(1+Math.max(0,this.buffer_npages));_c1c={};dojo.forEach(_c1b,function(n){_c1c[Math.floor(n/_c1f)]=true;},this);_c1d={};dojo.forEach(_c22,function(n){var p=Math.floor(n/_c1f);_c1d[p]=!_c1c[p];},this);_c20=[];dojun.forIn(_c1c,function(v,k){var a=this._load_page(k,_c1f);if(!a){return;}_c20.push(a);},this);dojun.forIn(_c1d,function(v,k){this._load_page(k,_c1f);},this);_c21=dojo.DeferredList.prototype.gatherResults(_c20);_c21.addCallbacks(dojo.hitch(this,function(){ret.callback(dojo.map(arr,function(n){var ret=this._items[n];if(djConfig.isDebug){if(ret===undefined){console.error(this.declaredClass+".contents_dfrd() insane ! n, this._nitems, this._items:",n,this._nitems,this._items);}}return ret;},this));}),function(){dojo.forEach(_c20,function(dfrd){dfrd.cancel();});ret.cancel();});});return ret;}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.cluster.filter_pager_model"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.cluster.filter_pager_model"]=true);dojo.provide("alp._gmap2_3.cluster.filter_pager_model");(function(){var _c23={};alp._gmap2_3.cluster.filter_pager_model=function(_c24,_c25,_c26,_c27,db,_c28){var _c29,opts,_c2a,_c2b,_c2c;db=db||alp.db.common();_c2a=dojun.lambda("+\".shorthtml\"");_c2c=function(id){return db.has(_c2a(id));};_c2b=function(_c2d,p,ntpp,_c2e){var a,o={};o.nitems=_c2e;o.items={};for(a=0;a<_c2d.length;a++){o.items[a+p*ntpp]=db.getset(_c2a(_c2d[a]));}return o;};_c29=function(p,ntpp){var _c2f=!(_c28||this.is_initialized());var a,f,has,ret,url,x,_c30,_c31;if(ntpp===undefined){ntpp=_c25;}p=parseInt(p,10);ntpp=parseInt(ntpp,10);url=_c27(_c24.sw,_c24.ne,undefined,dojo.mixin({},_c24,{page:parseInt(p,10)+1,ntpp:_c24.ntpp||ntpp,allids:!!_c2f}));_c23=_c23||{};if(_c23[url]){return _c23[url];}ret=(_c23[url]=new alp.util.SafeDeferred());if(this.is_initialized()&&this._allids){_c31=[];for(a=p*ntpp;a<Math.min((p+1)*ntpp,this.nitems());a++){_c31.push(this._allids[a]);}if(dojo.every(_c31,_c2c)){f=_c2b(_c31,p,ntpp,this.nitems());ret.callback(f);return ret;}}x=dojo.xhrGet({url:url,handleAs:"json",load:dojo.hitch(this,function(_c32){alp.util.conlog("filterpagermodel pager model load page received.",_c32);if(!this.is_initialized()){this._nitems=_c32.nresult;if((!_c28)&&dojo.isArray(_c32.allids)){this._allids=_c32.allids;if(this._nitems!==this._allids.length){console.error(this.declaredClass+": invalid data received! this._nitems:"+this._nitems+" differs from this._allids.length:"+this._allids.length);this._nitems=Math.min(this._nitems,this._allids.length);}}}this._allids=this._allids||new Array(this._nitems);a=p*ntpp;dojo.forEach(_c32.ids,function(id){this._allids[a]=id||this._allids[a];a++;},this);dojo.forEach(dojun.zip(_c32.ids,_c32.html),function(x){if(!(x[0]&&x[1])){console.error("alp._gmap2_3.cluster.filter_pager_model: XHR returned an invalid pair(id, html): id:\""+x[0]+"\", html:\""+x[1]+"\"");return;}db.getset(_c2a(x[0]),x[1]+"");});f=_c2b(_c32.ids,p,ntpp,this.nitems());ret.callback(f);}),error:function(){ret.cancel();}});ret.addErrback(function(){x.cancel();});return ret;};opts={buffer_npages:_c26,nitems:function(){return this._nitems;},cancel:function(){},idToN_dfrd:function(id){var ret=new alp.util.SafeDeferred();this.init_cb(this,function(){ret.callback(this._allids&&dojo.indexOf(this._allids,id));});return ret;},idToN_cb:function(n){var dfrd=this.idToN_dfrd(n);dfrd.addCallback.apply(dfrd,Array.prototype.slice.call(arguments,1));},nToId_dfrd:function(n){var ret=new alp.util.SafeDeferred();this.init_cb(this,function(){var id=this._allids&&this._allids[n];if(id!==undefined){ret.callback(id);}else{ret.cancel();}});return ret;},nToId_cb:function(n){var dfrd=this.nToId_dfrd(n);dfrd.addCallback.apply(dfrd,Array.prototype.slice.call(arguments,1));}};return new alp.data.PagerPagingModel(_c25,_c29,opts);};})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.cluster.filter_cluster_model_2"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.cluster.filter_cluster_model_2"]=true);dojo.provide("alp._gmap2_3.cluster.filter_cluster_model_2");(function(){var AUO=alp.util.object;dojo.declare("alp._gmap2_3.FilterClusterModel2",alp._gmap2_3.ClusterModel2,{_filterDefaultParam:function(){return {"proj":"","request":"tours","category":"","checks":"","types":"","typ":"","area":"","asc_s":"","asc_e":"","tim_s":"","tim_e":"","len_s":"","len_e":"","dif_e":"false","dif_m":"false","dif_d":"false","qul_b":"true","qul_p":"true","qul_s":"true","tags":"","ntpp":"","splithtml":"false","v":"1","allids":"false","sortedBy":"","state":"","types":"","q":""};},tour_list_min_delay_ms:1000*(alp.util.likeIE()?3.45:1),auto_load_tour_list:false,pager_buffer:2,pager_db:undefined,pager_never_allids:true,constructor:function(cfg){var me=this;me._filterDefaultParam=me._filterDefaultParam();if(cfg.initFilter){dojo.mixin(me._filterDefaultParam,cfg.initFilter);}dojo.forEach(["proj","request","v","splithtml"],function(s){if(typeof cfg[s]!=="undefined"){me._filterDefaultParam[s]=""+cfg[s];}});dojo.forEach(["tour_list_min_delay_ms","ntpp","auto_load_tour_list","pager_buffer","pager_db","pager_never_allids"],function(s){if(cfg[s]!==undefined){me[s]=cfg[s];}});me.pager_buffer=Math.max(0,me.pager_buffer);me._tourListXhrMulti=new alp.util.XhrMulti();},ntpp:function(){if(this._ntpp===undefined){this._ntpp=this.ntpp;}if(this._ntpp===undefined){this._ntpp=dojo.getObject("alpConfig.cluster.tour_list_ntpp");}return this._ntpp||"";},tour_list_pixmin2:function(){var b=this.cfg.tour_list_pixmin;if(b===undefined){b=50;}return b*b;},updateImpl:function(_c33,_c34,_c35,_c36,zoom){var _c37=this._loadOpts||{};this._checkFilterSettings();this.inherited(arguments);if(this.auto_load_tour_list){var _c38=this.fromPixelToLatLng(_c33,_c34,zoom);var _c39=this.fromPixelToLatLng(_c35,_c36,zoom);var sw=new GPoint(_c33,_c34);var ne=new GPoint(_c35,_c36);var date=new Date();var a=_c37&&_c37._tourlist_last_sw_ne;if((!a)||(zoom!==a.zoom)||(!(this.tour_list_pixmin2()>Math.max(alp.util.gpoint_d2(sw,a.sw),alp.util.gpoint_d2(ne,a.ne))))){this._loadOpts=this._loadOpts||{};this._loadOpts._tourlist_last_sw_ne={zoom:zoom,sw:sw,ne:ne,date:date};var _c3a=function _c3a(){this._load_tour_list(date,_c38,_c39);};if((!alp.util.likeIE())&&(!(a&&a.date))){_c3a=dojo.hitch(this,_c3a);}else{_c3a=alp.util.asyncHitch(_c3a,this,this.tour_list_min_delay_ms);}_c3a();}}},_load_url_template:function(){return this.cfg.filter_cluster_url;},_load_url:function(bk_x,bk_y,bk_z,zoom,_c3b){return this._safe_substitute(this._load_url_template(),dojo.mixin({},this._filterDefaultParam,{x:bk_x,y:bk_y,z:bk_z,l:zoom},this._loadOpts));},_load:function(bk_x,bk_y,bk_z,zoom,_c3c){this._checkFilterSettings();return this.inherited("_load",arguments);},_checkFilterSettings:function(){var _c3d=["gmap_lat","gmap_lng","gmap_z","gmap_type"],o=alp.nat(this._loadOpts||{},_c3d),_c3e=alp.nat(this._old_loadOpts||{},_c3d);if(!AUO.equal(_c3e,o)){this._old_loadOpts=AUO.copy(o);this.reset();}},_load_tour_list:function(date,sw,ne,_c3f){var me=dojo.getObject("_instanced._load_tour_list",true,this);var a=this._loadOpts&&this._loadOpts._tourlist_last_sw_ne;if(a&&a.date&&(a.date!==date)&&(a.date.getTime()>date.getTime())){return false;}var _c40=this._loadOpts||{};if(_c3f===undefined){_c3f=this.cfg.retryCountMax;}var url=this._load_tour_list_url(sw,ne,_c3f);if(url===me._last_url){return false;}me._last_url=url;this._tourListXhrMulti.cancel();this._tourListXhrMulti.get({url:url,handleAs:"json",load:this._tourListReceiveGen(date,sw,ne),error:this._tourListRetryGen(date,sw,ne,_c3f),handle:dojo.hitch(this,function(){var a=this._loadOpts&&this._loadOpts._tourlist_last_sw_ne;a.date=undefined;})});return true;},_load_tour_list_url:function(sw,ne,_c41,_c42){_c42=_c42||this._loadOpts||{};var o=dojo.mixin({},this._filterDefaultParam,{bbox:_c42.use_current_bbox?[sw.lng(),sw.lat(),ne.lng(),ne.lat()]:["","","",""],ntpp:this.ntpp()},_c42);if(o.subids){o.types=o.types||o.subids;}return this._safe_substitute(this._load_tour_list_url_template(),o);},_load_tour_list_url_template:function(){return this.cfg.filter_list_url;},_tourListReceiveGen:function(date,sw,ne){return dojo.hitch(this,function(_c43,_c44){var _c45=this.tour_shortinfo_map_fun();if(_c45){if(dojo.isArray(_c43.html)){_c43.html=dojo.map(_c45,_c43.html);}else{_c43.html=_c45(_c43.html);}}this._tourListReceivedAsync(_c43);});},_tourListRetryGen:function(date,sw,ne,_c46){return dojo.hitch(this,function(_c47,_c48){if(_c46<1){return;}var a=this._loadOpts&&this._loadOpts._tourlist_last_sw_ne;if(!(a&&a.date&&(a.date.getTime()===date.getTime()))){return;}window.setTimeout(dojo.hitch(this,function(){this._load_tour_list(date,sw,ne,_c46-1);}),this.cfg.retryDelayMs);});},_cluster_iw_url:function(_c49){var o=dojo.mixin({},this._filterDefaultParam,{idlist:this._idlist_str(_c49),qttypelist:this._qttypelist_str(_c49)},this._loadOpts);return this._safe_substitute(this.cfg.filter_iw_url,o);},get_pager_model:function(_c4a,_c4b,db,_c4c){var n=arguments.length;return alp._gmap2_3.cluster.filter_pager_model(_c4a,_c4b,this.pager_buffer,dojo.hitch(this,"_load_tour_list_url"),(n>2)?db:this.pager_db,(n>3)?_c4c:this.pager_never_allids);},tourListReceived:function(_c4d){if(djConfig.isDebug){console.log(this.declaredClass+".tourListReceived(",_c4d,")");}},_tourListReceivedAsync:alp.util.asyncHitch("tourListReceived")});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp._gmap2_3.cluster.filter_cluster_controller_2"]){typeof dojo==="undefined"||(dojo._hasResource["alp._gmap2_3.cluster.filter_cluster_controller_2"]=true);dojo.provide("alp._gmap2_3.cluster.filter_cluster_controller_2");(function(){var AU=alp.util,CN="alp._gmap2_3.FilterClusterController2",C=dojo.declare(CN,alp._gmap2_3.ClusterController,{default_model_ctor:alp._gmap2_3.FilterClusterModel2,default_view_opts:{catSelCookie:false},single_docType_or_all:true,constructor:function(gmap,_c4e,opts){var s="single_docType_or_all",v=opts[s];if(v!=null){this[s]=v;}},_init:function(_c4f){var me=this;dojo.forEach([{orig:"filter_cluster2_url",must_be_variable:{qt7bit_from:"${qt7bit_from}",qt7bit_to:"${qt7bit_to}"}},{orig:"filter_cluster2_chunk_url",must_be_variable:{chunk_ind:"${chunk_ind}"}}],_c50);function _c50(vcfg){var _c51=vcfg.orig.replace("filter_cluster","cm"),s=_c4f[vcfg.orig];if(typeof s!=="string"){return;}_c4f[_c51]=function(){var o=dojun.mapIn(dojo.mixin(_c52(),vcfg.must_be_variable),_c53);return dojo.string.substitute(s,o);function _c53(v){return (AU.isNaN(v)||v==null)?"":v;};};_c4f[_c51+"_getInputMeta"]=_c52;function _c52(){return dojo.mixin({proj:"${proj}"},me._model._filterDefaultParam,me._model._loadOpts);};};this.inherited(arguments);var s=_c4f.filter_cluster_selection;if(s){for(var a in s){if(s.hasOwnProperty(a)){this._view.setCatSelected("FilterClusterController._init()",a,s[a]);}}}},updateImpl:function(_c54,_c55){var me=dojo.getObject("_instanced.updateImpl",true,this),self=this,_c56;if(djConfig.isDebug){var _c57=alp.util.now_time();console.group("FilterClusterController.updateImpl() "+_c57);}_c58();if(_c54&&self.single_docType_or_all){self.viewDfrd().then(_c59);}if(djConfig.isDebug){console.log("calling inherited updateImpl()");}C.superclass.updateImpl.apply(self,arguments);if(self.is_active()){self._update_pagerlikes(_c54);}if(djConfig.isDebug){console.groupEnd();}function _c58(){if((!_c54)||(typeof _c54!=="object")){_c54=me._lastLoadOpts;}else{me._lastLoadOpts=_c54;}alp.util.conlog(self.declaredClass+".updateImpl(): loadOpts, this.is_active():",_c54,self.is_active());if(!self.is_active()){return;}_c56=dojo.toJson(_c54);if(!_c55&&!(_c54&&_c54.use_current_bbox)&&(self._last_loadOpts_str===_c56)){alp.util.conlog("!force && !loadOpts.use_current_bbox && ( this._last_loadOpts_str === loadOpts_str ) ",_c56);return;}self._last_loadOpts_str=_c56;if(!_c54){alp.util.conlog(CN+".updateImpl():  !loadOpts  -  I need filter settings");return;}};function _c59(view){var _c5a=me._lastLoadOpts,_c56=self._last_loadOpts_str;if(!_c5a){return;}if(djConfig.isDebug){var _c5b=alp.util.now_time();console.group("FilterClusterController.updateImpl() viewDfrd() callback "+_c5b);console.log("FilterClusterController.updateImpl() callback: Make sure that we will show only the desired category(ies) - start "+_c5b);console.log("FilterClusterController.updateImpl() callback: loadOpts_str: ",_c56);}var _c5c=_c5a.docType_id_long;view.setUpdateActive("FilterClusterControler.updateImpl() callback",false);var _c5d=true;if(!_c5c){if(djConfig.isDebug){console.log("FilterClusterControler.updateImpl() callback calling view set all cat visible true");}view.setAllCatVisible(true,_c5d);}else{if(djConfig.isDebug){console.log("FilterClusterControler.updateImpl() callback calling view set all cat visible false");}view.setAllCatVisible(false,_c5d);if(djConfig.isDebug){console.log("FilterClusterControler.updateImpl() callback calling view set cat"+_c5c+" visible true");}view.setCatSelected("FilterClusterController.updateImpl() callback",_c5c,true,_c5d);}view.setUpdateActive("FilterClusterControler.updateImpl() callback",true);view.update(CN+".updateImpl()",_c55);if(djConfig.isDebug){console.log("FilterClusterController.updateImpl() callback: Make sure that we will show only the desired category(ies) - done "+_c5b);console.groupEnd();}};},control_pager:function(_c5e){this._pagerlike_arr=this._pagerlike_arr||[];if(-1<dojo.indexOf(this._pagerlike_arr,_c5e)){return;}this._pagerlike_arr.push(_c5e);this.update();},release_pager:function(_c5f){if(!this._pagerlike_arr){return;}var ind=dojo.indexOf(this._pagerlike_arr,_c5f);if(ind<0){return;}this._pagerlike_arr.splice(ind,1);},set_pager_type_name:function(_c60,_c61){if(this._pager_type_name!==_c60){this._pager_type_name=_c60;if(!_c61){this.update();}}},_update_pagerlikes:function(_c62){var self=this;self.viewDfrd().then(_c63);function _c63(view){var me,_c64;if(!view.is_active()){return;}me=dojo.getObject("_instanced._update_pagerlikes",true,me);self.modelDfrd().addCallback(self,function(_c65){_c64=_c65.tour_list_min_delay_ms;if(_c64===undefined){_c64=1000;}self._loadOpts=dojo.mixin({},_c62,{typ:self._pager_type_name});var _c66=false;var now=alp.util.now_time();if(me._last_call_time!==undefined){_c66=(now-me._last_call_time)<_c64;}me._last_call_time=now;if(!_c66){self._update_pagerlikes_now(self._loadOpts);return;}window.setTimeout(function(){if(me._last_call_time!==now){return;}self._update_pagerlikes_now(self._loadOpts);},_c64);});};},_update_pagerlikes_now:function(_c67){var me,_c68,opts,_c69;me=dojo.getObject("_instanced._update_pagerlikes",true,this);var self=this;if(!_c67){return;}this.modelDfrd().addCallback(this,function(_c6a){this.viewDfrd().addCallback(this,function(view){var gmap=this.gmapSt.get();if(!(gmap&&view.is_active())){return;}if(!_c6a.get_gproj()){setTimeout(function(){self._update_pagerlikes_now(self._loadOpts);},345);return;}opts=dojo.mixin({},this._model._filterDefaultParam,_c67);dojo.mixin(opts,{gmap_lat:0,gmap_lng:0,gmap_type:0,gmap_z:0});if(opts.use_current_bbox){dojo.hitch(this,function(){var c,_c6b,ne,_c6c,sw,_c6d,swne,z;c=gmap.getCenter();z=gmap.getZoom();_c6b=_c6a.fromLatLngToPixel(c.lat(),c.lng(),z);swne=gmap.getBounds();if(!(c&&(z!==undefined)&&swne)){return;}sw=swne.getSouthWest();ne=swne.getNorthEast();_c6d=_c6a.fromLatLngToPixel(sw.lat(),sw.lng(),z);_c6c=_c6a.fromLatLngToPixel(ne.lat(),ne.lng(),z);dojo.mixin(opts,{center:c,center_pix:_c6b,zoom:z,sw:sw,ne:ne,sw_pix:_c6d,ne_pix:_c6c,bbox:[sw.lng(),sw.lat(),ne.lng(),ne.lat()],bbox_pix:[_c6d.x,_c6d.y,_c6c.x,_c6c.y],swne:swne});})();}_c69=dojo.toJson(dojo.mixin({},dojun.mapIn(opts,function(v,k){return (v==null)?"":v;}),{bbox:[0,0,0,0],bbox_pix:[0,0,0,0],sw:0,ne:0,sw_pix:0,ne_pix:0,swne:0,center:0,center_pix:0,zoom:0}));_c68=(me._last_opts_str!==_c69);if(opts.use_current_bbox&&(!_c68)&&me._last_opts){_c68=(opts.zoom!==me._last_opts.zoom)||(_c6a.tour_list_pixmin2()<Math.max(alp.util.gpoint_d2(opts.center_pix,me._last_opts.center_pix)));}if(_c68){me._last_opts=opts;me._last_opts_str=_c69;}alp.util.conlog(this.declaredClass+" xxx opts:",opts,_c68);dojo.forEach(this._pagerlike_arr,function(_c6e){if((!_c6e.model)||_c68){if(!_c6a.get_pager_model){console.error(this.declaredClass+"._update_pagerlikes(): this.model.get_pager_model not found!");return;}if(_c6e.model&&_c6e.model.cancel){_c6e.model.cancel();}_c6e.set_model(_c6a.get_pager_model(opts,_c6e.nipp()));}},this);});});}});})();}if(typeof dojo==="undefined"||!dojo._hasResource["alp.view.categorypainter"]){typeof dojo==="undefined"||(dojo._hasResource["alp.view.categorypainter"]=true);dojo.provide("alp.view.categorypainter");dojo.declare("alp.view.CategoryPainter",[alp.util.Background],{catnode_q:".dijitTreeContent",cluster_view:undefined,topNode_id:undefined,categoryTreeNode_id:undefined,notEmptyCat_cssClass:"alpNotEmptyCategory",emptyCat_cssClass:"alpEmptyCategory",pause_work_ratio:9.87,pause_min_ms:1000,pause_max_ms:3000,cache_nodes:false,cache_catid:true,cache_labelNode:true,contentNode_catid:function(_c6f){return alp.util.or(dojo.query("[catid]",_c6f),function(node){return dojo.attr(node,"catid");});},contentNode_labelNode:function(_c70){return alp.util.or(dojo.query(".dijitTreeLabel",_c70));},constructor:function(opts){if(!this.cluster_view){console.error(this.declaredClass+": missing \"cluster_view\" parameter.");return;}this.connect(this.cluster_view);if(this.cache_nodes){this._nodes=alp.util.cache_transform(this._nodes);}var _c71=(function(_c72){return function(_c73){var s="_alp_catpaint_key";return (_c73[s]=_c73[s]||(alp.util.unleak(_c73),(_c72=(_c72+1)+"")));};})("0");if(this.cache_catid){this._contentNode_catid=alp.util.cache_transform(this._contentNode_catid,_c71);}if(this.cache_labelNode){this._contentNode_labelNode=alp.util.cache_transform(this._contentNode_labelNode,_c71);}if(this.cache_catid&&this.cache_labelNode){this._labelNode_css_class=(function(last,_c74){return function(_c75,_c76){_c76=!!_c76;var key=_c71(_c75);if(last[key]===_c76){return;}last[key]=_c76;return _c74(_c75,_c76);};})({},dojo.hitch(this,this._labelNode_css_class));}},connect:function(_c77){if(this._h_cluster_view){dojo.disconnect(this._h_cluster_view);this._h_cluster_view=0;}if(_c77){this._h_cluster_view=dojo.connect(this.cluster_view,"catCounted",this,"set_bounds_cat_count");}this.cluster_view=_c77;},disconnect:function(){this.connect();},set_bounds_cat_count:function(_c78){this._bounds_cat_count=_c78;},do_one_impl:function(){var dc=this.declaredClass;if(!(this.cluster_view&&this._bounds_cat_count&&this.cluster_view.isSelectionInitialized())){return;}this._topNode=dojo.byId(this.topNode_id);if(!this._topNode){this._topNode=dojo.byId(this.categoryTreeNode_id);this._topNode=this._topNode&&this._topNode.parentNode;if(!this._topNode){console.warn(dc+": could not find parent node of the DOM node with id: \""+this.categoryTreeNode_id+"\"");return;}}this._nodes().forEach(function(_c79){var _c7a=this._contentNode_catid(_c79);if(!_c7a){return;}var _c7b=this._contentNode_labelNode(_c79);if(!_c7b){return;}var bcc=this._bounds_cat_count;if(!bcc){console.error(this.declaredClass+": incorrect bcc:",bcc);return;}var sel=this.cluster_view.getSelection();if(!sel){console.error(this.declaredClass+": incorrect sel:",sel);return;}var _c7c=0;var f=function(_c7d,tree,_c7e){if(bcc[_c7d]!==undefined){_c7c+=bcc[_c7d];}};var o={};o[_c7a]=sel[_c7a];alp.util.treeForEach(o,"children",f,false,_c7a);this._labelNode_css_class(_c7b,_c7c>0);},this);},_nodes:function(){return dojo.query(this.catnode_q,this._topNode);},_contentNode_catid:function(_c7f){return this.contentNode_catid(_c7f);},_contentNode_labelNode:function(_c80){return this.contentNode_labelNode(_c80);},_labelNode_css_class:function(_c81,_c82){alp.util.setClass(_c81,this.emptyCat_cssClass,!_c82,this.notEmptyCat_cssClass,_c82);}});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.data.areas"]){typeof dojo==="undefined"||(dojo._hasResource["alp.data.areas"]=true);dojo.provide("alp.data.areas");dojo.declare("alp.data.Areas",null,{HIDDEN_NAME:"<hidden>",constructor:function(_c83){var _c84=dojo.hitch(this,function(data){dojo.mixin(this,data);this._TI_LEVEL=this.TREE_INDEX_LEVEL;this._TI_NAME=this.TREE_INDEX_NAME;this._TI_ID=this.TREE_INDEX_ID;this._TI_PARENTS=this.TREE_INDEX_PARENTS;this._TI_BBOX=this.TREE_INDEX_BBOX;this._TI_NICEID=this.TREE_INDEX_NICEID;this._TI_ACTIV=this.TREE_INDEX_ACTIV;this._init_dfrd.callback(this);});this._init_dfrd=new alp.util.SafeDeferred();if(typeof _c83==="object"){_c84(_c83);}else{var args={url:_c83,handleAs:"json",load:function(r,_c85){_c84(r);},error:function(r,_c86){console.error("alp.data.Areas failed to load the JSON configuration from url \""+args.url+"\"");}};dojo.xhrGet(args);}},init_dfrd:function(){return this._init_dfrd;},isInitialized:function(){return (this._init_dfrd===0);},inherits_from:function(_c87,_c88){var ret=new alp.util.SafeDeferred();this._init_dfrd.addCallback(this,function(){ret.callback(this._inherits_from(_c87,_c88));});return ret;},_inherits_from:function(_c89,_c8a){var _c8b=(typeof _c8a!=="number");return ((_c8b?(dojo.indexOf(_c8a,_c89)>-1):_c89===_c8a)||dojun.some(dojo.map(this.tree[_c89][this._TI_PARENTS],function(x){return this._inherits_from(x,_c8a);},this),"!!"));},info:function(_c8c){var a=this.tree[_c8c];if(!a){return;}return {level:a[this._TI_LEVEL],name:a[this._TI_NAME],id:a[this._TI_ID],niceid:a[this._TI_NICEID],parents:a[this._TI_PARENTS],bbox:a[this._TI_BBOX],activ:a[this._TI_ACTIV]};},indexBy:function(type,_c8d){var ret=new alp.util.SafeDeferred();this._init_dfrd.addCallback(this,function(){var v=this._indexBy(type,_c8d);if(v===undefined){ret.cancel();return;}ret.callback(v);});return ret;},_indexBy:function(t,_c8e){var me=this,_c8f=(typeof _c8e==="string"),_c90=me.declaredClass+"._indexBy(t:\""+t+"\", value:\""+_c8e+"\")",a=me.tree,_c91=me._TI_LEVEL,_c92=me._TI_NAME,_c93=me.HIDDEN_NAME,_c94=(typeof t==="string")?[t]:t;var ok=true;dojo.forEach(_c94,function(type){if(0>dojo.indexOf(["name","id","niceid"],type)){console.error(_c90+": invalid type \""+type+"\".");ok=false;}});if(ok){var _c95=dojo.map(_c94,function(type){return me["_TI_"+type.toUpperCase()];});ok=alp.util.and(_c95);}if(!ok){return;}if(!(_c8f||(typeof (_c8e&&_c8e.length)==="number"))){console.error(_c90+": value must be a string or array of strings, you gave me a \""+(typeof _c8e)+"\":",_c8e);return;}if(!a){return;}var _c96=_c8f?[_c8e]:_c8e,_c97=new Array(_c96.length),n=0,k;for(var _c98=a.length;_c98--;){var one=a[_c98];if(one[_c92]===_c93){continue;}for(var bb=0,_c99=_c95.length;bb<_c99;bb++){k=dojo.indexOf(_c96,one[_c95[bb]]);if(k>-1){break;}}if(k<0){continue;}if(_c97[k]!=null){if(a[_c97[k]][_c91]>one[_c91]){_c97[k]=_c98;}continue;}_c97[k]=_c98;n++;}if(n<_c96.length){console.error(_c90+": not enough areas found, expected:",_c96.length,", found:",n);}return _c8f?_c97[0]:_c97;},infoBy:function(type,_c9a){var ret=new alp.util.SafeDeferred(),_c9b=this.declaredClass+".infoBy(type:\""+type+"\", value:\""+_c9a+"\")";if(typeof _c9a!=="string"){console.error(_c9b+" requires a string as type!");ret.cancel();return ret;}var a=this.indexBy.apply(this,arguments);a.addCallback(this,function(_c9c){ret.callback(this.info(_c9c));});a.addErrback(ret,"cancel");return ret;},walk:function(_c9d,_c9e,_c9f){var _ca0=this.tree[_c9d];if(!_ca0){return;}var stop=false;if(!_c9f){stop=stop||_c9e(_ca0,_c9d,this);}var _ca1=(!stop)&&this.children[_c9d];if(_ca1){for(var a=0,_ca2=_ca1.length;a<_ca2;a++){stop=stop||this.walk(_ca1[a],_c9e);}}return stop;}});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.x.areaselector"]){typeof dojo==="undefined"||(dojo._hasResource["alp.x.areaselector"]=true);dojo.provide("alp.x.areaselector");alp.installLocalization("alp","x");dojo.declare("alp.x.AreaSelector",null,{HTML_EXAMPLE:"<div id=\"territory-select-box\" class=\"select-box\">"+"<div class=\"select-box-logo\"></div>"+"<div class=\"select-box-close\"></div>"+"<div class=\"clear space\"></div>"+"<div class=\"col left s4\">"+"<div name=\"territorySelectForm\">"+"<fieldset id=\"territory-text\">"+"<input id=\"territory-select-text\" type=\"text\" id=\"search-input\" name=\"s\" value=\"\"/>"+"</fieldset>"+"<fieldset id=\"territory-select\">"+"<select id=\"territory-select-value\" name=\"territorySelectField\" size=\"3\"></select>"+"</fieldset>"+"<fieldset id=\"ok\">"+"<input id=\"submit-button\" type=\"button\" value=\"\"/>"+"</fieldset>"+"</div>"+"</div>"+"<div class=\"col right s4\">"+"<div name=\"territoryGeoSelectForm\">"+"<fieldset id=\"territory-geoselect\" class=\"s6\">"+"<span id=\"span-territory-geoselect-country\"><label for=\"territory-geoselect-country\">Land</label><select class=\"s6\" id=\"territory-geoselect-country\" size=\"1\"><option value=\"germany\">Deutschland</option><option value=\"italy\">Italien</option></select></span>"+"<span id=\"span-territory-geoselect-district\"><label for=\"territory-geoselect-district\">Bundesland</label><select class=\"s6\" id=\"territory-geoselect-district\" size=\"1\"><option value=\"germany\">- Bundesland wählen -</option></select></span>"+"<span id=\"span-territory-geoselect-region\"><label for=\"territory-geoselect-region\">Region</label><select class=\"s6\" id=\"territory-geoselect-region\" size=\"1\"></select></span>"+"</fieldset>"+"<fieldset id=\"ok-geo\">"+"<input id=\"geo-submit-button\" type=\"button\" value=\"\"/>"+"</fieldset>"+"</div>"+"</div>"+"</div>",area_config_url:(function(){var arr=[];arr.push((dojo.global.alpConfig&&alpConfig.base_href)||"");arr.push("regionConfig.json");return arr.join("/");})(),autohide_topsingle:true,id:null,id_select_all:"territory-select-all",id_select_top:"territory-select-top",id_text_input:"territory-select-text",id_text_select:"territory-select-value",id_text_ok_msg:"territory-ok-msg",id_text_ok:"submit-button",id_geo_select:"territory-geoselect",id_text_ok_geo_msg:"territory-ok-geo-msg",id_geo_ok:"geo-submit-button",node_geo_select_level:[{showhide:"span-territory-geoselect-country",select:"territory-geoselect-country",choice_text:function(){return alp.x.i18n.area_choose_country;}},{showhide:"span-territory-geoselect-district",select:"territory-geoselect-district",choice_text:function(){return alp.x.i18n.area_choose_district;}},{showhide:"span-territory-geoselect-region",select:"territory-geoselect-region",choice_text:function(){return alp.x.i18n.area_choose_region;}},{showhide:"span-territory-geoselect-county",select:"territory-geoselect-county",choice_text:function(){return alp.x.i18n.area_choose_county;}},{showhide:"span-territory-geoselect-city",select:"territory-geoselect-city",choice_text:function(){return alp.x.i18n.area_choose_city;}}],minlevel_custom:-Infinity,maxlevel_custom:+Infinity,text_select_max:+Infinity,is_choosable:function(_ca3,_ca4,_ca5){var ret=true;dojun.forIn(_ca4,function(v,k){ret=ret&&v[_ca3];});return !!ret;},on_select:undefined,minlevel:null,constructor:function(opts){var _ca6=["id"];if(!dojun.every(_ca6,function(x){return opts[x];})){console.error(this.declaredClass+".constructor(opts): opts is missing mandatory parameters, please provide: "+_ca6);return;}var me=this;dojo.mixin(me,opts);me._init_dfrd=new alp.util.SafeDeferred();me.areas=new alp.data.Areas(me.area_config_url);me.areas.init_dfrd().addCallback(function(){me._TI_LEVEL=me.areas.TREE_INDEX_LEVEL;me._TI_NAME=me.areas.TREE_INDEX_NAME;me._TI_ID=me.areas.TREE_INDEX_ID;me._TI_PARENTS=me.areas.TREE_INDEX_PARENTS;me._TI_BBOX=me.areas.TREE_INDEX_BBOX;me._TI_NICEID=me.areas.TREE_INDEX_NICEID;me._TI_ACTIV=me.areas.TREE_INDEX_ACTIV;alp.util.getDfrd(dojo.hitch(me,function(){var ret=(typeof me.id==="string")?dojo.byId(me.id):me.id;return ret||undefined;})).then(function(node){alp.util.getDfrd("alp.x.i18n.areaselector_none").then(function(){me._init(node);});});});},init_dfrd:function(){return this._init_dfrd;},isInitialized:function(){return (this._init_dfrd===0);},init_cb:alp.util.dfrd_cb("init_dfrd"),dom_is_in:function(node){var c=this._container;return c&&alp.util.isDescendant(c,node);},focus_text_input:function(){this.init_cb(this,function(){this._sub.text_input.focus();});},select_top:function(){this._toparea_selected();},area_inherits_from:function(_ca7,_ca8){return this.areas.inherits_from.apply(this.areas,arguments);},area_info:function(_ca9){return this.areas.info.apply(this.areas,arguments);},area_indexBy:function(type,_caa){return this.areas.indexBy.apply(this.areas,arguments);},area_infoBy:function(type,_cab){return this.areas.infoBy.apply(this.areas,arguments);},selectBy:function(type,_cac){var args=arguments;this.init_cb(this,function(){this.area_indexBy.apply(this,args).addCallback(this,"_areaindex_selected");});},selectByName:function(name){this.selectBy("name",""+name);},_init:function(node){var a,_cad=this.declaredClass,me=this;if(!node){console.error(_cad,"._init(): failed to find the container node \""+me.id+"\". Aborting.");return;}me._container=node;me._sub={};var rx=/^id_(.+)/;dojun.forIn(me,function(_cae,k){var g=rx.exec(k),_caf=g&&(g.length>1)&&g[me._TI_NAME];if(!_caf){return;}dojo.query("[id=\""+_cae+"\"]",me._container).at(0).forEach(function(node){me._sub[_caf]=node;},me);if(!(me._sub[_caf]||(_caf==="select_all")||(_caf==="select_top"))){console.error(_cad+": could not find subcontrol \""+_caf+"\" (id: \""+_cae+"\" not found in container with id:\""+me.id+"\").");}},me);a=me._sub.geo_select;if(a){if(me.node_geo_select_level.length>me.areas.levels.length){console.error(_cad+"._init(): levels length do not match:",me.node_geo_select_level,me.areas.levels);}}if(me._sub.select_all){dojo.connect(me._sub.select_all,"onclick",me,"_allareas_selected");}if(me.on_select){dojo.connect(me,"allareas_selected",me,"on_select");}if(me._sub.select_top){dojo.connect(me._sub.select_top,"onclick",me,"select_top");}dojo.connect(me,"toparea_selected",me,function(){me._areaindex_selected(me.areas.children.top[0]);});dojo.hitch(me,function(){var t_in=me._sub.text_input,_cb0;var _cb1,_cb2;dojo.connect(t_in,"onkeypress",function(e){alp.util.asyncHitch(function(_cb3){_cb2(t_in.value);if(e&&(dojo.indexOf([dojo.keys.DOWN_ARROW],e.keyCode)>-1)){me._text_arrow_down();}if(e&&(dojo.indexOf([dojo.keys.UP_ARROW],e.keyCode)>-1)){me._text_arrow_up();}if(e&&(dojo.indexOf([dojo.keys.ENTER],e.keyCode)>-1)){me._text_arrow_enter();}},me)(e.keyCode);});dojo.connect(me,"text_changed",alp.util.asyncHitch(function(){t_in.value=_cb1();}));_cb1=dojo.hitch(me,function(){return _cb0||"";});_cb2=dojo.hitch(me,function(v){if(v!==_cb0){_cb0=""+v;me._text_changed(_cb0);}});dojo.connect(me,"refresh",function(){me._text_changed(_cb1());});})();dojo.connect(me,"text_changed",me,"text_search");dojo.connect(me,"text_search_result",me,"list_update");dojo.hitch(me,function(){var _cb4,_cb5,_cb6,_cb7,_cb8;_cb4=alp.util.asyncHitch(function(){_cb6=me._sub.text_select.value;me._sub.text_ok.style.visibility=_cb6?"":"hidden";_cb5();},me);_cb5=alp.util.asyncHitch(function(){if(me._sub.text_select.firstChild){alp.util.setNodeText(me._sub.text_ok_msg,"");}else{alp.util.setNodeText(me._sub.text_ok_msg,alp.x.i18n.areaselector_none);}},me);_cb7=alp.util.asyncHitch(function(){if(_cb6){me._areaindex_selected(_cb6);}},me);_cb8=dojo.hitch(me,function(ud){var ts=me._sub.text_select;if(ts.firstChild){var si=ts.selectedIndex;if(ud==="down"){ts.selectedIndex=(typeof si==="number")?(si+1):0;}else{ts.selectedIndex=((si>-1)?si:ts.childNodes.length)-1;}_cb4();}_cb5();});dojo.connect(me._sub.text_select,"onchange",_cb4);dojo.connect(me,"list_update",_cb4);dojo.connect(me._sub.text_ok,"onclick",_cb7);dojo.connect(me,"text_arrow_down",function(){_cb8("down");});dojo.connect(me,"text_arrow_up",function(){_cb8("up");});dojo.connect(me,"text_arrow_enter",_cb7);_cb4();})();me._init_dfrd.addCallback(me,function(){var a,arr,f_1,f_2,_cb9,geo,_cba,mm,_cbb,_cbc;_cb9=dojun.filter(dojo.map(me.node_geo_select_level,function(o){return dojo.mixin(dojun.mapIn(o,function(v,k){if(k==="choice_text"){return alp.util.fun_or_not(v);}var ret;dojo.query("[id=\""+v+"\"]",me._sub.geo_select).at(0).forEach(function(node){ret=node;});return ret;},me),{is_subtree_choosable:dojo.hitch(me,"_is_subtree_choosable")});},me),function(x){return alp.util.and(["showhide","select","choice_text","is_subtree_choosable"],function(s){return x[s];});});geo=dojo.map(_cb9,function(opt){return new alp.x._AreaGeoLevel(me.areas,opt);},me);me._geo=geo;_cbb=alp.util.asyncHitch(function(){alp.util.conlog(me.declaredClass+": update_geo_ok --- ");var a,b,_cbd=null;for(a=geo.length-1;a>=0;a--){b=parseInt(geo[a].get_selected_area(),10);if(alp.util.isFiniteNumber(b)){_cbd=b;break;}}if(_cbc!==_cbd){_cbc=_cbd;me._sub.geo_ok.style.visibility=((_cbc!==undefined)&&me._is_area_choosable(_cbc))?"":"hidden";}},me);dojo.connect(me._sub.geo_ok,"onclick",alp.util.asyncHitch(function(){if(alp.util.isFiniteNumber(_cbc)){me._areaindex_selected(_cbc);}},me,0,_cbc));f_1=dojo.hitch(me,function(a){dojo.connect(geo[a],"selection_changed",me,function(sel){var b,_cbe,_cbf;_cbe=sel&&me.areas.children[sel];if((typeof sel!=="number")||(isNaN(sel))||(!(_cbe&&(_cbe.length>0)))){geo[a+1].set_contents();return;}_cbf=me.areas.tree[_cbe[0]][me._TI_LEVEL];for(b=a+1;b<Math.min(geo.length-1,_cbf);b++){geo[b].set_contents();}if(_cbf<geo.length){window.setTimeout(function(){geo[_cbf].set_contents(sel);});}});});f_2=function(a){dojo.connect(geo[a],"selection_changed",_cbb);};for(a=0;a<geo.length;a++){if(a<geo.length-1){f_1(a);}f_2(a);}dojo.forEach(["minlevel","maxlevel"],function(s){me[s]=Math.min(geo.length-1,Math.max(0,me.areas[s]));},me);_cba=dojun.map([me.minlevel,me.maxlevel],dojo.hitch(alp.util,"isFiniteNumber"));if(!alp.util.and(_cba)){mm=alp.util.minmax(dojun.map(me.areas.tree,"x->x[0]"));if(!_cba[0]){me.minlevel=mm[0];}if(!_cba[1]){me.maxlevel=mm[1];}}arr=me.node_geo_select_level;geo[Math.max(0,me.minlevel)].set_contents("top");if(me.autohide_topsingle&&me.areas.children.top.length<2){geo[Math.max(0,me.minlevel)].major_vis.unset();}arr=alp.util.minmax([me.minlevel,me.maxlevel]);me.minlevel=Math.max(me.minlevel_custom,arr[0]);me.maxlevel=Math.min(me.maxlevel_custom,arr[1]);for(var a=0,_cc0=geo.length;a<_cc0;a++){if(geo[a]){geo[a].major_vis.set(me.minlevel<=a&&a<=me.maxlevel);}}me._eh_geo||(me._eh_geo=dojo.connect(me,"refresh",me,function(){geo[Math.max(0,me.minlevel)].refresh();geo[Math.max(0,me.minlevel)].set_contents("top");}));});if(me.on_select){dojo.connect(me,"area_selected",me,"on_select");}me.refresh();me._init_dfrd.callback(true);},refresh:function(){var _cc1={};if(this._instanced){for(var k in this._instanced){if(!(k in _cc1)){var v=this._instanced[k];if(v){v._cache=null;}}}}},text_search:function(v){var o;alp.util.conlog(this.declaredClass+" text_search v",v);this._text_searcher||(this._text_searcher=new alp.util.SortedDataSearcher(dojo.hitch(this,function(){return (this.areas&&this.areas.tree&&this.areas.tree.length)||0;}),dojo.hitch(this,"_areaname_compare_with"),dojo.hitch(this,"_areaname_starts_with")));o=this._text_searcher.search(v);if(!o){this._text_search_result();return;}this._text_search_result(o.first,o.last);},_areaname_starts_with:function(_cc2,v){if(this.areas.tree[_cc2][this._TI_NAME].length<v.length){return false;}return 0===this._areaname_compare_with(_cc2,v);},_areaname_compare_with:function(_cc3,v){var _cc4=this.areas.tree[_cc3][this._TI_NAME],_cc5,cn_v;if(_cc4.substr(0,v.length).toLowerCase()===v.toLowerCase()){return 0;}_cc5=this._make_comparable_name(_cc4);cn_v=this._make_comparable_name(v);if(_cc5<cn_v){return -1;}if(_cc5>cn_v){return +1;}console.error(this.declaredClass+"._areaname_compare_with(): bug!",_cc4,v,_cc5,cn_v);},_make_comparable_name:function(v){var a,arr,cc,me=this._make_comparable_name,n,_cc6=this.areas.order,_cc7;me._cache=me._cache||{};if(me._cache[v]===undefined){_cc7=v.toLowerCase();arr=new Array(_cc7.length);for(a=0;a<_cc7.length;a++){n=_cc6.indexOf(_cc7.charAt(a));cc=_cc7.charCodeAt(a);if(n>-1){cc=32+n;}else{cc=Math.max(32+_cc6.length,cc);}arr[a]=String.fromCharCode(cc);}me._cache[v]=arr.join("");}return me._cache[v];},list_update:function list_update(_cc8,last){var a,frag,n,ts,_cc9=this.areas.HIDDEN_NAME;alp.util.conlog(this.declaredClass+".list_update( ",_cc8,", ",last," )");ts=this._sub.text_select;if(!ts){return;}frag=document.createDocumentFragment();n=0;if((_cc8!==undefined)&&(last!==undefined)){for(a=_cc8;(n<this.text_select_max)&&(a<=last);a++){if(!this._is_area_choosable(a)){continue;}var x=this.areas.tree[a],_cca=(x&&x[this._TI_NAME]===_cc9);if(_cca){continue;}frag.appendChild(dojo.create("option",{innerHTML:this.areas.tree[a][this._TI_NAME],value:a}));n++;}}dojox.html.set(ts,frag);},is_empty:function(){var ts=this._sub&&this._sub.text_select;if(!ts){return true;}return dojo.query("option",ts).length<1;},_is_subtree_choosable:function(_ccb){if(this._init_dfrd.fired!==0){console.error(this.declaredClass+"._is_subtree_choosable("+_ccb+"): MUST not be called before init finished!");return;}var attr=this.areas.attr,me=dojo.getObject("_instanced._is_subtree_choosable",true,this);me._cache=me._cache||{};if(me._cache[_ccb]===undefined){me._cache[_ccb]=this.is_choosable(_ccb,attr.subtrees,true);}return me._cache[_ccb];},_is_area_choosable:function(_ccc){if(this._init_dfrd.fired!==0){console.error(this.declaredClass+"._is_area_choosable("+_ccc+"): MUST not be called before init finished!");return;}var attr=this.areas.attr,me=dojo.getObject("_instanced._is_area_choosable",true,this);me._cache=me._cache||{};if(me._cache[_ccc]===undefined){me._cache[_ccc]=this.is_choosable(_ccc,attr.nodes,false);}return me._cache[_ccc];},allareas_selected:function allareas_selected(){alp.util.conlog(this.declaredClass+".allareas_selected()");},toparea_selected:function toparea_selected(){alp.util.conlog(this.declaredClass+".toparea_selected()");},area_selected:function area_selected(id,_ccd){alp.util.conlog(this.declaredClass+" area_selected, id:",id,", more info:",_ccd);},text_arrow_down:function text_arrow_down(){alp.util.conlog(this.declaredClass+".text_arrow_down()");},text_arrow_enter:function text_arrow_up(){alp.util.conlog(this.declaredClass+".text_arrow_enter()");},text_arrow_up:function text_arrow_up(){alp.util.conlog(this.declaredClass+".text_arrow_up()");},text_changed:function text_changed(v){alp.util.conlog(this.declaredClass+" text_changed, v:",v);},text_search_result:function text_search_result(_cce,last){alp.util.conlog(this.declaredClass+" text_search_result, first: "+_cce+", last: "+last);},_allareas_selected:alp.util.asyncHitch("allareas_selected"),_toparea_selected:alp.util.asyncHitch("toparea_selected"),_areaindex_selected:function(_ccf){var info=this.area_info(parseInt(_ccf,10));alp.util.asyncHitch("area_selected",this)(info&&info.id,info);},_text_arrow_down:alp.util.asyncHitch("text_arrow_down"),_text_arrow_enter:alp.util.asyncHitch("text_arrow_enter"),_text_arrow_up:alp.util.asyncHitch("text_arrow_up"),_text_changed:alp.util.asyncHitch("text_changed"),_text_search_result:alp.util.asyncHitch("text_search_result")});dojo.declare("alp.x._AreaGeoLevel",null,{autoselect_single:true,major_vis:null,_minor_vis:null,constructor:function(_cd0,opts){var me=this;me.areas=_cd0;dojo.mixin(me,opts);(me.major_vis=new alp.data.BoolState({init_value:true})).entered_cb(me,"_update_vis");(me._minor_vis=new alp.data.BoolState()).entered_cb(me,"_update_vis");me._TI_LEVEL=me.areas.TREE_INDEX_LEVEL;me._TI_NAME=me.areas.TREE_INDEX_NAME;me._TI_ID=me.areas.TREE_INDEX_ID;me._TI_PARENTS=me.areas.TREE_INDEX_PARENTS;me._TI_BBOX=me.areas.TREE_INDEX_BBOX;me._TI_NICEID=me.areas.TREE_INDEX_NICEID;me._TI_ACTIV=me.areas.TREE_INDEX_ACTIV;dojo.connect(me.select,"onchange",me,"_fire_selection_changed");},get_selected_area:function(){return this.select.value+"";},refresh:function(){this.set_select();},set_select:function(_cd1){this.select.value=(_cd1!=null)?(_cd1+""):"";this._fire_selection_changed();},set_contents:function(_cd2){var c,frag,_cd3,_cd4,n,_cd5,_cd6=this.areas.HIDDEN_NAME;alp.util.conlog(this.declaredClass+".set_contents(",_cd2,")");c=_cd2&&this.areas.children[_cd2];c=c&&dojo.filter(c,this.is_subtree_choosable,this);if(!alp.util.equal_array(this._c,c)){_cd3=c&&(c.length>0);_cd4=false;if(_cd3&&c.length===1){var ind=c[0],x=this.areas.tree[ind];_cd4=(x&&x[this._TI_NAME]===_cd6);}frag=document.createDocumentFragment();n=0;if(_cd3){frag.appendChild(dojo.create("option",{innerHTML:this.choice_text,value:""}));dojo.forEach(c,function(_cd7){var a=this.areas.tree[_cd7][this._TI_NAME];_cd5=""+_cd7;frag.appendChild(dojo.create("option",{innerHTML:a,value:_cd5}));n++;},this);}dojox.html.set(this.select,frag);if((n===1)&&this.autoselect_single){this.select.value=_cd5;alp.util.attr(this.select,"disabled","disabled");}else{this.select.removeAttribute("disabled");}this._minor_vis.set(_cd3&&(!_cd4));this._c=c;this._contents_changed();this._fire_selection_changed();}},_update_vis:function(){if(this.major_vis.get()){this.showhide.style.display="";this.showhide.style.visibility=this._minor_vis.get()?"":"hidden";}else{this.showhide.style.display="none";}},_fire_selection_changed:function _fire_selection_changed(){var _cd8=this._c&&(this._c.length>0);this._selection_changed(_cd8?(this.select.value?parseInt(this.select.value,10):undefined):"hidden");},contents_changed:function contents_changed(){alp.util.conlog(this.declaredClass+".contents_changed()");},selection_changed:function selection_changed(id){alp.util.conlog(this.declaredClass+".selection_changed("+id+")");},_contents_changed:alp.util.asyncHitch("contents_changed"),_selection_changed:alp.util.asyncHitch("selection_changed")});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.x.sportselector"]){typeof dojo==="undefined"||(dojo._hasResource["alp.x.sportselector"]=true);dojo.provide("alp.x.sportselector");dojo.declare("alp.x.SportSelector",null,{top_node:undefined,sport_q:".select-box .sport-activity",sportinfo_q:{from:"input.sport-activity-info",whatfrom:"value"},init_sport_q:".select-box-all.sport-activity",init_sport_name:undefined,_selectedNode:undefined,on_select:undefined,cache_info:true,constructor:function(opts){dojo.mixin(this,opts);this._init_dfrd=new alp.util.SafeDeferred();dojo.addOnLoad(this,function(){var _cd9;alp.util.getDfrd(function(){var a=dojo.query(this.sport_q,this.top_node);if(a.length<1){_cd9++;if(_cd9<10){return;}return null;}return a;},this).addCallback(this,function(_cda){if(!_cda){return;}this._nodelist=_cda;var me=this;_cda.onclick(function(){me._selectByNode(this);});if(this.on_select){dojo.connect(this,"selection_changed",this,"on_select");}if(this.init_sport_q){dojo.query(this.init_sport_q,this.top_node).at(0).forEach(function(node){this._selectByNode(node);},this);}if(this.init_sport_name){this.selectByName(this.init_sport_name);}this._init_dfrd.callback(true);});});},init_dfrd:function(){return this._init_dfrd;},init_cb:alp.util.dfrd_cb("init_dfrd"),_inform:function(node,_cdb){if(typeof _cdb==="string"){_cdb=dojo.hitch(this,_cdb);}var me=this;var _cdc=this.cache_info&&node._alp_sportinfo;if(!_cdc){dojo.query(this.sportinfo_q.from,node).at(0).forEach(function(a){_cdc=dojo.fromJson(alp.util.attr(a,me.sportinfo_q.whatfrom));});}if(this.cache_info){alp.util.unleak(node)._alp_sportinfo=_cdc;}_cdb(_cdc);},_selectByNode:function(node){if(this._selectedNode!==node){this._selectedNode=node;this._inform(node,"_selection_changed");}},selectById:function(id){this._selectBy("id",""+id);},selectByName:function(name){this._selectBy("name",""+name);},selectByTitle:function(name){this._selectBy("title",""+name);},_selectBy:function(type,_cdd){this._init_dfrd.addCallback(this,function(){var done;this._nodelist.forEach(function(node){if(done){return;}this._inform(node,dojo.hitch(this,function(info){if(!info){return;}if(done){return;}if(info[type]===_cdd){this._selectByNode(node);done=true;}}));},this);});},current_info:function(){var info;if(!this._selectedNode){return;}this._inform(this._selectedNode,function(_cde){info=_cde;});return info;},selection_changed:function(info){alp.util.conlog(this.declaredClass+".selection_changed(",info,")");},_selection_changed:alp.util.asyncHitch("selection_changed")});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.data.indexstate"]){typeof dojo==="undefined"||(dojo._hasResource["alp.data.indexstate"]=true);dojo.provide("alp.data.indexstate");dojo.declare("alp.data.IndexState",alp.data.State,{constrain_def:function(x){if(!this.n){return x;}var _cdf=this.n.get()-1;if(!(_cdf>-1)){return;}if(alp.util.isFiniteNumber(x)){return Math.max(0,Math.min(_cdf,Math.round(x)));}return this.get();},n:null,constructor:function(opts){this.n=new alp.data.State({constrain_undef:function(x){return 0;},constrain_def:function(x){if(alp.util.isFiniteNumber(x)){return Math.max(0,Math.round(x));}return this.get();}});dojo.connect(this.n,"changed",this,"constrain");this.n.set((opts&&opts.n_init_value)||0);},set_delta:function(_ce0){return this.set(this.get()+_ce0);},set_prev:function(){return this.set_delta(-1);},set_next:function(){return this.set_delta(+1);}});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.x.pager"]){typeof dojo==="undefined"||(dojo._hasResource["alp.x.pager"]=true);dojo.provide("alp.x.pager");dojo.declare("alp.x.Pager",alp.util.Updater,{model:null,container:null,container_empty_class:"pager-no-results",container_not_empty_class:"pager-has-results",q_snippets:null,q_snippetfriends:null,q_previous:null,q_next:null,q_nitems:null,q_mousescrollinfo:null,q_from:".js-pager-from",q_to:".js-pager-to",q_currentpage:".js-pager-current-page",q_npages:".js-pager-npages",q_first:".js-pager-first",q_last:".js-pager-last",q_loading:null,loading_delay_ms:333,init_page:0,inactive_button_class:"inactive-pager-button",upfun_snippet:function(node,_ce1){dojox.html.set(node,""+_ce1);},upfun_nitems:function(_ce2,_ce3){alp.util.conlog(this.declaredClass+".upfun_nitems(",_ce2,", ",_ce3,")");alp.util.attr(_ce2,"value",""+_ce3);alp.util.conlog(this.declaredClass+".upfun_nitems(",_ce2,", ",_ce3,")  --- done.");},upfun_from:function(noli,from){alp.util.setNodeText(noli,""+(1+from));},upfun_to:function(noli,to){alp.util.setNodeText(noli,""+(1+to));},upfun_currentpage:function(noli,_ce4){alp.util.setNodeText(noli,""+(1+_ce4));},upfun_npages:function(noli,_ce5){alp.util.setNodeText(noli,""+_ce5);},upfun_previous_next:function(_ce6,_ce7){_ce6.setClass(this.inactive_button_class,!_ce7);},constructor:function(_ce8){var a;dojo.mixin(this,_ce8);if(!this.model){this.model=new alp.data.PagerReadWriteModel();}a=["q_snippets"];if(!dojo.every(a,function(s){return this[s];},this)){console.error(this.declaredClass+"constructor(",_ce8,"): please provide all mandatory settings:",a);return;}this.init();},init:function(){if(this._old_view_connect){var ovc=this._old_view_connect;while(ovc.length>0){dojo.disconnect(ovc.pop());}}this._old_view_connect=[];this._view_connected=false;dojun.forIn(this,function(v,k){var name;if(k.slice(0,2)!=="q_"){return;}name=k.slice(2);if(!name){return;}this["dom_"+name]=alp.util.isNodeList(v)?v:dojo.query(v,this.container);},this);if(!(this.dom_snippets&&(this.dom_snippets.length>0))){console.error(this.declaredClass+".init(): could not find the snippets in the DOM!");return;}if(this.dom_snippetfriends&&(this.dom_snippetfriends.length!==this.dom_snippets.length)){if(this.dom_snippetfriends.length>0){console.error(this.declaredClass+".init(): wrong number of snippetfriends ("+this.dom_snippetfriends.length+" !== "+this.dom_snippets.length);}this.dom_snippetfriends=null;}this.view_loading_feedback();if(this.model){this._init();}},set_model:function(_ce9){if(_ce9===this.model){return;}this.model=_ce9;this._current_page=null;this._visible_page=null;this.view_loading_feedback();this._init();},_init:function(){if(!this.model){console.error(this.declaredClass+"._init(): missing this.model:",this.model);return;}if((this.model.declaredClass==="alp.data.PagerAbstractModel")||(!(this.model instanceof alp.data.PagerAbstractModel))){console.error(this.declaredClass+"._init(): settings.model must inherit from alp.data.PagerAbstractModel");return;}dojo.forEach(this._old_connect,function(h){dojo.disconnect(h);});this._old_connect=[];this._old_connect.push(dojo.connect(this.model,"changed",this,"update"));var me=this;if(!(this._view_connected&&this._old_view_connect&&(this._old_view_connect.length>0))){var ovc=this._old_view_connect=[];this.dom_previous.forEach(function(node){ovc.push(dojo.connect(node,"onclick",dojo.hitch(me,"shift_page",-1)));});this.dom_next.forEach(function(node){ovc.push(dojo.connect(node,"onclick",dojo.hitch(me,"shift_page",+1)));});this.dom_first.forEach(function(node){ovc.push(dojo.connect(node,"onclick",dojo.hitch(me,"set_page",0)));});this.dom_last.forEach(function(node){ovc.push(dojo.connect(node,"onclick",dojo.hitch(me,"set_page",+Infinity)));});dojo.forEach(["onmouseout","onmouseover","onclick"],function(s){var s2="_dom_snippets_"+s;if(!me[s2]){console.error(me.declaredClass+" does not have a \""+s2+"\" private event.");return;}me.dom_snippets.forEach(function(node){ovc.push(dojo.connect(node,s,function(){var node=this,_cea=me.dom_snippets.indexOf(node),page=me.current_page();if(0>_cea){return;}me[s2](node,me.fromPageIndexToN(page,_cea),page,_cea);}));});});this._view_connected=true;}this.set_page(this.init_page);this.update();this.view_loading_feedback();},snippet_index:function(node){if(this.dom_snippets&&node){return dojo.indexOf(this.dom_snippets,node);}return -1;},nsnippets:function(){return (this.dom_snippets&&this.dom_snippets.length)||0;},nipp:function(){return this.nsnippets();},set_page:function(v){var v2=this.make_legal_page(v);alp.util.conlog(this.declaredClass+".set_page(",v,") ----------> v2:",v2);if(v2!==this._current_page){this._current_page=v2;this.update();this._page_changed(this._current_page);}},make_legal_page:function(x){var x2=(typeof x==="string")?parseInt(x,10):x,ret;if((typeof x2!=="number")||isNaN(x2)){ret=this.current_page();}else{ret=Math.max(0,Math.min(this.npages()-1,x2));}if(!alp.util.isFiniteNumber(ret)){return 0;}return ret;},shift_page:function(_ceb){return this.set_page(this.current_page()+_ceb);},current_page:function(){return this._current_page||0;},visible_page:function(){return this._visible_page;},visible_from:function(){return this.visible_page()*this.nipp();},visible_to:function(){return Math.min(this.nitems()-1,(1+this.visible_page())*this.nipp()-1);},visible_items_indices:function(){var nipp=this.nipp(),p=this.visible_page();return {start:Math.min(p*nipp,this.nitems()-1),end:Math.min((p+1)*nipp,this.nitems())};},nitems:function(){return this.model.nitems();},npages:function(){var n=this.nitems(),p=this.nsnippets();return Math.max(1,Math.floor(n/p)+((n%p>0)?1:0));},fromPageIndexToN:function(page,_cec,_ced){if(!this.model){console.error(this.declaredClass+".fromPageIndexToN(): missing this.model:",this.model);return;}if(_ced==null){_ced=this.nsnippets();}return Math.max(0,Math.min(this.nitems()-1,Math.max(0,Math.min(this.npages()-1,page))*_ced+Math.max(0,Math.min(_ced-1,_cec))));},fromNToPageIndex:function(n,_cee){if(!this.model){console.error(this.declaredClass+".fromNToPageIndex(): missing this.model:",this.model);return;}if(_cee==null){_cee=this.nsnippets();}var n2=Math.max(0,Math.min(this.nitems()-1,n));return {page:Math.floor(n2/_cee),index:n2%_cee};},updateImpl:function(){var arr,cp,_cef,me;cp=this._current_page;if(!((cp!=null)&&(-1<cp)&&(cp<this.npages()))){this.set_page(cp);return;}cp=this.current_page();_cef=dojo.hitch(this,function(_cf0){var a,p,n,node;for(a=0,p=this.nsnippets(),n=cp*p;a<p;a++,n++){node=this.dom_snippets[a];_cf0.call(this,node,a,n,(-1<n)&&(n<this.nitems()));}});this._clean_update_dfrd_list();arr=[];_cef(function(node,a,n,_cf1){if(!_cf1){return;}arr.push(n);});this._update_dfrd_list=this.model.contents_dfrd(arr);this._update_dfrd_list.addCallback(dojo.hitch(this,"_updateView",cp,_cef,this._update_dfrd_list));alp.util.asyncHitch("view_loading_feedback",this,this.loading_delay_ms)();},_clean_update_dfrd_list:function(){if(this._update_dfrd_list){this._update_dfrd_list.cancel();this._update_dfrd_list=null;}},_updateView:function(page,_cf2,_cf3,_cf4){var _cf5,x,_cf6;if(_cf3!==this._update_dfrd_list){return;}_cf5=this._update_dfrd_list;this._update_dfrd_list=null;_cf2(function(node,a,n,_cf7){if(!_cf4[a]){node.style.visibility="hidden";node.style.display="none";return;}this.upfun_snippet(node,_cf4[a]);node.style.visibility="";node.style.display="";_cf6=true;});if(this.dom_snippetfriends){dojo.forEach(dojun.zip(this.dom_snippets,this.dom_snippetfriends),function(ab){ab[1].style.visibility=ab[0].style.visibility;ab[1].style.display=ab[0].style.display;},this);}var _cf8=this.nitems();this.upfun_nitems(this.dom_nitems,_cf8);if(this.container){var _cf9=!(_cf8>0);alp.util.setClass(this.container,this.container_empty_class,_cf9,this.container_not_empty_class,!_cf9);}x=this.current_page();this.upfun_previous_next(this.dom_previous,x>0);this.upfun_previous_next(this.dom_next,x<this.npages()-1);this.upfun_previous_next(this.dom_first,x>0);this.upfun_previous_next(this.dom_last,x<this.npages()-1);this._visible_page=page;this.view_loading_feedback();if(this.dom_from){this.upfun_from(this.dom_from,this.visible_from());}if(this.dom_to){this.upfun_to(this.dom_to,this.visible_to());}if(this.dom_currentpage){this.upfun_currentpage(this.dom_currentpage,this.visible_page());}if(this.dom_npages){this.upfun_npages(this.dom_npages,this.npages());}if(_cf6){this._view_changed();}},view_loading_feedback:function(){var _cfa=alp.util.isFiniteNumber(this.current_page())&&(this.current_page()===this.visible_page());alp.util.conlog("alp.x.Pager.view_loading_feedback(): actual:",_cfa);this.dom_loading.style({"visibility":_cfa?"hidden":"","display":_cfa?"none":"block"});},page_changed:function(page){alp.util.conlog(this.declaredClass+".page_changed("+page+")");},view_changed:function(){alp.util.conlog(this.declaredClass+".view_changed()");},dom_snippets_onclick:function(_cfb,n,page,_cfc){alp.util.conlog.apply(alp.util,[this.declaredClass+".dom_snippets_onclick(...) "].concat(arguments));},dom_snippets_onmouseout:function(_cfd,n,page,_cfe){alp.util.conlog.apply(alp.util,[this.declaredClass+".dom_snippets_onmouseout(...) "].concat(arguments));},dom_snippets_onmouseover:function(_cff,n,page,_d00){alp.util.conlog.apply(alp.util,[this.declaredClass+".dom_snippets_onmouseover(...) "].concat(arguments));},_page_changed:alp.util.asyncHitch("page_changed"),_view_changed:alp.util.asyncHitch("view_changed"),_dom_snippets_onclick:alp.util.asyncHitch("dom_snippets_onclick"),_dom_snippets_onmouseout:alp.util.asyncHitch("dom_snippets_onmouseout"),_dom_snippets_onmouseover:alp.util.asyncHitch("dom_snippets_onmouseover")});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.x.pagerselect"]){typeof dojo==="undefined"||(dojo._hasResource["alp.x.pagerselect"]=true);dojo.provide("alp.x.pagerselect");dojo.require("alp.util");dojo.require("alp.data.indexstate");dojo.require("alp.x.pager");dojo.declare("alp.x.PagerSelect",alp.x.Pager,{snippet_highlight_class:"highlight",snippet_highlight_q:"[id=\"snippet\"]",_sel:undefined,constructor:function(){this._sel=new alp.data.IndexState({n_init_value:this.dom_snippets.length});dojo.connect(this._sel,"entered",this,"_selection_changed");dojo.connect(this,"selection_changed",this,"highlight_selected");dojo.connect(this,"view_changed",this,"highlight_selected");dojo.connect(this,"page_changed",this,function(){if(this._sel.has_selection()){this._selection_changed();}});this.init();},init:function(){alp.x.PagerSelect.superclass.init.apply(this);if(this._select_view_eh){while(this._select_view_eh.length>0){dojo.disconnect(this._select_view_eh.pop());}}this._select_view_eh=[];var me=this;this.dom_snippets.forEach(function(node){me._select_view_eh.push(dojo.connect(node,"onclick",function(){me.select_snippet(this);}));});},highlight_selected:function(){var _d01=this.selected_snippet();this.dom_snippets.forEach(function(node){dojo.query(this.snippet_highlight_q,node).setClass(this.snippet_highlight_class,node===_d01);},this);},selected_item_index:function(){var _d02=this.selected_snippet_index(),_d03=this.current_page();if((_d02<0)||(_d03<0)){return;}return this.fromPageIndexToN(_d03,_d02);},selected_snippet:function(){var ind=this._sel.get();if(ind===undefined){return;}return this.dom_snippets[ind];},selected_snippet_index:function(){return this._sel.get();},unselect:function(){this._sel.unset();},select_item:function(n){var h,o;if(n===undefined){this._sel.unset();return;}n=Math.max(0,Math.min(this.nitems()-1,n));o=this.fromNToPageIndex(n);if(this.visible_page()===o.page){this._sel.set(o.index);return;}h=dojo.connect(this,"view_changed",this,function(){if(this.visible_page()===o.page){dojo.disconnect(h);this._sel.set(o.index);this._sel.setUpdateActive("pagerselect",true);}});this._sel.setUpdateActive("pagerselect",false);this._sel.unset();this.highlight_selected();this.set_page(o.page);},select_snippet:function(x){var a;alp.util.conlog(this.declaredClass+".select_snippet(x)   x:",x);if((x===undefined)||(typeof x==="number")){this._sel.set(x);return;}a=this.dom_snippets.indexOf(x);this.select_snippet((a<0)?undefined:a);},select_prev:function(){this.shift_selection(-1);},select_next:function(){this.shift_selection(+1);},shift_selection:function(_d04){alp.util.conlog(this.declaredClass+".shift_selection(",_d04,")");if(!this._sel.has_selection()){this._sel.set(0);return;}this.select_item(this.selected_item_index()+_d04);},selection_changed:function(){alp.util.conlog(this.declaredClass+": selection_changed, page:",this.visible_page(),", snippet: ",this.selected_snippet_index(),this.selected_snippet(),", this.selected_item_index():",this.selected_item_index());},_selection_changed:alp.util.asyncHitch("selection_changed")});}if(typeof dojo==="undefined"||!dojo._hasResource["alp.util.reload"]){typeof dojo==="undefined"||(dojo._hasResource["alp.util.reload"]=true);dojo.provide("alp.util.reload");alp.util.reload.TOPIC="/alp/util/reload/done";alp.util.reload=function(_d05,opts){var _d06=dojo.mixin({},{interval_ms:2222,callback:function(url,info){var aui=new alp.util.IframeLoader(url);},errback:function(r,_d07){alert("Misserfolg!");},reload_counter_name:"reload_cnt"},opts);var url=new dojo._Url(_d05);var _d08=alp.util.encQueryToObject(url.query||"");var _d09=0;var _d0a=_d05.split("?")[0];var ao=dojo.getObject("alp._obj",true);ao.reload_done_async_dfrd=new alp.util.SafeDeferred();var _d0b=false;var f=function(){_d08[_d06.reload_counter_name]=_d09+"_"+(new Date()).getTime()+Math.random();_d09++;var _d0c=_d0a+"?"+alp.util.objectToQuery(_d08);if(djConfig.isDebug){console.log("alp.util.reload: \""+_d0c+"\"");}dojo.xhrGet({url:_d0c,handleAs:"json",load:function(r,_d0d){if(djConfig.isDebug){console.log("alp.util.reload: r:",r);console.log("alp.util.reload: ioArgs:",_d0d);console.log("alp.util.reload: received:",_d0b,", r && r.url:",r&&r.url);}if(_d0b){return;}if(r&&r.info&&(r.info.status==="abort")){console.error("alp.util.reload: failed, server sent status \""+r.info.status+"\"");console.error("alp.util.reload: full server answer:",r);if(_d06&&_d06.errback){_d06.errback(r,_d0d);}return;}if(r&&r.url){_d0b=true;var info={_opts:_d06,r:r,ioArgs:_d0d};dojo.publish(alp.util.reload.TOPIC,info);ao.reload_done_async_dfrd.callback(info);alp.util.conlog("alp.util.reload: about to call the callback ",_d06.callback," with ",r.url,info);_d06.callback(r.url,info);return;}if(r){dojun.forIn(r,function(v,k){if(!alp.util.or(["string","number","boolean"],"==\""+typeof v+"\"")){return;}_d08[k]=v;});}window.setTimeout(f,_d06.interval_ms);}});};f();};}if(typeof dojo==="undefined"||!dojo._hasResource["alp.view.dialog_pdf"]){typeof dojo==="undefined"||(dojo._hasResource["alp.view.dialog_pdf"]=true);dojo.provide("alp.view.dialog_pdf");dojo.global.displayPdfDownloadDialog=function(_d0e){document.getElementById("pdfDownloadDialog").style.display="block";document.getElementById("hiddenDownloadUrl").value=_d0e;var _d0f=dojo.byId("pdfSel");if(_d0f!=null){_d0f.innerHTML="";dojo.forEach(dojun.filter([[46500,{value:"25000",innerHTML:"1:25.000"}],[93000,{value:"50000",innerHTML:"1:50.000"}],[250000,{value:"100000",innerHTML:"1:100.000"}],[1000000,{value:"250000",innerHTML:"1:250.000"}]],dojo.byId("hiddenDownloadTourLength").value+"<item[0]"),function(x){_d0f.appendChild(dojo.create("option",x[1]));});}dijit.byId("pdfDownloadDialog").show();};dojo.global.downloadPdfUrl=function(){var _d10=document.getElementById("hiddenDownloadUrl").value;var _d11=document.getElementById("hiddenDownloadType").value;if(typeof (dijit.byId("pdfDownloadDialog"))!=="undefined"){dijit.byId("pdfDownloadDialog").hide();}var ret;if(_d11!="fixscalemap"){var _d12=dojo.byId("withImgsInp").checked?"":"&exclude=pictures";var _d13="";if(dojo.byId("languageFallbackInp")!=undefined){_d13=dojo.byId("languageFallbackInp").checked?"&fallback=false":"";}var ret=_d10+"&layout="+_d11+_d12+_d13;}else{var _d14=document.getElementById("pdfSel").options[document.getElementById("pdfSel").selectedIndex].value;ret=_d10+"&layout="+_d11+"&scale="+_d14;}return alp.util.url_fix_slashes(ret);};dojo.global.downloadPdf=function(opts){opts=dojo.delegate({downloadPdf:"downloadPdf",downloadPdfUrl:"downloadPdfUrl",hiddenDownloadUrl_q:"[id=\"hiddenDownloadUrl\"]",pdfDownloadDialog_id:"pdfDownloadDialog",pdf_ready_dialog_id:"pdf_ready_dialog",pdf_ready_link_q:"[id=\"pdf_ready_dialog\"] a[id=\"pdf_ready_link\"]",pdf_wait_dialog_id:"pdf_wait_dialog"},opts);var hide=function(_d15){var w=dijit.byId(_d15);if(w){w.hide();}};var show=function(_d16){var w=dijit.byId(_d16);if(w){w.show();}};alp.util.conlog("alp.view.pdfdialog: "+opts.downloadPdf+"() starts.",dojo.query(opts.hiddenDownloadUrl_q));dojo.query(opts.hiddenDownloadUrl_q).at(0).forEach(function(node){var aui,bh,_d17,pd,rd,wd;_d17=dojo.global[opts.downloadPdfUrl]();bh=dojo.getObject("alpConfig.base_href");if(bh){if(bh[bh.length-1]!=="/"){bh+="/";}if(bh&&(_d17.substr(0,bh.length)===bh)){_d17=_d17.substr(bh.length-1);}}else{if(/^\/de\//.test(_d17)){_d17=_d17.substr(4);}}_d17=alp.util.url_fix_slashes(_d17);alp.util.conlog("alp.view.pdfdialog: "+opts.downloadPdf+"(): downloadUrl:",_d17);hide(opts.pdfDownloadDialog_id);show(opts.pdf_wait_dialog_id);alp.util.reload(_d17,{callback:function(url,info){alp.util.ga_trackPDF(url);dojo.query(opts.pdf_ready_link_q).forEach(function(node){dojo.attr(node,"href",url);var t="_blank";dojo.attr(node,"target",t);if(t!=="_blank"){alp.util.iframe_encapsulate(node);}});hide(opts.pdf_wait_dialog_id);show(opts.pdf_ready_dialog_id);var aui=new alp.util.IframeLoader(url);}});});alp.util.conlog("alp.view.dialog: "+opts.downloadPdf+"() finished.");};dojo.global.setType=function(type){document.getElementById("hiddenDownloadType").value=type;};dojo.global.setScale=function(){document.getElementById("multiInp").checked="checked";dojo.global.setType("fixscalemap");};}if(typeof dojo==="undefined"||!dojo._hasResource["alp.view.dialog"]){typeof dojo==="undefined"||(dojo._hasResource["alp.view.dialog"]=true);dojo.provide("alp.view.dialog");dojo.global.gpxDownload=function(){var _d18=document.getElementById("hiddenDownloadUrl").value;var _d19=document.getElementById("exportWaypoints");if(_d19!=undefined){var _d1a=document.getElementById("exportWaypoints").checked;if(_d1a){_d18=_d18+"&exportWaypoints=true";}}dojo.byId("hiddenDownloadUrl").value=_d18;dojo.global.download();};dojo.global.displayDownloadDialog=function(_d1b){document.getElementById("downloadDialog").style.display="block";document.getElementById("hiddenDownloadUrl").value=_d1b;dijit.byId("downloadDialog").show();};dojo.global.download=function(){dijit.byId("downloadDialog").hide();window.setTimeout(function(){var url=((alpConfig&&alpConfig.base_href)||"/de")+"/"+dojo.byId("hiddenDownloadUrl").value;alp.util.conlog("alp.view.dialog is about to download from the url: \""+url+"\"");alp.util.ga_trackGPX_KML(url);alp.x.open_win(url);},(dijit.byId("downloadDialog").duration||333)+100);};dojo.global.openTour2Go=function(url){var _d1c=window.open(url,"popup","width=860,height=800,left=200,top=100,resizable=1,scrollbars=1");_d1c.scrollbars.visible=true;_d1c.focus();};dojo.global.displayCommentDialog=function(_d1d){document.getElementById("commentDialog").style.display="block";dijit.byId("commentSaveButton").setDisabled(true);dijit.byId("commentDialog").show();};dojo.global.updateAssessmentValue=function(_d1e){if(_d1e===0){_d1e="";}dojo.byId("hiddenAssessmentValue").value=_d1e;dojo.global.checkSaveButton();};dojo.global.checkSaveButton=function(){var _d1f=document.getElementById("commentString").value;var _d20=document.getElementById("hiddenAssessmentValue").value;var _d21=document.getElementById("imageUploadField").value;if(dojo.trim(_d1f).length>0||_d20||_d21.length>0){dijit.byId("commentSaveButton").setDisabled(false);}else{dijit.byId("commentSaveButton").setDisabled(true);}};dojo.global.displayLoginDialog=function(){document.getElementById("loginDialog").style.display="block";dijit.byId("loginDialog").show();};dojo.global.gotoLogin=function(){dijit.byId("loginDialog").hide();document.location.href="https://"+document.location.host+(dojo.getObject("alpConfig.base_href")||"/de")+"/community.login.jsp";};dojo.global.displayDeleteConfirmDialog=function(_d22){document.getElementById("deleteConfirmDialog").style.display="block";document.getElementById("hiddenId").value=_d22;dijit.byId("deleteConfirmDialog").show();};oa_v2.links_update=function(id,opts){opts=dojo.delegate({isloggedin_q:{from:"#ooi-info-foot input[name=\"is-logged-in\"]",whatfrom:"value"},extralink:{gps:{to:"#ooi-info-foot .tour-gps-link",whatto:"href",logged:"javascript:displayDownloadDialog(\"download.tour.gpx?i=${id}\")",notlogged:"javascript:displayDownloadDialog(\"download.tour.gpx?i=${id}\")"},print:{to:"#ooi-info-foot .tour-print-link",whatto:"href",logged:"javascript:displayPdfDownloadDialog(\"/itextpdf/generatePdf?i=${id}\")",notlogged:"javascript:displayPdfDownloadDialog(\"/itextpdf/generatePdf?i=${id}\")"},rage:{to:"#ooi-info-foot .tour-rate-link",whatto:"href",logged:"javascript:displayCommentDialog()",notlogged:"javascript:displayLoginDialog()"}}},opts);alp.util.conlog("oa_v2.dialog: oa_v2.link2_update(...):",id,opts);var _d23=false;dojo.query(opts.isloggedin_q.from).at(0).forEach(function(node){_d23=(-1<dojo.indexOf(["true","yes","t","y","1"],dojo.trim(alp.util.attr(node,opts.isloggedin_q.whatfrom)).toLowerCase()));},this);alp.util.conlog("oa_v2.links_update(): isloggedin:",_d23);dojun.forEach(opts.extralink,function(v,k){var _d24=dojo.string.substitute(_d23?v.logged:v.notlogged,{id:id});dojo.query(v.to).forEach(function(node){alp.util.attr(node,v.whatto,_d24);},this);},this);};}if(typeof dojo==="undefined"||!dojo._hasResource["oa_v2.dialog"]){typeof dojo==="undefined"||(dojo._hasResource["oa_v2.dialog"]=true);dojo.provide("oa_v2.dialog");}if(typeof dojo==="undefined"||!dojo._hasResource["oa_v2.tourpreviewdata"]){typeof dojo==="undefined"||(dojo._hasResource["oa_v2.tourpreviewdata"]=true);dojo.provide("oa_v2.tourpreviewdata");dojo.declare("oa_v2.TourPreviewData",null,{db:alp.db.common(),url_template:"${protocol}//${host}${base_href}/data.ooi.jsp?i=${id}",url:function(id){id=alp.util.fun_or_not(id);return dojo.string.substitute(this.url_template,{protocol:dojo.doc.location.protocol,host:dojo.doc.location.host,base_href:dojo.getObject("alpConfig.base_href")||"/de",id:alp.util.fun_or_not(id)});},dbkey:function(id,key){return alp.util.fun_or_not(id)+"."+key;},raw_dbkey:function(id){return this.dbkey(alp.util.fun_or_not(id),"shorthtml");},raw_dbkey_parse:function(dbk){var _d25=/^(-?\d+)\.shorthtml$/;var id=_d25.test(dbk)&&_d25.exec(dbk)[1];return id;},lazy:true,parse_q:dojo.mixin({},alp.cfg.ooi(),{icon:{from:"img.icon",what:"src"},topIcon:{from:".topIcon-value",what:"innerHTML"},title:[{from:".fullTitle-value",what:"value"},{from:".title-value",what:"innerHTML"}]}),constructor:function(opts){dojo.mixin(this,opts);dojo.connect(this.db,"changed",this,"parse_if_not_lazy");},_loading:{},parse_if_not_lazy:function(dbk,_d26){if(this.lazy){return;}var id=this.raw_dbkey_parse(dbk);if(!id){return;}this.parse(id,_d26);},parse:function(id,_d27,_d28){var node;id=id&&alp.util.fun_or_not(id);if(!(id&&_d27)){return;}dojun.forIn(this.parse_q,function(_d29,k){if(_d28&&(k!==_d28)){return;}var dbk=this.dbkey(id,k);if(this.db.has(dbk)){return;}node||(node=dojo.create("div",{innerHTML:_d27}));var _d2a=_d29.from?[_d29]:_d29;for(var i=0,end=_d2a.length;i<end;i++){var q=_d2a[i],_d2b=dojo.query(q.from,node);if(_d2b.length){break;}}_d2b.at(0).forEach(function(a){this.db.getset(dbk,alp.util.attr(a,q.what));if((k==="id")&&(id!==this.db.getset(dbk))){console.error(this.declaredClass+".parse(): insanity with id: "+id+" and this.db.getset( \""+dbk+"\" ): "+this.db.getset(dbk));}},this);},this);return this.db.has(_d28?this.dbkey(id,_d28):id);},get:function(id,_d2c){id=alp.util.fun_or_not(id);alp.util.conlog(this.declaredClass+".get( id:",id,", ?subkey:",_d2c);if(!_d2c){return this.get_raw(id);}if(!this.parse_q[_d2c]){console.error(this.declaredClass+": unknown subkey \""+_d2c+"\". Valied subkeys: "+dojun.keys(this.parse_q));return;}this.get_raw(id).addCallback(this,function(_d2d){if(!_d2c){return;}if(!this.parse(id,_d2d,_d2c)){this.db.erase(this.raw_dbkey(id));this.get_raw(id).addCallback(this,function(_d2e){if(!this.parse(id,_d2e,_d2c)){console.error("oa_v2.TourPreviewData could not retrieve id:"+id+", subkey:"+_d2c);}});}});return this.db.waitfor(this.dbkey(id,_d2c));},get_raw:function(id){id=alp.util.fun_or_not(id);var dbk=this.raw_dbkey(id),url;alp.util.conlog(this.declaredClass+".get_raw( id:",id,") starts");if(!this.db.has(dbk)){url=this.url(id);alp.util.conlog(this.declaredClass+".get_raw( id:",id,") url: ",url);if(!this._loading[url]){this._loading[url]=true;dojo.xhrGet({url:url,handleAs:"text",load:dojo.hitch(this,function(_d2f,_d30){this.db.getset(dbk,_d2f);}),handle:dojo.hitch(this,function(){this._loading[url]=false;})});}}var ret=this.db.waitfor(dbk);alp.util.conlog(this.declaredClass+".get_raw( id:",id,") ends",ret);return ret;}});}if(typeof dojo==="undefined"||!dojo._hasResource["oa_v2.tourpreviewmanager"]){typeof dojo==="undefined"||(dojo._hasResource["oa_v2.tourpreviewmanager"]=true);dojo.provide("oa_v2.tourpreviewmanager");(function(){var CN="oa_v2.TourPreviewManager",_d31="#commentDialog .tour-head-type-icon",_d32="img",_d33=_d31+" "+_d32;dojo.declare(CN,alp.util.Updater,{preview_close_q:".map-info-close",dbk:{geometry:"geometry",geometry_simplified:"geometry_simplified",datatypename:"datatypename"},infocopy_q:{altmax:{to:"#ooi-info-head .altitude_max-value",what:"innerHTML"},altmin:{to:"#ooi-info-head .altitude_min-value",what:"innerHTML"},ascent:{to:"#ooi-info-head .logicalAscent-value",what:"innerHTML"},descent:{to:"#ooi-info-head .logicalDescent-value",what:"innerHTML"},datatypetitle:{to:"#commentDialog .datatypetitle",what:"innerHTML"},difficulty:{to:"#ooi-info-head .difficulty",what:"innerHTML"},duration:{to:"#ooi-info-head .minTime-value",what:"innerHTML"},icon:[{to:"#ooi-info-head img.icon",what:"src"},{to:_d33,what:"src"}],id:[{to:"#commentDialog [name=\"i\"]",what:"value"},{to:"#loginDialog [name=\"i\"]",what:"value"},{to:"#ooi-info-foot [name=\"id-value\"]",what:"value"}],length_km:{to:"#ooi-info-head .tourLength-value",what:"innerHTML"},length_m:{to:"#hiddenDownloadTourLength",what:"value"},morelink:{to:"#ooi-info-foot .morelink",what:"href"},topIcon:{to:"#ooi-info-head .topIconSpan",what:"innerHTML"},title:[{to:"#ooi-info-head .titleSpan",what:"innerHTML"},{to:"#commentDialog .tour-head-title",what:"innerHTML"}]},ensure_unique_q:["#ooi-info-head .topicon"],star_q:"#ooi-info-foot .star",infocopy_star_q:{condition:{to:"#ooi-info-foot .condition-rating"},technique:{to:"#ooi-info-foot .technique-rating"},experience:{to:"#ooi-info-foot .qualityOfExperience-rating"},landscape:{to:"#ooi-info-foot .landscape-rating"}},prev_q_arr:["#ooi-info-foot .ext-scroll-prev"],next_q_arr:["#ooi-info-foot .ext-scroll-next"],isloggedin_q:{from:"#ooi-info-foot input[name=\"is-logged-in\"]",whatfrom:"value"},extralink:{gps:{to:"#ooi-info-foot .tour-gps-link",whatto:"href",logged:"javascript:displayDownloadDialog(\"download.tour.gpx?i=${id}\")",notlogged:"javascript:displayDownloadDialog(\"download.tour.gpx?i=${id}\")"},print:{to:"#ooi-info-foot .tour-print-link",whatto:"href",logged:"javascript:displayPdfDownloadDialog(\"/itextpdf/generatePdf?i=${id}\")",notlogged:"javascript:displayPdfDownloadDialog(\"/itextpdf/generatePdf?i=${id}\")"},rage:{to:"#ooi-info-foot .tour-rate-link",whatto:"href",logged:"javascript:displayCommentDialog()",notlogged:"javascript:displayLoginDialog()"}},earth_navctrl_vis:null,constructor:function(_d34,cc,_d35,opts){this.ooimap=_d34;this.cc=cc;this.pager=_d35;this._ooimap_updater=alp.gmap.get_ooimapupdater(this.ooimap);this._id=new alp.data.State(opts&&opts.idsel_settings);this.data=(opts&&opts.data)||(new oa_v2.TourPreviewData(opts&&opts.data_settings));if(!dojo.every(dojun.keys(this.dbk),function(s){return this.data.parse_q[s];},this)){console.error(this.declaredClass+".constructor(...): this.dbk does not match this.data.parse_q:",this.dbk,this.data.parse_q);}dojo.connect(this._id,"entered",this,"_selection_changed");dojo.connect(this,"selection_changed",this,"update");dojo.forEach(this.prev_q_arr,function(s){dojo.query(s).onclick(this,"select_prev");},this);dojo.forEach(this.next_q_arr,function(s){dojo.query(s).onclick(this,"select_next");},this);dojo.query(this.preview_close_q).onclick(this,"close_preview");dojo.connect(this,"_selection_changed",this,function(){if(!this._id.get()){this.pager.unselect();}});dojo.query(this.star_q).at(0).forEach(function(node){this._star=dojo.clone(node);},this);this.cc.viewDfrd().addCallback(this,function(view){dojo.connect(view,"ooi_clicked",this,function(id){this.ooimap.gmap.closeInfoWindow();this._id.set(id);this._showInfos();});});dojo.connect(this.pager,"selection_changed",this,function(){var n=this.pager.selected_item_index();if(!alp.util.isFiniteNumber(n)){return;}this.pager.model.nToId_dfrd(n).addCallback(dojo.hitch(this._id,"set"));});this.cc.viewDfrd().addCallback(this,function(view){dojo.connect(this.pager,"dom_snippets_onmouseover",this,function(node,n){this.pager.model.nToId_dfrd(n).addCallback(this,function(id){this.data.get(id,this.dbk.geometry_simplified).addCallback(dojo.hitch(view,"on_ooi_mouseover",id));});});});this.earth_navctrl_vis=new alp.data.BoolState();dojo.connect(this.ooimap,"switched_to_3d",this,"earth_update_navctrl");this.earth_update_navctrl();if(dojo.query(_d33).length<1){dojo.query(_d31).forEach(function(cont){cont.appendChild(document.createElement("img"));});}this._hideInfos();this.update();},close_preview:function(){var o,_d36;o=this._last_cluster_map_location;if(o){this.ooimap.gmap.setCenter(o.center,o.zoom,o.type);}this._last_cluster_map_layers.addCallback(this,function(_d37){alp.m(alp.m(this.ooimap,"getLayerDdcDfrd"),"addCallback",function(_d38){_d38.setValue(_d37);});});_d36=0;alp.util.getDfrd(function(){_d36++;var c1=!o,gmap=o&&this.ooimap&&this.ooimap.gmap,c2=gmap&&(gmap.getZoom()===o.zoom)&&gmap.getCenter().equals(o.center),c3=(_d36>10);return c1||c2||c3||undefined;},this).addCallback(this,function(){this.unselect();alp.util.getDfrd("is_active",this.cc).addCallback(this.cc,"update");});},earth_update_navctrl:function(){var o=this.ooimap;if(!(o&&o.is3d())){return;}var _d39=this.earth_navctrl_vis.get();if(_d39===this._last_earth_update_navctrl){return;}o.get_earth_async_cb(function(ge){if(ge){this._last_earth_update_navctrl=_d39;ge.getNavigationControl().setVisibility(_d39?ge.VISIBILITY_SHOW:ge.VISIBILITY_HIDE);}});},_showInfos:function(){if(djConfig.isDebug){console.log(this.declaredClass+"._showInfos()");}this._copyInfos();this._setInfosVisibility(true);this.earth_navctrl_vis.set(false);alp.m(this.ooimap,"highlight",null);},_hideInfos:function(){if(djConfig.isDebug){console.log(this.declaredClass+"._hideInfos()");}this._setInfosVisibility(false);this.earth_navctrl_vis.set(true);},_setInfosVisibility:function(_d3a){if(djConfig.isDebug){console.log(this.declaredClass+"._setInfosVisibility(",_d3a,")");}_d3a=!!_d3a;if(this._are_infos_visible!==_d3a){this._are_infos_visible=_d3a;if(_d3a){if(djConfig.isDebug){console.log(this.declaredClass+"._setInfosVisibility(",_d3a,") --> show:",dojo.global.showInfos);}if(dojo.global.showInfos){dojo.global.showInfos();}}else{if(djConfig.isDebug){console.log(this.declaredClass+"._setInfosVisibility(",_d3a,") --> hide:",dojo.global.hideInfos);}this._ooimap_updater.clearDataNow(true);if(dojo.global.hideInfos){dojo.global.hideInfos();}this._copyInfos_last_id=null;}this.ooimap.onResize();}},updateImpl:function(){var o,_d3b;if(this.cc.is_active()){try{o={center:this.ooimap.gmap.getCenter(),zoom:this.ooimap.gmap.getZoom(),type:this.ooimap.gmap.getCurrentMapType(),bounds:this.ooimap.gmap.getBounds()};if(dojo.every(dojun.keys(o),function(a){return (o[a]!==undefined)&&(o[a]!==null);})){this._last_cluster_map_location=o;}}catch(e){}this._last_cluster_map_layers=new alp.util.SafeDeferred();this.ooimap.getLayerDdcDfrd().addCallback(this,function(_d3c){this._last_cluster_map_layers.callback(_d3c.getValue());});}if(this.in_tour_preview_mode()){this._showInfos();}else{this._hideInfos();}this.cc.set_active(!this.in_tour_preview_mode());},_copyInfos:function(){var me=this,arr,id,_d3d,geom;id=this._id.get();if(!id){return;}if(id&&(this._copyInfos_last_id===id)){return;}this._copyInfos_last_id=id;dojun.forIn(this.infocopy_q,function(v,k){var arr=dojo.isArray(v)?v:[v];this.data.get(id,k).addCallback(this,function(x){dojo.forEach(arr,function(v2){dojo.query(v2.to).forEach(function(node){alp.util.attr(node,v2.what,x);});},this);dojo.forEach(me.ensure_unique_q,function(q){dojo.query(q).slice(1).orphan();});});},this);if(this._star){dojun.forIn(this.infocopy_star_q,function(v,k){this.data.get(id,k).addCallback(this,function(x){dojo.query(v.to).forEach(function(node){var frag=document.createDocumentFragment();for(var i=0;i<x;i++){frag.appendChild(dojo.clone(this._star));}dojox.html.set(node,frag);},this);});},this);}this.data.get(id,this.dbk.geometry).addCallback(this._ooimap_updater,"updateData");this.data.get(id,this.dbk.datatypename).addCallback(this,function(_d3e){var _d3f=oa_v2.maptype.from_datatype(_d3e),gmap=this.ooimap.gmap,_d40,a;if(_d3f){_d40=gmap.getMapTypes();for(a=0;a<_d40.length;a++){if(_d40[a].getName().toLowerCase()===_d3f.toLowerCase()){gmap.setMapType(_d40[a]);return;}}}});this.data.get(id,this.dbk.datatypename).addCallback(this,function(_d41){arr=oa_v2.maplayer.from_datatype(_d41)||[];this.ooimap.getLayerDdcDfrd().addCallback(function(_d42){_d42.setValue(arr);});});if(id&&this.isloggedin_q){oa_v2.links_update(id,{isloggedin_q:this.isloggedin_q,extralink:this.extralink});}},select:function(id){return this._id.set(id);},unselect:function(){return this._id.unset();},in_tour_preview_mode:function(){return this._id.has_selection();},selected_snippet:function(){return this.pager.selected_snippet();},select_snippet:function(x){return this.pager.select_snippet(x);},select_prev:function(){return this.pager.select_prev();},select_next:function(){return this.pager.select_next();},shift_selection:function(_d43){return this.pager.shift_selection(_d43);},selection_changed:function(){},_selection_changed:alp.util.asyncHitch("selection_changed")});})();}if(typeof dojo==="undefined"||!dojo._hasResource["oa_v2.oafc3"]){typeof dojo==="undefined"||(dojo._hasResource["oa_v2.oafc3"]=true);dojo.provide("oa_v2.oafc3");dojo.declare("oa_v2.OAFC3",[alp.util.AbstractWithInit],{current_map_section_button_q:".actualMapSection-button",territory_button_q:".territory-button",territory_button_selectall_text:"Region w&auml;hlen",region_button_selected_class:"regionButtonSelected",always_use_current_bbox:true,territory_select_id:"territory-select-box",resetfilterlink_q:"#resetFilterOptions",filter_checkbox_class:"filter-checks",slider_len_w_id:"slider_len",slider_asc_w_id:"slider_asc",slider_tim_w_id:"slider_tim",slider_vis_template:"slider_${name}_${se}_vis",slider_vis_transform:{"len":function(_d44){return Number(_d44/1000).toFixed(1);},"tim":function(_d45){return Number(_d45/60).toFixed(1);}},submit_auto:true,slider_name_list:["len","asc","tim"],checkbox_cfg:[["dif_e","#filter-checks-easy","l",true],["dif_m","#filter-checks-medium","m",true],["dif_d","#filter-checks-difficult","s",true],["qul_p","#filter-checks-premium","P",true],["qul_s","#filter-checks-standard","S",true],["qul_b","#filter-checks-basic","B",false],[function(_d46,_d47){_d46.qul_p=true;_d46.qul_s=true;_d46.qul_b=!_d47;},"#filter-checks-premiumonly","O",false],[function(_d48,_d49){if(_d49){_d48.tags+=_d48.tags?",":"";_d48.tags+="lo";}},"#filter-checks-loopTour","L",false],[function(_d4a,_d4b){if(_d4b){_d4a.tags+=_d4a.tags?",":"";_d4a.tags+="sc";}},"#filter-checks-scenic","C",false],[function(_d4c,_d4d){if(_d4d){_d4c.tags+=_d4c.tags?",":"";_d4c.tags+="su";}},"#filter-checks-suitableforfamilies","F",false],[function(_d4e,_d4f){if(_d4f){_d4e.tags+=_d4e.tags?",":"";_d4e.tags+="di";}},"#filter-checks-dining","D",false]],pager_settings:undefined,tour_list_dojo_query:{nresult:".result-input",html:".tour_list_result",noresult:".tour_list_noresult",nav:{backward:".tour_list_backward",previous:".tour_list_previous",next:".tour_list_next",next2:".tour_list_next2",forward:".tour_list_forward"},current:".tour_list_current",pagescroll:".scroll"},tour_list_current_id:"tour_list_current",link_to_page_description_q:".js-link-to-page-description",link_to_page_description_url:function(_d50,_d51){return dojo.string.substitute((dojo.getObject("alpConfig.base_href")||"/de")+"/link.to.pagedescription.json?activity=${activity_id}&territory=${territory_id}",{activity_id:(_d50&&_d50.match(/(^\d*$)?/)[1])||"",territory_id:(_d51&&_d51.match(/(^\d*$)?/)[1])||""});},sportminmax:undefined,constructor:function(_d52,_d53){if(_d53){dojo.mixin(this,_d53);}this.ooimap=_d52;this._install();this.submit_filter_values();},_dojo_byId:function(s){return alp.util.unleak(dojo.byId(s));},_dijit_byId:function(s){return alp.util.unleak(dijit.byId(s));},_install:function(){var x,me=this;if(dojo.byId(me.territory_select_id)){x={id:me.territory_select_id,on_select:function(_d54){var f=dojo.global.onAreaSelect;if(f){f(_d54);}}};if(me.is_choosable){x.is_choosable=me.is_choosable;}me._areaselector=new alp.x.AreaSelector(x);dojo.connect(me._areaselector,"allareas_selected",me,function(){me.unset_region_values();dojo.query(me.territory_button_q).attr("innerHTML",me.territory_button_selectall_text).removeClass(me.region_button_selected_class);});dojo.connect(me._areaselector,"area_selected",me,function(id,info){me.set_region_values(info.niceid,id,info.bbox);dojo.query(me.territory_button_q).attr("innerHTML",info.name);});dojo.getObject("alp._obj",true).areaselector=me._areaselector;dojo.query("[id=\""+me._areaselector.id_select_all+"\"]").forEach(function(div){div.style.display="inline";});}me._sportselector=new alp.x.SportSelector(dojo.mixin({on_select:function(info){var f=dojo.global.onSportSelect;if(f){f(info);}}},me.sportselector_opts));dojo.connect(me._sportselector,"selection_changed",me,"_updateDisplayedStartEnd");dojo.connect(me._sportselector,"selection_changed",me,"submit_filter_values");dojo.connect(me._sportselector,"selection_changed",me,"_update_winter_layers");dojo.connect(me._sportselector,"selection_changed",me,"_update_winter_maptype");if(me._areaselector&&me._sportselector){me._init_link_to_page_description();}if(!(me.ooimap instanceof alp.gmap.Map)){_d55();}else{_d56();}function _d55(){var _d57=me.ooimap,_d58=alp.util.encHashToObject().r;if(_d58){me._areaselector.init_cb(function(){me._areaselector.area_infoBy("niceid",_d58).then(function(info){_d59(info&&info.bbox);});});}else{_d59();}return;function _d59(bbox){console.log("xxx OAFC3 create_map bbox: "+bbox);var _d5a={srcNodeRef:_d57};if(bbox){_d5a.initialView=bbox;}me.ooimap=new alp.gmap.OOIMap(_d5a);dojo.getObject("alp._obj",true).ooimap=me.ooimap;_d56();};};function _d56(){if(me.pager_settings){me._pager=new alp.x.PagerSelect(me.pager_settings);dojo.connect(me.ooimap,"fullscreen_mode_changed",me,function(_d5b){me._pager.setUpdateActive("oa_v2.oafc3 (fullscreen mode changed)",!_d5b);});}me.gmap=me.ooimap.gmap;if(!me.gmap){console.error(me.declaredClass+"._install() could not find the OOIMap.gmap! ");return;}me.fcc=new alp._gmap2_3.FilterClusterController2(me.gmap,alp.util.fun_or_not(me._custom_fcc_config)||oa_v2.cfg.jcu,{model_opts:{v:"2",proj:"",initFilter:{area:"all",dif_e:true,dif_m:true,dif_d:true}},view_opts:dojo.mixin({infoWin_ooi:false},me.view_opts)});alp.addOnParse(_d5c);};function _d5c(){dojo.global.set_region_values=dojo.hitch(me,"set_region_values");me.custom_connect_gui_2_cc_();if(me.submit_auto){dojo.query("."+me.filter_checkbox_class).onclick(dojo.hitch(me,me.submit_filter_values));}dojo.forEach(me.slider_name_list,dojo.hitch(me,function(s){var w=me._get_slider_w(s);if(!w){return;}dojo.connectLimited(345,w,"onChange",me,"onSliderChange");}));GEvent.addListener(me.gmap,"moveend",dojo.hitch(me,function(){if(me.tpm&&me.tpm.in_tour_preview_mode()){return;}var _d5d=me._get_loadOpts();if(_d5d.use_current_bbox){me._submit_filter_values();}}));if(me._pager){me.fcc.control_pager(me._pager);me.tpm=new oa_v2.TourPreviewManager(me.ooimap,me.fcc,me._pager);me.fcc.modelDfrd().addCallback(me,function(_d5e){_d5e.get_ooi_geometry=dojo.hitch(me,function(info,_d5f){me.tpm.data.get(info.id,"geometry_simplified").addCallback(_d5f);});});dojo.connect(me._areaselector,"area_selected",me.tpm,"unselect");}dojo.hitch(me,function(){var _d60,_d61,_d62;_d60=["","all",undefined,true];_d62=dojo.hitch(me,function(){me.set_region_values.apply(me,_d60);});_d61=dojo.hitch(me,function(_d63){alp.util.conlog("oa_v2.oafc3: filterclustercontroller set_button_view",_d63);dojo.query(me.current_map_section_button_q).setClass(me.region_button_selected_class,_d63);dojo.query(me.territory_button_q).setClass(me.region_button_selected_class,!_d63);});dojo.query(me.current_map_section_button_q).onclick(_d62);dojo.connect(me,"set_region_values",function(){var args=Array.prototype.slice.call(arguments,0,_d60.length);_d61(alp.util.equal_array(args,_d60,function(a,b){return a==b;}));});_d62();})();me._init_drop_down("div[default_region='true']");me._init_drop_down("div[default_doc_type='true']");dojo.query(me.resetfilterlink_q).onclick(me,function(){me.resetfilter();});alp.addOnParse(function(){me._init_url_hash_write=function(){var g=function(){me._url_hash_read_inactive=true;setTimeout(function(){me._url_hash_write();me._url_hash_read_inactive=false;});};dojo.connect(me,"submitted",g);GEvent.addListener(me.gmap,"moveend",g);dojo.connect(me._sportselector,"selection_changed",g);dojo.connect(dijit.byId(me.regionSel_wid),"onChange",g);me._init_url_hash_write=function(){};};var f=function(){if(!me._url_hash_read_inactive){me._url_hash_read();}};f();window.setInterval(f,500);});if(me.fcc&&me._sportselector){me.fcc.view_cb(me,function(view){me._sportselector.init_cb(me,function(){me._categorypainter=new alp.view.CategoryPainter({catnode_q:".sport-activity",cluster_view:view,topNode_id:"docType-select-box",contentNode_catid:function(_d64){var _d65;dojo.query(".sport-activity-info",_d64).at(0).forEach(function(node){_d65=node&&node.value&&dojo.fromJson(node.value);_d65=_d65&&_d65.id;});return _d65;},contentNode_labelNode:function(_d66){return _d66&&dojo.query(".js-activity-labelnode",_d66)[0];}});});});}me.ooimap.gmap_init_cb(me,"mark_init_done");};},custom_connect_gui_2_cc_:function(){},_init_drop_down:function(s){function _d67(){var _d68=undefined;dojo.query(s).forEach(function(node){node.innerHTML=node.innerHTML.replace(/alle Regionen/gim,"aktueller Kartenausschnitt");_d68=_d68||node;});if(!_d68){alp.util.asyncHitch(_d67,this,500)();return;}_d68.onclick();};_d67();},resetfilter:function(){dojo.forEach(this.slider_name_list,function(s){var w=this._get_slider_w(s);if(!w){return;}w.attr("value",[w.minimum,w.maximum]);},this);dojo.forEach(this.checkbox_cfg,function(a,ind){this._checkbox_set(ind,a[3]);},this);this.submit_filter_values();},submit_filter_values:function(){this.init_cb(this,"_submit_filter_values");},_submit_filter_values:function(){alp.util.conlog(this.declaredClass+"._submit_filter_values() start");var _d69=this._get_loadOpts();alp.util.conlog(this.declaredClass+"._submit_filter_values() loadOpts:",_d69);this.fcc.set_pager_type_name(_d69.docTypeSel_value,true);this.fcc.update(this.declaredClass+"._submit_filter_values()",_d69);this._submitted();alp.util.conlog(this.declaredClass+"._submit_filter_values() end");},_submitted:alp.util.asyncHitch("submitted"),submitted:function(){},_init_link_to_page_description:function(){var _d6a,_d6b;dojo.connectLimited(2000,this,"submitted",this,this._update_link_to_page_description=function(){var _d6c,_d6d,url;_d6c=dojo.query(this.link_to_page_description_q);if(_d6c.length<1){return;}_d6d=this._sportselector&&this._sportselector.current_info();url=this.link_to_page_description_url(_d6d&&_d6d.id,this.region_id_long);if(url===_d6b){return;}_d6b=url;if(_d6a){_d6a.cancel();}_d6a=dojo.xhrGet({url:url,handleAs:"json",load:function(r){_d6c.empty();if(r&&r.title&&r.href){_d6c.forEach(function(node){node.appendChild(dojo.create("span",{innerHTML:"Entdecke mehr auf unserer Seite <br />"}));node.appendChild(dojo.create("a",{href:r.href,innerHTML:r.title}));});}}});});},_get_loadOpts:function(){var _d6e={};var x,w;var _d6f=this._sportselector&&this._sportselector.current_info();if(_d6f&&_d6f.subids){_d6e.subids=dojo.string.trim(_d6f.subids).replace(/^,*/,"").replace(/,*$/,"");}_d6e.docTypeSel_value=(_d6f&&(!_d6e.subids)&&_d6f.name)||"";_d6e.docType_id_long=(_d6f&&_d6f.id)||"";_d6e.regionSel_value=this.regionSel_value;_d6e.region_id_long=this.region_id_long;_d6e.area=(this.region_id_long!==undefined)?""+this.region_id_long:"all";_d6e.use_current_bbox=this.use_current_bbox||this.always_use_current_bbox;dojo.forEach(this.slider_name_list,dojo.hitch(this,"set_loadOpts_for_slider_",_d6e));this._get_checkbox_opts(_d6e);dojo.query("#"+this.tour_list_current_id).at(0).forEach(function(node){_d6e.page=dojo.attr(node,"value");});_d6e.splithtml=true;_d6e.v="2";var c=this.gmap.getCenter();if(c){_d6e.gmap_lat=Number(c.lat()).toFixed(5);_d6e.gmap_lng=Number(c.lng()).toFixed(5);_d6e.gmap_z=this.gmap.getZoom();_d6e.gmap_type=dojo.indexOf(this.gmap.getMapTypes(),this.gmap.getCurrentMapType());}return _d6e;},set_loadOpts_for_slider_:function(_d70,s){var _d71,_d72;_d71=this.currentstartend_data(s);if(!_d71){return;}_d70[s+"_s"]=Math.round(_d71[0]);_d70[s+"_e"]=Math.round(_d71[1]);_d72=this.currentstartend_discrete(s);if(!_d72){return;}_d70[s+"_s_discrete"]=_d72[0];_d70[s+"_e_discrete"]=_d72[1];},unset_region_values:function(){this.set_region_values(undefined,undefined,undefined,true);},set_region_values:function(_d73,_d74,bbox,_d75){alp.util.conlog(this.declaredClass+".set_region_values(region_id:",_d73,", region_id_long:",_d74,", bbox?:",bbox,", use_current_bbox?:",_d75,") started.");this.region_niceid=_d73;this.regionSel_value=_d73;this.region_id_long=_d74;this.use_current_bbox=_d75;var gmap=this.fcc.getMap();if((!this._region_does_not_affect_extent)&&bbox&&(bbox.length===4)&&this.fcc&&gmap){var b=bbox;var _d76=new GLatLng(alp.util.angle_wmean([b[1],b[3]]),alp.util.angle_wmean([b[0],b[2]]));var zoom=gmap.getBoundsZoomLevel(new GLatLngBounds(new GLatLng(b[1],b[0]),new GLatLng(b[3],b[2])));gmap.setCenter(_d76,zoom);}this._region_does_not_affect_extent=false;if(this.submit_auto){this.submit_filter_values();}},onTourListReceived:function(data){dojo.query("#"+dojo.byId(this.tour_list_current_id)).attr("value",data.page);dojo.query(this.tour_list_dojo_query.current).forEach(function(_d77){dojo.attr(_d77,"value",data.page);if(dojo.attr(_d77,"numeric")){_d77.innerHTML=""+data.page;}});dojo.forEach(["nresult","html"],dojo.hitch(this,function(x){dojo.query(this.tour_list_dojo_query[x]).forEach(dojo.hitch(this,function(_d78){_d78.innerHTML=""+data[x];this.fcc.viewDfrd().addCallback(function(view){view.domnode_geomconnect(_d78);return view;});}));}));var x,_d79;function f(_d7a){dojo.attr(_d7a,"value",_d79);if(dojo.attr(_d7a,"numeric")){_d7a.innerHTML=""+_d79;}_d7a.style.display=((_d79<1)||(_d79>data.npage)||((x==="next2")&&data.page>1))?"none":"";};var nav=this.tour_list_dojo_query.nav;for(x in nav){if(nav.hasOwnProperty(x)&&(typeof (nav[x])==="string")){if((x==="backward")||(x==="previous")){_d79=data.page-1;}else{_d79=data.page+1;}if(x==="next2"){_d79=data.page+2;}dojo.query(nav[x]).forEach(f);}}dojo.query(this.tour_list_dojo_query.pagescroll).forEach(function(_d7b){_d7b.style.display=(data.npage<2)?"none":"";});dojo.query(this.tour_list_dojo_query.noresult).forEach(function(_d7c){_d7c.style.display=(data.nresult>0)?"none":"";});dojo.query(this.tour_list_dojo_query.html).forEach(function(_d7d){_d7d.style.display=(data.nresult<1)?"none":"";});},onSliderChange:function(){this._currentstartend_data_cache_reset();this._currentstartend_slider_cache_reset();this._currentstartend_discrete_cache_reset();this._updateDisplayedStartEnd();if(this.submit_auto){this.submit_filter_values();}},_updateDisplayedStartEnd:function(){var me=this;alp.addOnParse(_d7e);function _d7e(){dojo.forEach(me.slider_name_list,dojo.hitch(me,function(name){var a,id,s,se,_d7f,_d80,_d81,v,w;_d80=me.currentstartend_data(name,true);if(!_d80){return;}se=["s","e"];if(se.length!==_d80.length){return;}_d7f=me._get_slider_w(name);id=function(x){return x;};for(a=0;a<se.length;a++){w=me._dojo_byId(dojo.string.substitute(me.slider_vis_template,{"name":name,"se":se[a]}));if(!w){continue;}_d81=me.slider_vis_transform[name]||id;v=_d80[a];s=_d81(dojo.number.format(v,{pattern:"#."}));if((a>0)&&_d7f&&_d7f.value&&(_d7f.maximum==_d7f.value[1])){s+="+";}w.innerHTML=s;}}));};},_currentstartend_data_cache_reset:function(){this._currentstartend_data_cache={};},currentstartend_data:function(a,_d82){var c_s="_currentstartend_data_cache";var _d83=[a,_d82].join("_");if(!this[c_s]){this._currentstartend_data_cache_reset();}var _d84=this[c_s];if(_d84[_d83]){return _d84[_d83];}a=a&&a.toLowerCase();if(!this._check(a,this.slider_name_list)){return;}var v=this.currentstartend_slider(a);if(!v){return;}var _d85=this.currentminmax_slider(a);if(!_d85){return;}var eps=1e-10;var _d86=dojo.map(v,function(x){return (x-_d85[0])/(_d85[1]-_d85[0]+eps);});if(!_d82){if(_d86[0]<eps){_d86[0]=undefined;}if(_d86[1]>1-eps){_d86[1]=undefined;}}var _d87=this.currentminmax_data(a);if(!_d87){return;}var _d88=_d86&&dojo.map(_d86,function(x){return x&&(_d87[0]+x*(_d87[1]-_d87[0]));});_d84[_d83]=_d88;return _d88;},_currentstartend_slider_cache_reset:function(){this._currentstartend_slider_cache={};},currentstartend_slider:function(a){var c_s="_currentstartend_slider_cache";var _d89=a;if(!this[c_s]){this._currentstartend_slider_cache_reset();}var _d8a=this[c_s];if(_d8a[_d89]){return _d8a[_d89];}a=a&&a.toLowerCase();if(!this._check(a,this.slider_name_list)){return;}var w=this._get_slider_w(a);return (_d8a[_d89]=w&&alp.util.minmax(w.value));},_currentstartend_discrete_cache_reset:function(){this._currentstartend_discrete_cache={};},currentstartend_discrete:function(a){var c_s="_currentstartend_discrete_cache";var _d8b=a;if(!this[c_s]){this._currentstartend_discrete_cache_reset();}var _d8c=this[c_s];if(_d8c[_d8b]){return _d8c[_d8b];}a=a&&a.toLowerCase();if(!this._check(a,this.slider_name_list)){return;}var w=this._get_slider_w(a);var n=w.discreteValues-1;return (_d8c[_d8b]=w&&alp.util.minmax(dojo.map(w.value,function(x){return Math.round(n*(x-w.minimum)/(w.maximum-w.minimum));})));},currentminmax_data:function(a){var ret,info,name,o,_d8d;a=a&&a.toLowerCase();if(!this._check(a,this.slider_name_list)){return;}ret=undefined;info=this._sportselector;info=info&&this._sportselector.current_info();name=info&&info.name;_d8d=info&&info.subnames;o=info&&info.minmax;o=o&&o[a];ret=ret||(o&&(o.length===2)&&o);ret=ret||this.currentminmax_slider(a);return alp.util.minmax(this.override_sportminmax(name,a,ret,_d8d));},currentminmax_slider:function(a){a=a&&a.toLowerCase();if(!this._check(a,this.slider_name_list)){return;}var w=this._get_slider_w(a);return w&&alp.util.minmax([w.minimum,w.maximum]);},override_sportminmax:function(name,a,_d8e,_d8f){var o,ret;a=a&&a.toLowerCase();if(!this._check(a,this.slider_name_list)){return;}o=this.sportminmax;if(o&&_d8f){o=alp.cfg.sportminmax_group(_d8f,o);}else{o=o&&o[name];}o=o&&o[a];if(!o){return _d8e;}ret=Array.prototype.slice.apply(_d8e);if(o.min!==undefined){ret[0]=o.min;}if(o.max!==undefined){ret[1]=o.max;}return alp.util.minmax(ret);},_check:function(a,_d90){if(0>dojo.indexOf(_d90,a)){console.error(this.declaredClass+"._check(): a:\""+a+"\" not found in a_list:",_d90);return false;}return true;},_get_slider_w:function(a){var s="slider_"+a+"_w_id";var w=this._dijit_byId(this[s]);if(!w){console.error(this.declaredClass+"._get_slider_w( "+a+") could not get widget with id: "+this[s]);}return w;},_checkbox_set:function(ind,v){v=!!v;var a=this.checkbox_cfg[ind];dojo.query(a[1]).attr("checked",v);if(!this._checkbox_state){this._init_checkbox_state();}this._checkbox_state[ind]=v;},_init_checkbox_state:function(){if(this._checkbox_state){return;}this._checkbox_state=new Array(this.checkbox_cfg.length);dojo.forEach(this.checkbox_cfg,function(a,ind){dojo.query(a[1]).at(0).forEach(function(node){var _d91=this._checkbox_state[ind]=node.checked;dojo.connect(node,"onclick",this,function(){this._checkbox_state[ind]=node.checked;});},this);},this);if(alp.util.and(this._checkbox_state,"==null")){delete this._checkbox_state;return;}},_get_checkbox_opts:function(_d92){_d92.checkbox_str="";_d92.tags="";if(!this._checkbox_state){this._init_checkbox_state();}dojo.forEach(this._checkbox_state,function(v,ind){if(v==null){return;}var a=this.checkbox_cfg[ind];if(typeof a[0]==="string"){_d92[a[0]]=v;}else{if(typeof a[0]==="function"){a[0](_d92,v);}else{console.error("oa_v2.oafc3._get_checkbox_opts(): invalid checkbox configuration:",a);}}if(v){_d92.checkbox_str+=a[2];}},this);},_url_hash_write:function(){if(!(this.fcc&&this.fcc.is_active())){return;}var you=dojo.getObject("_instanced._url_hash_read",true,this);alp.util.conlog(this.declaredClass+"._url_hash_write() started.");if(!you._last){this._url_hash_read();}var _d93=this._get_loadOpts();var _d94=dojo.string.substitute("#t=${docTypeSel_value}"+"&s="+dojo.map(this.slider_name_list,function(s){return "${"+s+"_s_discrete},${"+s+"_e_discrete}";}).join(",")+"&c=${checkbox_str}"+"&r=${regionSel_value}"+"&lat=${gmap_lat}"+"&lng=${gmap_lng}"+"&z=${gmap_z}"+"&mt=${gmap_type}",dojo.delegate(_d93,{gmap_type:this._index_of_current_maptype()}),function(s){return (s!==undefined)?(""+s):"";});you._last=_d94;window.document.location.hash=_d94;alp.util.conlog(this.declaredClass+"._url_hash_write() finished:",_d94);},_index_of_current_maptype:function(){return dojo.indexOf(this.gmap.getMapTypes(),this.gmap.getCurrentMapType());},_url_hash_read:function(){if(this._url_hash_read_inactive||(!(this.fcc&&this.fcc.is_active()))){return;}var _d95=dojo.getObject("_instanced._url_hash_read",true,this);if(djConfig.isDebug>1){console.log(this.declaredClass+"._url_hash_read() started.");}var h=window.document.location.hash;if(h&&(h!==_d95._last)){var o=alp.util.encQueryToObject(h.substr(1));var _d96=this._get_loadOpts();var _d97=false;if((typeof o.t==="string")&&(o.t!==_d96.t)){if(this._sportselector){_d97=true;this._sportselector.selectByName(o.t);}}if(o.s&&(o.s!==_d96.s)){_d97=true;alp.util.asyncHitch(function(){var arr=o.s.split(",");dojo.forEach(this.slider_name_list,function(s){var _d98=[arr.shift(),arr.shift()];var w=dijit.byId(this["slider_"+s+"_w_id"]);if(!w){return;}w.setValue(dojo.map(_d98,function(x){return w.minimum+(w.maximum-w.minimum)*x/(w.discreteValues-1);}));},this);},this)();}if((typeof o.c==="string")&&(o.c!==_d96.c)){_d97=true;alp.util.asyncHitch(function(){dojo.forEach(this.checkbox_cfg,function(x,ind){this._checkbox_set(ind,(-1<o.c.indexOf(x[2])));},this);},this)();}if(dojun.some(["lat","lng","z"],function(s){return (o[s]&&(o[s]!==_d96[s]));})){this._region_does_not_affect_extent=true;alp.util.asyncHitch(function(){this.gmap.setCenter(new GLatLng(o.lat,o.lng),Number(o.z));},this)();}if(o.r&&(o.r!==_d96.r)){if(this._areaselector){_d97=true;this._areaselector.selectBy("niceid",o.r);}}var _d99=this._index_of_current_maptype();if(o.mt&&(o.mt!==_d99)){alp.util.asyncHitch(function(){var mt=this.gmap.getMapTypes();mt=mt&&mt[o.mt];if(mt){this.gmap.setMapType(mt);}},this)();}if(_d97){alp.util.asyncHitch("submit_filter_values",this)();}}_d95._last=h;if(djConfig.isDebug>1){console.log(this.declaredClass+"._url_hash_read() finished, minst._last:",_d95._last);}if(this._init_url_hash_write){this._init_url_hash_write();}},_update_winter_layers:function(){this._sportselector.init_dfrd().addCallback(this,function(){var a,arr,_d9a,name;a=this._sportselector.current_info();_d9a=a&&a.id;name=a&&a.name;alp.util.conlog(this.declaredClass+"._update_winter_layers() callback, a:",a," name:",name,"datatype_id:",_d9a);arr=oa_v2.maplayer.from_datatype(name,_d9a);if(arr){var me=this;alp.util.getDfrd(function(){return me.ooimap.getLayerDdcDfrd;}).then(function(){me.ooimap.getLayerDdcDfrd().addCallback(function(_d9b){_d9b.setValue(arr);});});}});},_update_winter_maptype:function(){var me=this;me._sportselector.init_cb(function(){alp.util.getDfrd(function(){return me.ooimap.gmap_init_cb;}).then(function(){me.ooimap.gmap_init_cb(function(gmap){var a,_d9c;a=me._sportselector.current_info();_d9c=alp.cfg.data.type_id.isWinter(a&&a.id,a&&a.name);var _d9d=gmap.getCurrentMapType().getName();if(_d9c&&(_d9d.toLowerCase()==="karte")){alp.gmap.setMapType(gmap,"winter");}else{if((!_d9c)&&(_d9d.toLowerCase()==="winter")){alp.gmap.setMapType(gmap,"karte");}}});});});}});}if(typeof dojo==="undefined"||!dojo._hasResource["oa_v2.cfg.cluster"]){typeof dojo==="undefined"||(dojo._hasResource["oa_v2.cfg.cluster"]=true);dojo.provide("oa_v2.cfg.cluster");(function(){var o;o=dojo.getObject("alpConfig.cluster",true);o.lineOptions={strokeColor:"#ff0000",strokeOpacity:0.75};})();}if(typeof dojo==="undefined"||!dojo._hasResource["oa_v2.selectboxes"]){typeof dojo==="undefined"||(dojo._hasResource["oa_v2.selectboxes"]=true);dojo.provide("oa_v2.selectboxes");(function(){if(dojo.global.switchSelectBox){return;}dojo.global.switchFilterOptionsWrapper=(function(_d9e){return function(){dojo.query("#filterOptionsWrapper").forEach(function(node){if(!_d9e(node)){closeSelectBox();}dojo.style(node,{display:_d9e(node)?"none":"inline"});});};})(function(b){return b&&b.style&&(b.style.display==="inline");});dojo.global.topPos=function(elem){return elem.offsetParent?(elem.offsetTop+topPos(elem.offsetParent)):elem.offsetTop;};dojo.global.leftPos=function(elem){return elem.offsetParent?(elem.offsetLeft+leftPos(elem.offsetParent)):elem.offsetLeft;};dojo.global.closeSelectBox=function(){dojo.query(".select-box").style({display:"none"});};dojo.global.updateSportTitle=function(t){dojo.query(".docType-button").attr("innerHTML",t);};dojo.global.onSportSelect=function(info){closeSelectBox();updateSportTitle(info.title);};dojo.global.onAreaSelect=function(_d9f){closeSelectBox();};dojo.global.switchSelectBox=(function(_da0){return function(el,_da1){var sb=dojo.byId(_da1);if(!sb){console.error("switchSelectBox did not find the DOM node with id: "+_da1);return;}var _da2=_da0(sb);closeSelectBox();if(_da2){return;}var _da3=topPos(el);var _da4=leftPos(el);sb.style.top=(_da3+21)+"px";sb.style.left=(_da4)+"px";var body=dojo.body();if(sb.parentNode!==body){if(sb.parentNode){sb.parentNode.removeChild(sb);}body.appendChild(sb);}sb.style.display="block";var sel=dojo.getObject("alp._obj.areaselector");if(sel&&sel.dom_is_in(sb)){sel.focus_text_input();}};})(function(sb){return sb&&sb.style&&(sb.style.display==="block");});dojo.global.showInfos=function(){dojo.query(".map-info-box").style({"display":"block"});dojo.query(".agMap").style({"height":"383px"});};dojo.global.hideInfos=function(){dojo.query(".map-info-box").style({"display":"none"});dojo.query(".agMap").style({"height":"543px"});};dojo.addOnLoad(function(){dojo.query(".docType-button").connect("onclick",function(e){switchSelectBox(this,"docType-select-box");});dojo.query(".select-box-close").onclick(closeSelectBox);dojo.query(".territory-button").connect("onclick",function(e){alp.util.getDfrd("alp._obj.areaselector").addCallback(this,function(sel){if(!sel.is_empty()){switchSelectBox(this,"territory-select-box");}else{console.error("oa_v2.selectboxes: alp._obj.areaselector.is_empty() returned true!");}});});dojo.query("#openFilterOptionsWrapper").concat(dojo.query("#closeFilterOptionsWrapper")).onclick(switchFilterOptionsWrapper);dojo.query(".tourplanner-docType-button").connect("onclick",function(e){switchSelectBox(this,"tourplanner-docType-select-box");});dojo.query("#tourplanner-docType-select-box").connect("onclick",function(e){switchSelectBox(this,"tourplanner-docType-select-box");});});hideInfos();})();}if(typeof dojo==="undefined"||!dojo._hasResource["dojo.cldr.supplemental"]){typeof dojo==="undefined"||(dojo._hasResource["dojo.cldr.supplemental"]=true);dojo.provide("dojo.cldr.supplemental");dojo.cldr.supplemental.getFirstDayOfWeek=function(_da5){var _da6={mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,lb:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,tn:6,ye:6,as:0,au:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,ie:0,il:0,is:0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,za:0,zw:0,et:0,mw:0,ng:0,tj:0,sy:4};var _da7=dojo.cldr.supplemental._region(_da5);var dow=_da6[_da7];return (dow===undefined)?1:dow;};dojo.cldr.supplemental._region=function(_da8){_da8=dojo.i18n.normalizeLocale(_da8);var tags=_da8.split("-");var _da9=tags[1];if(!_da9){_da9={de:"de",en:"us",es:"es",fi:"fi",fr:"fr",he:"il",hu:"hu",it:"it",ja:"jp",ko:"kr",nl:"nl",pt:"br",sv:"se",zh:"cn"}[tags[0]];}else{if(_da9.length==4){_da9=tags[2];}}return _da9;};dojo.cldr.supplemental.getWeekend=function(_daa){var _dab={eg:5,il:5,sy:5,"in":0,ae:4,bh:4,dz:4,iq:4,jo:4,kw:4,lb:4,ly:4,ma:4,om:4,qa:4,sa:4,sd:4,tn:4,ye:4};var _dac={ae:5,bh:5,dz:5,iq:5,jo:5,kw:5,lb:5,ly:5,ma:5,om:5,qa:5,sa:5,sd:5,tn:5,ye:5,af:5,ir:5,eg:6,il:6,sy:6};var _dad=dojo.cldr.supplemental._region(_daa);var _dae=_dab[_dad];var end=_dac[_dad];if(_dae===undefined){_dae=6;}if(end===undefined){end=0;}return {start:_dae,end:end};};}if(typeof dojo==="undefined"||!dojo._hasResource["dojo.date"]){typeof dojo==="undefined"||(dojo._hasResource["dojo.date"]=true);dojo.provide("dojo.date");dojo.date.getDaysInMonth=function(_daf){var _db0=_daf.getMonth();var days=[31,28,31,30,31,30,31,31,30,31,30,31];if(_db0==1&&dojo.date.isLeapYear(_daf)){return 29;}return days[_db0];};dojo.date.isLeapYear=function(_db1){var year=_db1.getFullYear();return !(year%400)||(!(year%4)&&!!(year%100));};dojo.date.getTimezoneName=function(_db2){var str=_db2.toString();var tz="";var _db3;var pos=str.indexOf("(");if(pos>-1){tz=str.substring(++pos,str.indexOf(")"));}else{var pat=/([A-Z\/]+) \d{4}$/;if((_db3=str.match(pat))){tz=_db3[1];}else{str=_db2.toLocaleString();pat=/ ([A-Z\/]+)$/;if((_db3=str.match(pat))){tz=_db3[1];}}}return (tz=="AM"||tz=="PM")?"":tz;};dojo.date.compare=function(_db4,_db5,_db6){_db4=new Date(+_db4);_db5=new Date(+(_db5||new Date()));if(_db6=="date"){_db4.setHours(0,0,0,0);_db5.setHours(0,0,0,0);}else{if(_db6=="time"){_db4.setFullYear(0,0,0);_db5.setFullYear(0,0,0);}}if(_db4>_db5){return 1;}if(_db4<_db5){return -1;}return 0;};dojo.date.add=function(date,_db7,_db8){var sum=new Date(+date);var _db9=false;var _dba="Date";switch(_db7){case "day":break;case "weekday":var days,_dbb;var mod=_db8%5;if(!mod){days=(_db8>0)?5:-5;_dbb=(_db8>0)?((_db8-5)/5):((_db8+5)/5);}else{days=mod;_dbb=parseInt(_db8/5);}var strt=date.getDay();var adj=0;if(strt==6&&_db8>0){adj=1;}else{if(strt==0&&_db8<0){adj=-1;}}var trgt=strt+days;if(trgt==0||trgt==6){adj=(_db8>0)?2:-2;}_db8=(7*_dbb)+days+adj;break;case "year":_dba="FullYear";_db9=true;break;case "week":_db8*=7;break;case "quarter":_db8*=3;case "month":_db9=true;_dba="Month";break;default:_dba="UTC"+_db7.charAt(0).toUpperCase()+_db7.substring(1)+"s";}if(_dba){sum["set"+_dba](sum["get"+_dba]()+_db8);}if(_db9&&(sum.getDate()<date.getDate())){sum.setDate(0);}return sum;};dojo.date.difference=function(_dbc,_dbd,_dbe){_dbd=_dbd||new Date();_dbe=_dbe||"day";var _dbf=_dbd.getFullYear()-_dbc.getFullYear();var _dc0=1;switch(_dbe){case "quarter":var m1=_dbc.getMonth();var m2=_dbd.getMonth();var q1=Math.floor(m1/3)+1;var q2=Math.floor(m2/3)+1;q2+=(_dbf*4);_dc0=q2-q1;break;case "weekday":var days=Math.round(dojo.date.difference(_dbc,_dbd,"day"));var _dc1=parseInt(dojo.date.difference(_dbc,_dbd,"week"));var mod=days%7;if(mod==0){days=_dc1*5;}else{var adj=0;var aDay=_dbc.getDay();var bDay=_dbd.getDay();_dc1=parseInt(days/7);mod=days%7;var _dc2=new Date(_dbc);_dc2.setDate(_dc2.getDate()+(_dc1*7));var _dc3=_dc2.getDay();if(days>0){switch(true){case aDay==6:adj=-1;break;case aDay==0:adj=0;break;case bDay==6:adj=-1;break;case bDay==0:adj=-2;break;case (_dc3+mod)>5:adj=-2;}}else{if(days<0){switch(true){case aDay==6:adj=0;break;case aDay==0:adj=1;break;case bDay==6:adj=2;break;case bDay==0:adj=1;break;case (_dc3+mod)<0:adj=2;}}}days+=adj;days-=(_dc1*2);}_dc0=days;break;case "year":_dc0=_dbf;break;case "month":_dc0=(_dbd.getMonth()-_dbc.getMonth())+(_dbf*12);break;case "week":_dc0=parseInt(dojo.date.difference(_dbc,_dbd,"day")/7);break;case "day":_dc0/=24;case "hour":_dc0/=60;case "minute":_dc0/=60;case "second":_dc0/=1000;case "millisecond":_dc0*=_dbd.getTime()-_dbc.getTime();}return Math.round(_dc0);};}if(typeof dojo==="undefined"||!dojo._hasResource["dojo.date.locale"]){typeof dojo==="undefined"||(dojo._hasResource["dojo.date.locale"]=true);dojo.provide("dojo.date.locale");(function(){function _dc4(_dc5,_dc6,_dc7,_dc8){return _dc8.replace(/([a-z])\1*/ig,function(_dc9){var s,pad,c=_dc9.charAt(0),l=_dc9.length,_dca=["abbr","wide","narrow"];switch(c){case "G":s=_dc6[(l<4)?"eraAbbr":"eraNames"][_dc5.getFullYear()<0?0:1];break;case "y":s=_dc5.getFullYear();switch(l){case 1:break;case 2:if(!_dc7.fullYear){s=String(s);s=s.substr(s.length-2);break;}default:pad=true;}break;case "Q":case "q":s=Math.ceil((_dc5.getMonth()+1)/3);pad=true;break;case "M":var m=_dc5.getMonth();if(l<3){s=m+1;pad=true;}else{var _dcb=["months","format",_dca[l-3]].join("-");s=_dc6[_dcb][m];}break;case "w":var _dcc=0;s=dojo.date.locale._getWeekOfYear(_dc5,_dcc);pad=true;break;case "d":s=_dc5.getDate();pad=true;break;case "D":s=dojo.date.locale._getDayOfYear(_dc5);pad=true;break;case "E":var d=_dc5.getDay();if(l<3){s=d+1;pad=true;}else{var _dcd=["days","format",_dca[l-3]].join("-");s=_dc6[_dcd][d];}break;case "a":var _dce=(_dc5.getHours()<12)?"am":"pm";s=_dc6[_dce];break;case "h":case "H":case "K":case "k":var h=_dc5.getHours();switch(c){case "h":s=(h%12)||12;break;case "H":s=h;break;case "K":s=(h%12);break;case "k":s=h||24;break;}pad=true;break;case "m":s=_dc5.getMinutes();pad=true;break;case "s":s=_dc5.getSeconds();pad=true;break;case "S":s=Math.round(_dc5.getMilliseconds()*Math.pow(10,l-3));pad=true;break;case "v":case "z":s=dojo.date.locale._getZone(_dc5,true,_dc7);if(s){break;}l=4;case "Z":var _dcf=dojo.date.locale._getZone(_dc5,false,_dc7);var tz=[(_dcf<=0?"+":"-"),dojo.string.pad(Math.floor(Math.abs(_dcf)/60),2),dojo.string.pad(Math.abs(_dcf)%60,2)];if(l==4){tz.splice(0,0,"GMT");tz.splice(3,0,":");}s=tz.join("");break;default:throw new Error("dojo.date.locale.format: invalid pattern char: "+_dc8);}if(pad){s=dojo.string.pad(s,l);}return s;});};dojo.date.locale._getZone=function(_dd0,_dd1,_dd2){if(_dd1){return dojo.date.getTimezoneName(_dd0);}else{return _dd0.getTimezoneOffset();}};dojo.date.locale.format=function(_dd3,_dd4){_dd4=_dd4||{};var _dd5=dojo.i18n.normalizeLocale(_dd4.locale),_dd6=_dd4.formatLength||"short",_dd7=dojo.date.locale._getGregorianBundle(_dd5),str=[],_dd8=dojo.hitch(this,_dc4,_dd3,_dd7,_dd4);if(_dd4.selector=="year"){return _dd9(_dd7["dateFormatItem-yyyy"]||"yyyy",_dd8);}var _dda;if(_dd4.selector!="date"){_dda=_dd4.timePattern||_dd7["timeFormat-"+_dd6];if(_dda){str.push(_dd9(_dda,_dd8));}}if(_dd4.selector!="time"){_dda=_dd4.datePattern||_dd7["dateFormat-"+_dd6];if(_dda){str.push(_dd9(_dda,_dd8));}}return str.length==1?str[0]:_dd7["dateTimeFormat-"+_dd6].replace(/\{(\d+)\}/g,function(_ddb,key){return str[key];});};dojo.date.locale.regexp=function(_ddc){return dojo.date.locale._parseInfo(_ddc).regexp;};dojo.date.locale._parseInfo=function(_ddd){_ddd=_ddd||{};var _dde=dojo.i18n.normalizeLocale(_ddd.locale),_ddf=dojo.date.locale._getGregorianBundle(_dde),_de0=_ddd.formatLength||"short",_de1=_ddd.datePattern||_ddf["dateFormat-"+_de0],_de2=_ddd.timePattern||_ddf["timeFormat-"+_de0],_de3;if(_ddd.selector=="date"){_de3=_de1;}else{if(_ddd.selector=="time"){_de3=_de2;}else{_de3=_ddf["dateTimeFormat-"+_de0].replace(/\{(\d+)\}/g,function(_de4,key){return [_de2,_de1][key];});}}var _de5=[],re=_dd9(_de3,dojo.hitch(this,_de6,_de5,_ddf,_ddd));return {regexp:re,tokens:_de5,bundle:_ddf};};dojo.date.locale.parse=function(_de7,_de8){var info=dojo.date.locale._parseInfo(_de8),_de9=info.tokens,_dea=info.bundle,re=new RegExp("^"+info.regexp+"$",info.strict?"":"i"),_deb=re.exec(_de7);if(!_deb){return null;}var _dec=["abbr","wide","narrow"],_ded=[1970,0,1,0,0,0,0],amPm="",_dee=dojo.every(_deb,function(v,i){if(!i){return true;}var _def=_de9[i-1];var l=_def.length;switch(_def.charAt(0)){case "y":if(l!=2&&_de8.strict){_ded[0]=v;}else{if(v<100){v=Number(v);var year=""+new Date().getFullYear(),_df0=year.substring(0,2)*100,_df1=Math.min(Number(year.substring(2,4))+20,99),num=(v<_df1)?_df0+v:_df0-100+v;_ded[0]=num;}else{if(_de8.strict){return false;}_ded[0]=v;}}break;case "M":if(l>2){var _df2=_dea["months-format-"+_dec[l-3]].concat();if(!_de8.strict){v=v.replace(".","").toLowerCase();_df2=dojo.map(_df2,function(s){return s.replace(".","").toLowerCase();});}v=dojo.indexOf(_df2,v);if(v==-1){return false;}}else{v--;}_ded[1]=v;break;case "E":case "e":var days=_dea["days-format-"+_dec[l-3]].concat();if(!_de8.strict){v=v.toLowerCase();days=dojo.map(days,function(d){return d.toLowerCase();});}v=dojo.indexOf(days,v);if(v==-1){return false;}break;case "D":_ded[1]=0;case "d":_ded[2]=v;break;case "a":var am=_de8.am||_dea.am;var pm=_de8.pm||_dea.pm;if(!_de8.strict){var _df3=/\./g;v=v.replace(_df3,"").toLowerCase();am=am.replace(_df3,"").toLowerCase();pm=pm.replace(_df3,"").toLowerCase();}if(_de8.strict&&v!=am&&v!=pm){return false;}amPm=(v==pm)?"p":(v==am)?"a":"";break;case "K":if(v==24){v=0;}case "h":case "H":case "k":if(v>23){return false;}_ded[3]=v;break;case "m":_ded[4]=v;break;case "s":_ded[5]=v;break;case "S":_ded[6]=v;}return true;});var _df4=+_ded[3];if(amPm==="p"&&_df4<12){_ded[3]=_df4+12;}else{if(amPm==="a"&&_df4==12){_ded[3]=0;}}var _df5=new Date(_ded[0],_ded[1],_ded[2],_ded[3],_ded[4],_ded[5],_ded[6]);if(_de8.strict){_df5.setFullYear(_ded[0]);}var _df6=_de9.join(""),_df7=_df6.indexOf("d")!=-1,_df8=_df6.indexOf("M")!=-1;if(!_dee||(_df8&&_df5.getMonth()>_ded[1])||(_df7&&_df5.getDate()>_ded[2])){return null;}if((_df8&&_df5.getMonth()<_ded[1])||(_df7&&_df5.getDate()<_ded[2])){_df5=dojo.date.add(_df5,"hour",1);}return _df5;};function _dd9(_df9,_dfa,_dfb,_dfc){var _dfd=function(x){return x;};_dfa=_dfa||_dfd;_dfb=_dfb||_dfd;_dfc=_dfc||_dfd;var _dfe=_df9.match(/(''|[^'])+/g),_dff=_df9.charAt(0)=="'";dojo.forEach(_dfe,function(_e00,i){if(!_e00){_dfe[i]="";}else{_dfe[i]=(_dff?_dfb:_dfa)(_e00);_dff=!_dff;}});return _dfc(_dfe.join(""));};function _de6(_e01,_e02,_e03,_e04){_e04=dojo.regexp.escapeString(_e04);if(!_e03.strict){_e04=_e04.replace(" a"," ?a");}return _e04.replace(/([a-z])\1*/ig,function(_e05){var s,c=_e05.charAt(0),l=_e05.length,p2="",p3="";if(_e03.strict){if(l>1){p2="0"+"{"+(l-1)+"}";}if(l>2){p3="0"+"{"+(l-2)+"}";}}else{p2="0?";p3="0{0,2}";}switch(c){case "y":s="\\d{2,4}";break;case "M":s=(l>2)?"\\S+?":p2+"[1-9]|1[0-2]";break;case "D":s=p2+"[1-9]|"+p3+"[1-9][0-9]|[12][0-9][0-9]|3[0-5][0-9]|36[0-6]";break;case "d":s="[12]\\d|"+p2+"[1-9]|3[01]";break;case "w":s=p2+"[1-9]|[1-4][0-9]|5[0-3]";break;case "E":s="\\S+";break;case "h":s=p2+"[1-9]|1[0-2]";break;case "k":s=p2+"\\d|1[01]";break;case "H":s=p2+"\\d|1\\d|2[0-3]";break;case "K":s=p2+"[1-9]|1\\d|2[0-4]";break;case "m":case "s":s="[0-5]\\d";break;case "S":s="\\d{"+l+"}";break;case "a":var am=_e03.am||_e02.am||"AM";var pm=_e03.pm||_e02.pm||"PM";if(_e03.strict){s=am+"|"+pm;}else{s=am+"|"+pm;if(am!=am.toLowerCase()){s+="|"+am.toLowerCase();}if(pm!=pm.toLowerCase()){s+="|"+pm.toLowerCase();}if(s.indexOf(".")!=-1){s+="|"+s.replace(/\./g,"");}}s=s.replace(/\./g,"\\.");break;default:s=".*";}if(_e01){_e01.push(_e05);}return "("+s+")";}).replace(/[\xa0 ]/g,"[\\s\\xa0]");};})();(function(){var _e06=[];dojo.date.locale.addCustomFormats=function(_e07,_e08){_e06.push({pkg:_e07,name:_e08});};dojo.date.locale._getGregorianBundle=function(_e09){var _e0a={};dojo.forEach(_e06,function(desc){var _e0b=dojo.i18n.getLocalization(desc.pkg,desc.name,_e09);_e0a=dojo.mixin(_e0a,_e0b);},this);return _e0a;};})();dojo.date.locale.addCustomFormats("dojo.cldr","gregorian");dojo.date.locale.getNames=function(item,type,_e0c,_e0d){var _e0e,_e0f=dojo.date.locale._getGregorianBundle(_e0d),_e10=[item,_e0c,type];if(_e0c=="standAlone"){var key=_e10.join("-");_e0e=_e0f[key];if(_e0e[0]==1){_e0e=undefined;}}_e10[1]="format";return (_e0e||_e0f[_e10.join("-")]).concat();};dojo.date.locale.isWeekend=function(_e11,_e12){var _e13=dojo.cldr.supplemental.getWeekend(_e12),day=(_e11||new Date()).getDay();if(_e13.end<_e13.start){_e13.end+=7;if(day<_e13.start){day+=7;}}return day>=_e13.start&&day<=_e13.end;};dojo.date.locale._getDayOfYear=function(_e14){return dojo.date.difference(new Date(_e14.getFullYear(),0,1,_e14.getHours()),_e14)+1;};dojo.date.locale._getWeekOfYear=function(_e15,_e16){if(arguments.length==1){_e16=0;}var _e17=new Date(_e15.getFullYear(),0,1).getDay(),adj=(_e17-_e16+7)%7,week=Math.floor((dojo.date.locale._getDayOfYear(_e15)+adj-1)/7);if(_e17==_e16){week++;}return week;};}if(typeof dojo==="undefined"||!dojo._hasResource["dijit.Calendar"]){typeof dojo==="undefined"||(dojo._hasResource["dijit.Calendar"]=true);dojo.provide("dijit.Calendar");dojo.declare("dijit.Calendar",[dijit._Widget,dijit._Templated],{templateString:dojo.cache("dijit","templates/Calendar.html","<table cellspacing=\"0\" cellpadding=\"0\" class=\"dijitCalendarContainer\" role=\"grid\" dojoAttachEvent=\"onkeypress: _onKeyPress\">\n\t<thead>\n\t\t<tr class=\"dijitReset dijitCalendarMonthContainer\" valign=\"top\">\n\t\t\t<th class='dijitReset' dojoAttachPoint=\"decrementMonth\">\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarDecrease\" waiRole=\"presentation\">\n\t\t\t\t<span dojoAttachPoint=\"decreaseArrowNode\" class=\"dijitA11ySideArrow\">-</span>\n\t\t\t</th>\n\t\t\t<th class='dijitReset' colspan=\"5\">\n\t\t\t\t<div class=\"dijitVisible\">\n\t\t\t\t\t<div class=\"dijitPopup dijitMenu dijitMenuPassive dijitHidden\" dojoAttachPoint=\"monthDropDown\" dojoAttachEvent=\"onmouseup: _onMonthSelect, onmouseover: _onMenuHover, onmouseout: _onMenuHover\">\n\t\t\t\t\t\t<div class=\"dijitCalendarMonthLabelTemplate dijitCalendarMonthLabel\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div dojoAttachPoint=\"monthLabelSpacer\" class=\"dijitSpacer\"></div>\n\t\t\t\t<div dojoAttachPoint=\"monthLabelNode\" class=\"dijitCalendarMonthLabel dijitInline dijitVisible\" dojoAttachEvent=\"onmousedown: _onMonthToggle\"></div>\n\t\t\t</th>\n\t\t\t<th class='dijitReset' dojoAttachPoint=\"incrementMonth\">\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarIncrease\" waiRole=\"presentation\">\n\t\t\t\t<span dojoAttachPoint=\"increaseArrowNode\" class=\"dijitA11ySideArrow\">+</span>\n\t\t\t</th>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th class=\"dijitReset dijitCalendarDayLabelTemplate\" role=\"columnheader\"><span class=\"dijitCalendarDayLabel\"></span></th>\n\t\t</tr>\n\t</thead>\n\t<tbody dojoAttachEvent=\"onclick: _onDayClick, onmouseover: _onDayMouseOver, onmouseout: _onDayMouseOut\" class=\"dijitReset dijitCalendarBodyContainer\">\n\t\t<tr class=\"dijitReset dijitCalendarWeekTemplate\" role=\"row\">\n\t\t\t<td class=\"dijitReset dijitCalendarDateTemplate\" role=\"gridcell\"><span class=\"dijitCalendarDateLabel\"></span></td>\n\t\t</tr>\n\t</tbody>\n\t<tfoot class=\"dijitReset dijitCalendarYearContainer\">\n\t\t<tr>\n\t\t\t<td class='dijitReset' valign=\"top\" colspan=\"7\">\n\t\t\t\t<h3 class=\"dijitCalendarYearLabel\">\n\t\t\t\t\t<span dojoAttachPoint=\"previousYearLabelNode\" class=\"dijitInline dijitCalendarPreviousYear\"></span>\n\t\t\t\t\t<span dojoAttachPoint=\"currentYearLabelNode\" class=\"dijitInline dijitCalendarSelectedYear\"></span>\n\t\t\t\t\t<span dojoAttachPoint=\"nextYearLabelNode\" class=\"dijitInline dijitCalendarNextYear\"></span>\n\t\t\t\t</h3>\n\t\t\t</td>\n\t\t</tr>\n\t</tfoot>\n</table>\n"),value:new Date(),datePackage:"dojo.date",dayWidth:"narrow",tabIndex:"0",attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{tabIndex:"domNode"}),setValue:function(_e18){dojo.deprecated("dijit.Calendar:setValue() is deprecated.  Use attr('value', ...) instead.","","2.0");this.attr("value",_e18);},_getValueAttr:function(){var _e19=new this.dateClassObj(this.value);_e19.setHours(0,0,0,0);if(_e19.getDate()<this.value.getDate()){_e19=this.dateFuncObj.add(_e19,"hour",1);}return _e19;},_setValueAttr:function(_e1a){if(!this.value||this.dateFuncObj.compare(_e1a,this.value)){_e1a=new this.dateClassObj(_e1a);_e1a.setHours(1);this.displayMonth=new this.dateClassObj(_e1a);if(!this.isDisabledDate(_e1a,this.lang)){this.value=_e1a;this.onChange(this.attr("value"));}dojo.attr(this.domNode,"aria-label",this.dateLocaleModule.format(_e1a,{selector:"date",formatLength:"full"}));this._populateGrid();}},_setText:function(node,text){while(node.firstChild){node.removeChild(node.firstChild);}node.appendChild(dojo.doc.createTextNode(text));},_populateGrid:function(){var _e1b=this.displayMonth;_e1b.setDate(1);var _e1c=_e1b.getDay(),_e1d=this.dateFuncObj.getDaysInMonth(_e1b),_e1e=this.dateFuncObj.getDaysInMonth(this.dateFuncObj.add(_e1b,"month",-1)),_e1f=new this.dateClassObj(),_e20=dojo.cldr.supplemental.getFirstDayOfWeek(this.lang);if(_e20>_e1c){_e20-=7;}dojo.query(".dijitCalendarDateTemplate",this.domNode).forEach(function(_e21,i){i+=_e20;var date=new this.dateClassObj(_e1b),_e22,_e23="dijitCalendar",adj=0;if(i<_e1c){_e22=_e1e-_e1c+i+1;adj=-1;_e23+="Previous";}else{if(i>=(_e1c+_e1d)){_e22=i-_e1c-_e1d+1;adj=1;_e23+="Next";}else{_e22=i-_e1c+1;_e23+="Current";}}if(adj){date=this.dateFuncObj.add(date,"month",adj);}date.setDate(_e22);if(!this.dateFuncObj.compare(date,_e1f,"date")){_e23="dijitCalendarCurrentDate "+_e23;}if(this._isSelectedDate(date,this.lang)){_e23="dijitCalendarSelectedDate "+_e23;}if(this.isDisabledDate(date,this.lang)){_e23="dijitCalendarDisabledDate "+_e23;}var _e24=this.getClassForDate(date,this.lang);if(_e24){_e23=_e24+" "+_e23;}_e21.className=_e23+"Month dijitCalendarDateTemplate";_e21.dijitDateValue=date.valueOf();var _e25=dojo.query(".dijitCalendarDateLabel",_e21)[0],text=date.getDateLocalized?date.getDateLocalized(this.lang):date.getDate();this._setText(_e25,text);},this);var _e26=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang);this._setText(this.monthLabelNode,_e26[_e1b.getMonth()]);var y=_e1b.getFullYear()-1;var d=new this.dateClassObj();dojo.forEach(["previous","current","next"],function(name){d.setFullYear(y++);this._setText(this[name+"YearLabelNode"],this.dateLocaleModule.format(d,{selector:"year",locale:this.lang}));},this);var _e27=this;var _e28=function(_e29,_e2a,adj){_e27._connects.push(dijit.typematic.addMouseListener(_e27[_e29],_e27,function(_e2b){if(_e2b>=0){_e27._adjustDisplay(_e2a,adj);}},0.8,500));};_e28("incrementMonth","month",1);_e28("decrementMonth","month",-1);_e28("nextYearLabelNode","year",1);_e28("previousYearLabelNode","year",-1);},goToToday:function(){this.attr("value",new this.dateClassObj());},constructor:function(args){var _e2c=(args.datePackage&&(args.datePackage!="dojo.date"))?args.datePackage+".Date":"Date";this.dateClassObj=dojo.getObject(_e2c,false);this.datePackage=args.datePackage||this.datePackage;this.dateFuncObj=dojo.getObject(this.datePackage,false);this.dateLocaleModule=dojo.getObject(this.datePackage+".locale",false);},postMixInProperties:function(){if(isNaN(this.value)){delete this.value;}this.inherited(arguments);},postCreate:function(){this.inherited(arguments);dojo.setSelectable(this.domNode,false);var _e2d=dojo.hitch(this,function(_e2e,n){var _e2f=dojo.query(_e2e,this.domNode)[0];for(var i=0;i<n;i++){_e2f.parentNode.appendChild(_e2f.cloneNode(true));}});_e2d(".dijitCalendarDayLabelTemplate",6);_e2d(".dijitCalendarDateTemplate",6);_e2d(".dijitCalendarWeekTemplate",5);var _e30=this.dateLocaleModule.getNames("days",this.dayWidth,"standAlone",this.lang);var _e31=dojo.cldr.supplemental.getFirstDayOfWeek(this.lang);dojo.query(".dijitCalendarDayLabel",this.domNode).forEach(function(_e32,i){this._setText(_e32,_e30[(i+_e31)%7]);},this);var _e33=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang);_e2d(".dijitCalendarMonthLabelTemplate",_e33.length-1);dojo.query(".dijitCalendarMonthLabelTemplate",this.domNode).forEach(function(node,i){dojo.attr(node,"month",i);this._setText(node,_e33[i]);dojo.place(node.cloneNode(true),this.monthLabelSpacer);},this);var _e34=this.value;this.value=null;this.attr("value",new this.dateClassObj(_e34));},_onMenuHover:function(e){dojo.stopEvent(e);dojo.toggleClass(e.target,"dijitMenuItemHover");},_adjustDisplay:function(part,_e35){this.displayMonth=this.dateFuncObj.add(this.displayMonth,part,_e35);this._populateGrid();},_onMonthToggle:function(evt){dojo.stopEvent(evt);if(evt.type=="mousedown"){var _e36=dojo.position(this.monthLabelNode);var dim={width:_e36.w+"px",top:-this.displayMonth.getMonth()*_e36.h+"px"};if((dojo.isIE&&dojo.isQuirks)||dojo.isIE<7){dim.left=-_e36.w/2+"px";}dojo.style(this.monthDropDown,dim);this._popupHandler=this.connect(document,"onmouseup","_onMonthToggle");}else{this.disconnect(this._popupHandler);delete this._popupHandler;}dojo.toggleClass(this.monthDropDown,"dijitHidden");dojo.toggleClass(this.monthLabelNode,"dijitVisible");},_onMonthSelect:function(evt){this._onMonthToggle(evt);this.displayMonth.setMonth(dojo.attr(evt.target,"month"));this._populateGrid();},_onDayClick:function(evt){dojo.stopEvent(evt);for(var node=evt.target;node&&!node.dijitDateValue;node=node.parentNode){}if(node&&!dojo.hasClass(node,"dijitCalendarDisabledDate")){this.attr("value",node.dijitDateValue);this.onValueSelected(this.attr("value"));}},_onDayMouseOver:function(evt){var node=evt.target;if(node&&(node.dijitDateValue||node==this.previousYearLabelNode||node==this.nextYearLabelNode)){dojo.addClass(node,"dijitCalendarHoveredDate");this._currentNode=node;}},_onDayMouseOut:function(evt){if(!this._currentNode){return;}for(var node=evt.relatedTarget;node;){if(node==this._currentNode){return;}try{node=node.parentNode;}catch(x){node=null;}}dojo.removeClass(this._currentNode,"dijitCalendarHoveredDate");this._currentNode=null;},_onKeyPress:function(evt){var dk=dojo.keys,_e37=-1,_e38,_e39=this.value;switch(evt.keyCode){case dk.RIGHT_ARROW:_e37=1;case dk.LEFT_ARROW:_e38="day";if(!this.isLeftToRight()){_e37*=-1;}break;case dk.DOWN_ARROW:_e37=1;case dk.UP_ARROW:_e38="week";break;case dk.PAGE_DOWN:_e37=1;case dk.PAGE_UP:_e38=evt.ctrlKey?"year":"month";break;case dk.END:_e39=this.dateFuncObj.add(_e39,"month",1);_e38="day";case dk.HOME:_e39=new Date(_e39).setDate(1);break;case dk.ENTER:this.onValueSelected(this.attr("value"));break;case dk.ESCAPE:default:return;}dojo.stopEvent(evt);if(_e38){_e39=this.dateFuncObj.add(_e39,_e38,_e37);}this.attr("value",_e39);},onValueSelected:function(date){},onChange:function(date){},_isSelectedDate:function(_e3a,_e3b){return !this.dateFuncObj.compare(_e3a,this.value,"date");},isDisabledDate:function(_e3c,_e3d){},getClassForDate:function(_e3e,_e3f){}});}if(typeof dojo==="undefined"||!dojo._hasResource["dijit.form.TextBox"]){typeof dojo==="undefined"||(dojo._hasResource["dijit.form.TextBox"]=true);dojo.provide("dijit.form.TextBox");dojo.declare("dijit.form.TextBox",dijit.form._FormValueWidget,{trim:false,uppercase:false,lowercase:false,propercase:false,maxLength:"",selectOnClick:false,templateString:dojo.cache("dijit.form","templates/TextBox.html","<input class=\"dijit dijitReset dijitLeft\" dojoAttachPoint='textbox,focusNode'\n\tdojoAttachEvent='onmouseenter:_onMouse,onmouseleave:_onMouse'\n\tautocomplete=\"off\" type=\"${type}\" ${nameAttrSetting}\n\t/>\n"),baseClass:"dijitTextBox",attributeMap:dojo.delegate(dijit.form._FormValueWidget.prototype.attributeMap,{maxLength:"focusNode"}),_getValueAttr:function(){return this.parse(this.attr("displayedValue"),this.constraints);},_setValueAttr:function(_e40,_e41,_e42){var _e43;if(_e40!==undefined){_e43=this.filter(_e40);if(typeof _e42!="string"){if(_e43!==null&&((typeof _e43!="number")||!isNaN(_e43))){_e42=this.filter(this.format(_e43,this.constraints));}else{_e42="";}}}if(_e42!=null&&_e42!=undefined&&((typeof _e42)!="number"||!isNaN(_e42))&&this.textbox.value!=_e42){this.textbox.value=_e42;}this.inherited(arguments,[_e43,_e41]);},displayedValue:"",getDisplayedValue:function(){dojo.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use attr('displayedValue') instead.","","2.0");return this.attr("displayedValue");},_getDisplayedValueAttr:function(){return this.filter(this.textbox.value);},setDisplayedValue:function(_e44){dojo.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use attr('displayedValue', ...) instead.","","2.0");this.attr("displayedValue",_e44);},_setDisplayedValueAttr:function(_e45){if(_e45===null||_e45===undefined){_e45="";}else{if(typeof _e45!="string"){_e45=String(_e45);}}this.textbox.value=_e45;this._setValueAttr(this.attr("value"),undefined,_e45);},format:function(_e46,_e47){return ((_e46==null||_e46==undefined)?"":(_e46.toString?_e46.toString():_e46));},parse:function(_e48,_e49){return _e48;},_refreshState:function(){},_onInput:function(e){if(e&&e.type&&/key/i.test(e.type)&&e.keyCode){switch(e.keyCode){case dojo.keys.SHIFT:case dojo.keys.ALT:case dojo.keys.CTRL:case dojo.keys.TAB:return;}}if(this.intermediateChanges){var _e4a=this;setTimeout(function(){_e4a._handleOnChange(_e4a.attr("value"),false);},0);}this._refreshState();},postCreate:function(){this.textbox.setAttribute("value",this.textbox.value);this.inherited(arguments);if(dojo.isMoz||dojo.isOpera){this.connect(this.textbox,"oninput",this._onInput);}else{this.connect(this.textbox,"onkeydown",this._onInput);this.connect(this.textbox,"onkeyup",this._onInput);this.connect(this.textbox,"onpaste",this._onInput);this.connect(this.textbox,"oncut",this._onInput);}},_blankValue:"",filter:function(val){if(val===null){return this._blankValue;}if(typeof val!="string"){return val;}if(this.trim){val=dojo.trim(val);}if(this.uppercase){val=val.toUpperCase();}if(this.lowercase){val=val.toLowerCase();}if(this.propercase){val=val.replace(/[^\s]+/g,function(word){return word.substring(0,1).toUpperCase()+word.substring(1);});}return val;},_setBlurValue:function(){this._setValueAttr(this.attr("value"),true);},_onBlur:function(e){if(this.disabled){return;}this._setBlurValue();this.inherited(arguments);if(this._selectOnClickHandle){this.disconnect(this._selectOnClickHandle);}if(this.selectOnClick&&dojo.isMoz){this.textbox.selectionStart=this.textbox.selectionEnd=undefined;}},_onFocus:function(by){if(this.disabled||this.readOnly){return;}if(this.selectOnClick&&by=="mouse"){this._selectOnClickHandle=this.connect(this.domNode,"onmouseup",function(){this.disconnect(this._selectOnClickHandle);var _e4b;if(dojo.isIE){var _e4c=dojo.doc.selection.createRange();var _e4d=_e4c.parentElement();_e4b=_e4d==this.textbox&&_e4c.text.length==0;}else{_e4b=this.textbox.selectionStart==this.textbox.selectionEnd;}if(_e4b){dijit.selectInputText(this.textbox);}});}this._refreshState();this.inherited(arguments);},reset:function(){this.textbox.value="";this.inherited(arguments);}});dijit.selectInputText=function(_e4e,_e4f,stop){var _e50=dojo.global;var _e51=dojo.doc;_e4e=dojo.byId(_e4e);if(isNaN(_e4f)){_e4f=0;}if(isNaN(stop)){stop=_e4e.value?_e4e.value.length:0;}dijit.focus(_e4e);if(_e51["selection"]&&dojo.body()["createTextRange"]){if(_e4e.createTextRange){var _e52=_e4e.createTextRange();_e52.collapse(true);_e52.moveStart("character",-99999);_e52.moveStart("character",_e4f);_e52.moveEnd("character",stop-_e4f);_e52.select();}}else{if(_e50["getSelection"]){if(_e4e.setSelectionRange){_e4e.setSelectionRange(_e4f,stop);}}}};}if(typeof dojo==="undefined"||!dojo._hasResource["dijit.Tooltip"]){typeof dojo==="undefined"||(dojo._hasResource["dijit.Tooltip"]=true);dojo.provide("dijit.Tooltip");dojo.declare("dijit._MasterTooltip",[dijit._Widget,dijit._Templated],{duration:dijit.defaultDuration,templateString:dojo.cache("dijit","templates/Tooltip.html","<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\">\n\t<div class=\"dijitTooltipContainer dijitTooltipContents\" dojoAttachPoint=\"containerNode\" waiRole='alert'></div>\n\t<div class=\"dijitTooltipConnector\"></div>\n</div>\n"),postCreate:function(){dojo.body().appendChild(this.domNode);this.bgIframe=new dijit.BackgroundIframe(this.domNode);this.fadeIn=dojo.fadeIn({node:this.domNode,duration:this.duration,onEnd:dojo.hitch(this,"_onShow")});this.fadeOut=dojo.fadeOut({node:this.domNode,duration:this.duration,onEnd:dojo.hitch(this,"_onHide")});},show:function(_e53,_e54,_e55){if(this.aroundNode&&this.aroundNode===_e54){return;}if(this.fadeOut.status()=="playing"){this._onDeck=arguments;return;}this.containerNode.innerHTML=_e53;this.domNode.style.top=(this.domNode.offsetTop+1)+"px";var pos=dijit.placeOnScreenAroundElement(this.domNode,_e54,dijit.getPopupAroundAlignment((_e55&&_e55.length)?_e55:dijit.Tooltip.defaultPosition,this.isLeftToRight()),dojo.hitch(this,"orient"));dojo.style(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=true;this.aroundNode=_e54;},orient:function(node,_e56,_e57){node.className="dijitTooltip "+{"BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[_e56+"-"+_e57];},_onShow:function(){if(dojo.isIE){this.domNode.style.filter="";}},hide:function(_e58){if(this._onDeck&&this._onDeck[1]==_e58){this._onDeck=null;}else{if(this.aroundNode===_e58){this.fadeIn.stop();this.isShowingNow=false;this.aroundNode=null;this.fadeOut.play();}else{}}},_onHide:function(){this.domNode.style.cssText="";if(this._onDeck){this.show.apply(this,this._onDeck);this._onDeck=null;}}});dijit.showTooltip=function(_e59,_e5a,_e5b){if(!dijit._masterTT){dijit._masterTT=new dijit._MasterTooltip();}return dijit._masterTT.show(_e59,_e5a,_e5b);};dijit.hideTooltip=function(_e5c){if(!dijit._masterTT){dijit._masterTT=new dijit._MasterTooltip();}return dijit._masterTT.hide(_e5c);};dojo.declare("dijit.Tooltip",dijit._Widget,{label:"",showDelay:400,connectId:[],position:[],constructor:function(){this._nodeConnectionsById={};},_setConnectIdAttr:function(_e5d){var _e5e={};for(var _e5f in this._nodeConnectionsById){if(_e5f in _e5e){continue;}this.removeTarget(_e5f);}dojo.forEach(dojo.isArrayLike(_e5d)?_e5d:[_e5d],this.addTarget,this);},_getConnectIdAttr:function(){var ary=[],_e60={};for(var id in this._nodeConnectionsById){if(!(id in _e60)){ary.push(id);}}return ary;},addTarget:function(id){var node=dojo.byId(id);if(!node){return;}if(node.id in this._nodeConnectionsById){return;}this._nodeConnectionsById[node.id]=[this.connect(node,"onmouseenter","_onTargetMouseEnter"),this.connect(node,"onmouseleave","_onTargetMouseLeave"),this.connect(node,"onfocus","_onTargetFocus"),this.connect(node,"onblur","_onTargetBlur")];if(dojo.isIE&&!node.style.zoom){node.style.zoom=1;}},removeTarget:function(node){var id=node.id||node;if(id in this._nodeConnectionsById){dojo.forEach(this._nodeConnectionsById[id],this.disconnect,this);delete this._nodeConnectionsById[id];}},postCreate:function(){dojo.addClass(this.domNode,"dijitTooltipData");},startup:function(){this.inherited(arguments);var ids=this.connectId;dojo.forEach(dojo.isArrayLike(ids)?ids:[ids],this.addTarget,this);},_onTargetMouseEnter:function(e){this._onHover(e);},_onTargetMouseLeave:function(e){this._onUnHover(e);},_onTargetFocus:function(e){this._focus=true;this._onHover(e);},_onTargetBlur:function(e){this._focus=false;this._onUnHover(e);},_onHover:function(e){if(!this._showTimer){var _e61=e.target;this._showTimer=setTimeout(dojo.hitch(this,function(){this.open(_e61);}),this.showDelay);}},_onUnHover:function(e){if(this._focus){return;}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}this.close();},open:function(_e62){if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}dijit.showTooltip(this.label||this.domNode.innerHTML,_e62,this.position);this._connectNode=_e62;this.onShow(_e62,this.position);},close:function(){if(this._connectNode){dijit.hideTooltip(this._connectNode);delete this._connectNode;this.onHide();}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}},onShow:function(_e63,_e64){},onHide:function(){},uninitialize:function(){this.close();this.inherited(arguments);}});dijit.Tooltip.defaultPosition=["after","before"];}if(typeof dojo==="undefined"||!dojo._hasResource["dijit.form.ValidationTextBox"]){typeof dojo==="undefined"||(dojo._hasResource["dijit.form.ValidationTextBox"]=true);dojo.provide("dijit.form.ValidationTextBox");dojo.declare("dijit.form.ValidationTextBox",dijit.form.TextBox,{templateString:dojo.cache("dijit.form","templates/ValidationTextBox.html","<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\n\tid=\"widget_${id}\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\" waiRole=\"presentation\"\n\t><div style=\"overflow:hidden;\"\n\t\t><div class=\"dijitReset dijitValidationIcon\"><br></div\n\t\t><div class=\"dijitReset dijitValidationIconText\">&Chi;</div\n\t\t><div class=\"dijitReset dijitInputField\"\n\t\t\t><input class=\"dijitReset\" dojoAttachPoint='textbox,focusNode' autocomplete=\"off\"\n\t\t\t${nameAttrSetting} type='${type}'\n\t\t/></div\n\t></div\n></div>\n"),baseClass:"dijitTextBox",required:false,promptMessage:"",invalidMessage:"$_unset_$",constraints:{},regExp:".*",regExpGen:function(_e65){return this.regExp;},state:"",tooltipPosition:[],_setValueAttr:function(){this.inherited(arguments);this.validate(this._focused);},validator:function(_e66,_e67){return (new RegExp("^(?:"+this.regExpGen(_e67)+")"+(this.required?"":"?")+"$")).test(_e66)&&(!this.required||!this._isEmpty(_e66))&&(this._isEmpty(_e66)||this.parse(_e66,_e67)!==undefined);},_isValidSubset:function(){return this.textbox.value.search(this._partialre)==0;},isValid:function(_e68){return this.validator(this.textbox.value,this.constraints);},_isEmpty:function(_e69){return /^\s*$/.test(_e69);},getErrorMessage:function(_e6a){return this.invalidMessage;},getPromptMessage:function(_e6b){return this.promptMessage;},_maskValidSubsetError:true,validate:function(_e6c){var _e6d="";var _e6e=this.disabled||this.isValid(_e6c);if(_e6e){this._maskValidSubsetError=true;}var _e6f=!_e6e&&_e6c&&this._isValidSubset();var _e70=this._isEmpty(this.textbox.value);if(_e70){this._maskValidSubsetError=true;}this.state=(_e6e||(!this._hasBeenBlurred&&_e70)||_e6f)?"":"Error";if(this.state=="Error"){this._maskValidSubsetError=false;}this._setStateClass();dijit.setWaiState(this.focusNode,"invalid",_e6e?"false":"true");if(_e6c){if(_e70){_e6d=this.getPromptMessage(true);}if(!_e6d&&(this.state=="Error"||(_e6f&&!this._maskValidSubsetError))){_e6d=this.getErrorMessage(true);}}this.displayMessage(_e6d);return _e6e;},_message:"",displayMessage:function(_e71){if(this._message==_e71){return;}this._message=_e71;dijit.hideTooltip(this.domNode);if(_e71){dijit.showTooltip(_e71,this.domNode,this.tooltipPosition);}},_refreshState:function(){this.validate(this._focused);this.inherited(arguments);},constructor:function(){this.constraints={};},postMixInProperties:function(){this.inherited(arguments);this.constraints.locale=this.lang;this.messages=dojo.i18n.getLocalization("dijit.form","validate",this.lang);if(this.invalidMessage=="$_unset_$"){this.invalidMessage=this.messages.invalidMessage;}var p=this.regExpGen(this.constraints);this.regExp=p;var _e72="";if(p!=".*"){this.regExp.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(re){switch(re.charAt(0)){case "{":case "+":case "?":case "*":case "^":case "$":case "|":case "(":_e72+=re;break;case ")":_e72+="|$)";break;default:_e72+="(?:"+re+"|$)";break;}});}try{"".search(_e72);}catch(e){_e72=this.regExp;console.warn("RegExp error in "+this.declaredClass+": "+this.regExp);}this._partialre="^(?:"+_e72+")$";},_setDisabledAttr:function(_e73){this.inherited(arguments);this._refreshState();},_setRequiredAttr:function(_e74){this.required=_e74;dijit.setWaiState(this.focusNode,"required",_e74);this._refreshState();},postCreate:function(){if(dojo.isIE){var s=dojo.getComputedStyle(this.focusNode);if(s){var ff=s.fontFamily;if(ff){this.focusNode.style.fontFamily=ff;}}}this.inherited(arguments);},reset:function(){this._maskValidSubsetError=true;this.inherited(arguments);},_onBlur:function(){this.displayMessage("");this.inherited(arguments);}});dojo.declare("dijit.form.MappedTextBox",dijit.form.ValidationTextBox,{postMixInProperties:function(){this.inherited(arguments);this.nameAttrSetting="";},serialize:function(val,_e75){return val.toString?val.toString():"";},toString:function(){var val=this.filter(this.attr("value"));return val!=null?(typeof val=="string"?val:this.serialize(val,this.constraints)):"";},validate:function(){this.valueNode.value=this.toString();return this.inherited(arguments);},buildRendering:function(){this.inherited(arguments);this.valueNode=dojo.place("<input type='hidden'"+(this.name?" name='"+this.name+"'":"")+">",this.textbox,"after");},reset:function(){this.valueNode.value="";this.inherited(arguments);}});dojo.declare("dijit.form.RangeBoundTextBox",dijit.form.MappedTextBox,{rangeMessage:"",rangeCheck:function(_e76,_e77){return ("min" in _e77?(this.compare(_e76,_e77.min)>=0):true)&&("max" in _e77?(this.compare(_e76,_e77.max)<=0):true);},isInRange:function(_e78){return this.rangeCheck(this.attr("value"),this.constraints);},_isDefinitelyOutOfRange:function(){var val=this.attr("value");var _e79=false;var _e7a=false;if("min" in this.constraints){var min=this.constraints.min;min=this.compare(val,((typeof min=="number")&&min>=0&&val!=0)?0:min);_e79=(typeof min=="number")&&min<0;}if("max" in this.constraints){var max=this.constraints.max;max=this.compare(val,((typeof max!="number")||max>0)?max:0);_e7a=(typeof max=="number")&&max>0;}return _e79||_e7a;},_isValidSubset:function(){return this.inherited(arguments)&&!this._isDefinitelyOutOfRange();},isValid:function(_e7b){return this.inherited(arguments)&&((this._isEmpty(this.textbox.value)&&!this.required)||this.isInRange(_e7b));},getErrorMessage:function(_e7c){var v=this.attr("value");if(v!==null&&v!==""&&v!==undefined&&!this.isInRange(_e7c)){return this.rangeMessage;}return this.inherited(arguments);},postMixInProperties:function(){this.inherited(arguments);if(!this.rangeMessage){this.messages=dojo.i18n.getLocalization("dijit.form","validate",this.lang);this.rangeMessage=this.messages.rangeMessage;}},postCreate:function(){this.inherited(arguments);if(this.constraints.min!==undefined){dijit.setWaiState(this.focusNode,"valuemin",this.constraints.min);}if(this.constraints.max!==undefined){dijit.setWaiState(this.focusNode,"valuemax",this.constraints.max);}},_setValueAttr:function(_e7d,_e7e){dijit.setWaiState(this.focusNode,"valuenow",_e7d);this.inherited(arguments);}});}if(typeof dojo==="undefined"||!dojo._hasResource["dijit.form._DateTimeTextBox"]){typeof dojo==="undefined"||(dojo._hasResource["dijit.form._DateTimeTextBox"]=true);dojo.provide("dijit.form._DateTimeTextBox");dojo.declare("dijit.form._DateTimeTextBox",dijit.form.RangeBoundTextBox,{regExpGen:dojo.date.locale.regexp,datePackage:"dojo.date",compare:dojo.date.compare,format:function(_e7f,_e80){if(!_e7f){return "";}return this.dateLocaleModule.format(_e7f,_e80);},parse:function(_e81,_e82){return this.dateLocaleModule.parse(_e81,_e82)||(this._isEmpty(_e81)?null:undefined);},serialize:function(val,_e83){if(val.toGregorian){val=val.toGregorian();}return dojo.date.stamp.toISOString(val,_e83);},value:new Date(""),_blankValue:null,popupClass:"",_selector:"",constructor:function(args){var _e84=args.datePackage?args.datePackage+".Date":"Date";this.dateClassObj=dojo.getObject(_e84,false);this.value=new this.dateClassObj("");this.datePackage=args.datePackage||this.datePackage;this.dateLocaleModule=dojo.getObject(this.datePackage+".locale",false);this.regExpGen=this.dateLocaleModule.regexp;},postMixInProperties:function(){this.inherited(arguments);if(!this.value||this.value.toString()==dijit.form._DateTimeTextBox.prototype.value.toString()){this.value=null;}var _e85=this.constraints;_e85.selector=this._selector;_e85.fullYear=true;var _e86=dojo.date.stamp.fromISOString;if(typeof _e85.min=="string"){_e85.min=_e86(_e85.min);}if(typeof _e85.max=="string"){_e85.max=_e86(_e85.max);}},_onFocus:function(evt){this._open();this.inherited(arguments);},_setValueAttr:function(_e87,_e88,_e89){if(_e87 instanceof Date&&!(this.dateClassObj instanceof Date)){_e87=new this.dateClassObj(_e87);}this.inherited(arguments);if(this._picker){if(!_e87){_e87=new this.dateClassObj();}this._picker.attr("value",_e87);}},_open:function(){if(this.disabled||this.readOnly||!this.popupClass){return;}var _e8a=this;if(!this._picker){var _e8b=dojo.getObject(this.popupClass,false);this._picker=new _e8b({onValueSelected:function(_e8c){if(_e8a._tabbingAway){delete _e8a._tabbingAway;}else{_e8a.focus();}setTimeout(dojo.hitch(_e8a,"_close"),1);dijit.form._DateTimeTextBox.superclass._setValueAttr.call(_e8a,_e8c,true);},id:this.id+"_popup",lang:_e8a.lang,constraints:_e8a.constraints,datePackage:_e8a.datePackage,isDisabledDate:function(date){var _e8d=dojo.date.compare;var _e8e=_e8a.constraints;return _e8e&&(_e8e.min&&(_e8d(_e8e.min,date,_e8a._selector)>0)||(_e8e.max&&_e8d(_e8e.max,date,_e8a._selector)<0));}});this._picker.attr("value",this.attr("value")||new this.dateClassObj());}if(!this._opened){dijit.popup.open({parent:this,popup:this._picker,orient:{"BL":"TL","TL":"BL"},around:this.domNode,onCancel:dojo.hitch(this,this._close),onClose:function(){_e8a._opened=false;}});this._opened=true;}dojo.marginBox(this._picker.domNode,{w:this.domNode.offsetWidth});},_close:function(){if(this._opened){dijit.popup.close(this._picker);this._opened=false;}},_onBlur:function(){this._close();if(this._picker){this._picker.destroy();delete this._picker;}this.inherited(arguments);},_getDisplayedValueAttr:function(){return this.textbox.value;},_setDisplayedValueAttr:function(_e8f,_e90){this._setValueAttr(this.parse(_e8f,this.constraints),_e90,_e8f);},destroy:function(){if(this._picker){this._picker.destroy();delete this._picker;}this.inherited(arguments);},postCreate:function(){this.inherited(arguments);this.connect(this.focusNode,"onkeypress",this._onKeyPress);this.connect(this.focusNode,"onclick",this._open);},_onKeyPress:function(e){var p=this._picker,dk=dojo.keys;if(p&&this._opened&&p.handleKey){if(p.handleKey(e)===false){return;}}if(this._opened&&e.charOrCode==dk.ESCAPE&&!(e.shiftKey||e.ctrlKey||e.altKey||e.metaKey)){this._close();dojo.stopEvent(e);}else{if(!this._opened&&e.charOrCode==dk.DOWN_ARROW){this._open();dojo.stopEvent(e);}else{if(e.charOrCode===dk.TAB){this._tabbingAway=true;}else{if(this._opened&&(e.keyChar||e.charOrCode===dk.BACKSPACE||e.charOrCode==dk.DELETE)){setTimeout(dojo.hitch(this,function(){dijit.placeOnScreenAroundElement(p.domNode.parentNode,this.domNode,{"BL":"TL","TL":"BL"},p.orient?dojo.hitch(p,"orient"):null);}),1);}}}}}});}if(typeof dojo==="undefined"||!dojo._hasResource["dijit.form.DateTextBox"]){typeof dojo==="undefined"||(dojo._hasResource["dijit.form.DateTextBox"]=true);dojo.provide("dijit.form.DateTextBox");dojo.declare("dijit.form.DateTextBox",dijit.form._DateTimeTextBox,{baseClass:"dijitTextBox dijitDateTextBox",popupClass:"dijit.Calendar",_selector:"date",value:new Date("")});}if(typeof dojo==="undefined"||!dojo._hasResource["dojox.form.Rating"]){typeof dojo==="undefined"||(dojo._hasResource["dojox.form.Rating"]=true);dojo.provide("dojox.form.Rating");dojo.declare("dojox.form.Rating",dijit.form._FormWidget,{templateString:null,numStars:3,value:0,constructor:function(_e91){dojo.mixin(this,_e91);var tpl="<div dojoAttachPoint=\"domNode\" class=\"dojoxRating dijitInline\">"+"<input type=\"hidden\" value=\"0\" dojoAttachPoint=\"focusNode\" /><ul>${stars}</ul>"+"</div>";var _e92="<li class=\"dojoxRatingStar dijitInline\" dojoAttachEvent=\"onclick:onStarClick,onmouseover:_onMouse,onmouseout:_onMouse\" value=\"${value}\"></li>";var _e93="";for(var i=0;i<this.numStars;i++){_e93+=dojo.string.substitute(_e92,{value:i+1});}this.templateString=dojo.string.substitute(tpl,{stars:_e93});},postCreate:function(){this.inherited(arguments);this._renderStars(this.value);},_onMouse:function(evt){this.inherited(arguments);if(this._hovering){var _e94=+dojo.attr(evt.target,"value");this.onMouseOver(evt,_e94);this._renderStars(_e94,true);}else{this._renderStars(this.value);}},_renderStars:function(_e95,_e96){dojo.query(".dojoxRatingStar",this.domNode).forEach(function(star,i){if(i+1>_e95){dojo.removeClass(star,"dojoxRatingStarHover");dojo.removeClass(star,"dojoxRatingStarChecked");}else{dojo.removeClass(star,"dojoxRatingStar"+(_e96?"Checked":"Hover"));dojo.addClass(star,"dojoxRatingStar"+(_e96?"Hover":"Checked"));}});},onStarClick:function(evt){var _e97=+dojo.attr(evt.target,"value");this.setAttribute("value",_e97==this.value?0:_e97);this._renderStars(this.value);this.onChange(this.value);},onMouseOver:function(){},setAttribute:function(key,_e98){this.inherited("setAttribute",arguments);if(key=="value"){this._renderStars(this.value);this.onChange(this.value);}}});}if(typeof dojo==="undefined"||!dojo._hasResource["oa_v2.dialogs"]){typeof dojo==="undefined"||(dojo._hasResource["oa_v2.dialogs"]=true);dojo.provide("oa_v2.dialogs");}if(typeof dojo==="undefined"||!dojo._hasResource["oa_v2.pages.tours"]){typeof dojo==="undefined"||(dojo._hasResource["oa_v2.pages.tours"]=true);dojo.provide("oa_v2.pages.tours");alp.autoRedrawIE9plus();(function(f){if(typeof GMap!=="undefined"){f.apply(this);}else{dojo["require"]("alp.google");alp.gmap_asyncdfrd().addCallback(this,f);}})(function(){alp.util.install_delayed_img();alp.util.getDfrd(function(){return dojo.byId("alpmap")||undefined;}).addCallback(function(node){dojo.getObject("alp._obj",true).oafc3=new oa_v2.OAFC3(node,{is_choosable:dojo.getObject("alpConfig.oa_v2.tours.is_choosable")||function(_e99,_e9a){var a=_e9a;return !!(a&&a.hastour&&a.hastour[_e99]);},pager_settings:dojo.mixin({q_snippets:".tour-results .tour-result",q_previous:".tour-results .js-pager-previous",q_next:".tour-results .js-pager-next",q_nitems:".js-pager-nitems",q_loading:".tour-results .js-pager-loading",q_mousescrollinfo:undefined,inactive_button_class:"inactive-pager-button",upfun_nitems:function(noli,_e9b){alp.util.setNodeText(noli,""+_e9b);}},dojo.getObject("alpConfig.oa_v2.tours.pager_settings")),sportselector_opts:dojo.getObject("alpConfig.oa_v2.tours.sportselector_opts"),sportminmax:dojo.getObject("alpConfig.oa_v2.tours.sportminmax")(),view_opts:{lineOptions:dojo.getObject("alpConfig.cluster.lineOptions")}});});});}dojo.i18n._preloadLocalizations("oa_v2.pages.nls.tours",["ROOT","de","de-de","en","en-gb","en-nz","en-us","fr","it","nl","xx"]);

