
/* Merged Plone Javascript file
 * This file is dynamically assembled from separate parts.
 * Some of these parts have 3rd party licenses or copyright information attached
 * Such information is valid for that section,
 * not for the entire composite file
 * originating files are separated by - filename.js -
 */

/* - popup.js - */
// http://www5.scout.ch/portal_javascripts/popup.js?original=1
function showconturafm(site){window.open(site,'','width=180, height=380')}

/* - jquery.expose.js - */
// http://www5.scout.ch/portal_javascripts/jquery.expose.js?original=1
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(4($){4 j(a,c,d){h b=a[c];2($.1d(b)){16{3 b.S(d)}Q(o){2(a.n){n("1r 1k g."+c+": "+o)}C{15 o;}3 q}}3 s}h f=x;h e,6=x;$.g={O:4(){3[1,0,0]},L:4(){3 f},J:4(){3 e},1p:4(){3 6},m:4(){3 f&&f.1i(":1f")},F:4(b,c){2(5.m()){3 5}2(b){e=b;6=c}C{b=e;c=6}2(!b||!b.E){3 5}2(!f){f=$(\'<I 14="\'+c.G+\'"></I>\').9({p:\'A\',W:0,V:0,U:\'R%\',w:$(v).w(),y:\'P\',k:0,7:c.7});$("T").N(f);$(v).u("M.t",4(a){2(a.K==Z){$.g.r()}});2(c.z){f.u("1o.t",4(){$.g.r()})}}2(j(c,"1m",5)===q){3 5}$.1l(b,4(){h a=$(5);2(!/H|A/i.1g(a.9("p"))){a.9("p","H")}});b.9({7:c.7+1});2(c.l){f.9("1e",c.l)}2(!5.m()){f.9({k:0,y:\'1c\'}).1b(c.B,c.k,4(){j(c,"1a",$.g)})}3 5},r:4(){h a=5;2(!5.m()){3 a}2(j(6,"19",a)===q){3 a}f.18(6.D,4(){e.9({7:6.7-1});j(6,"17",a)})}};$.13.g=4(a){2(!5.E){3 5}h b={n:s,G:\'1h\',B:\'12\',D:\'1j\',z:s,7:11,k:0.8,l:\'#10\'};2(1n a==\'Y\'){a={l:a}}$.X(b,a);$.g.F(5,b);3 5}})(1q);',62,90,'||if|return|function|this|conf|zIndex||css|||||||expose|var||fireEvent|opacity|color|isLoaded|alert|error|position|false|close|true|unexpose|bind|document|height|null|display|closeOnClick|absolute|loadSpeed|else|closeSpeed|length|load|maskId|relative|div|getExposed|keyCode|getMask|keypress|append|getVersion|none|catch|100|call|body|width|left|top|extend|string|27|333|9998|slow|prototype|id|throw|try|onClose|fadeOut|onBeforeClose|onLoad|fadeTo|block|isFunction|backgroundColor|visible|test|exposeMask|is|fast|calling|each|onBeforeLoad|typeof|click|getConf|jQuery|Error'.split('|'),0,{}))

/* - scoutlocations.js - */
// http://www5.scout.ch/portal_javascripts/scoutlocations.js?original=1
function getmapdetails(id){jq.get("scoutlocation_mapresults",{objId:id},
function(data){jq("#spslps_details").html(data)},"html");jq.scrollTo("#spslps_details")}
function getdetails(id){if(document.getElementById('spslps_details_'+id).style.display=='none'){jq.get("scoutlocation_details",{objId:id},
function(data){jq("#spslps_details_"+id).html(data);jq("#spslps_details_"+id).show("slow");jq("#spslps_"+id).removeClass("graybg");jq("#spslps_"+id).addClass("whitebg");jq("#spslps_details_"+id+"_close_button").show()},"html")} else{jq("#spslps_details_"+id).slideUp("slow");jq("#spslps_"+id).removeClass("whitebg");jq("#spslps_"+id).addClass("graybg");jq("#spslps_details_"+id+"_close_button").hide()}}
function reloaddetails(id){jq.get("scoutlocation_details",{objId:id},
function(data){jq("#spslps_details_"+id).html(data)},"html")}
function spslps_detail_close(id){jq("#spslps_"+id).removeClass("whitebg");jq("#spslps_"+id).addClass("graybg");jq("#spslps_details_"+id).slideUp("slow");jq("#spslps_details_"+id+"_close_button").hide()}
function getCities(selectBox){jq.get("scoutlocation_getcities",{canton:selectBox.value},
function(data){jq("#cityBox").html(data)},"html")}
function spslps_addToFavorites(id){jq.get("addfavorites",{objId:id},
function(data){jq("#favoritesportlet").html(data)},"html")}
function spslps_delFavorite(id){jq.get("delfavorites",{objId:id},
function(data){jq("#favoritesportlet").html(data)},"html")}
function showsearchbutton(){jq("#choosefirst").hide();jq("#searchbutton").show()}
function hidesearchbutton(show){jq("#searchbutton").hide();if(show=='googlemap'){jq("#choosefirst").hide()} else{jq("#choosefirst").show()}}
function spslps_switch_search(show,hide,hide2,hide3){jq("#searchby").val(show);document.getElementById('link_'+show).className='span';document.getElementById('link_'+hide).className='nix';document.getElementById('link_'+hide2).className='nix';document.getElementById('link_'+hide3).className='nix';jq("#link_"+show).addClass("span");jq("#link_"+hide).removeClass("span");jq("#link_"+hide2).removeClass("span");jq("#link_"+hide3).removeClass("span");jq("#"+show).show();jq("#"+hide).hide();jq("#"+hide2).hide();jq("#"+hide3).hide();hidesearchbutton(show);if(show=='name'){jq("#spslps_details").hide();jq("#searchdetails").hide();GUnload()}
else if(show=='googlemap'){jq("#spslps_details").show();jq("#searchdetails").hide();GUnload();load()}
else{jq("#spslps_details").hide();jq("#searchdetails").show();GUnload()}
if(show=='cantons'){spslps_deselectregion('fr');spslps_deselectregion('ne');spslps_deselectregion('vd');spslps_deselectregion('ge');spslps_deselectregion('be');spslps_deselectregion('ag');spslps_deselectregion('so');spslps_deselectregion('bl');spslps_deselectregion('bs');spslps_deselectregion('ju');spslps_deselectregion('lu');spslps_deselectregion('ow');spslps_deselectregion('nw');spslps_deselectregion('sz');spslps_deselectregion('zg');spslps_deselectregion('gl');spslps_deselectregion('ur');spslps_deselectregion('sg');spslps_deselectregion('sh');spslps_deselectregion('tg');spslps_deselectregion('ai');spslps_deselectregion('ar');spslps_deselectregion('zh');spslps_deselectregion('vs');spslps_deselectregion('ti');spslps_deselectregion('gr')}}
var cantons=new Array();
function spslps_selectcanton(id){if(cantons[id]!==true){document.getElementById(id).src='kantone/'+id+'-a.gif';cantons[id]=true;document.getElementById('checkbox_'+id).checked=true;showsearchbutton()} else{document.getElementById(id).src='kantone/ch.gif';cantons[id]=false;document.getElementById('checkbox_'+id).checked=false}}
function spslps_selectregion(id){document.getElementById(id).src='kantone/'+id+'-a.gif';cantons[id]=true;document.getElementById('checkbox_'+id).checked=true;showsearchbutton()}
function spslps_deselectregion(id){document.getElementById(id).src='kantone/ch.gif';cantons[id]=false;document.getElementById('checkbox_'+id).checked=false;hidesearchbutton()}
function spslps_mouseovercanton(id){if(cantons[id]!==true){document.getElementById(id).src='kantone/'+id+'-o.gif'}}
function spslps_mouseoutcanton(id){if(cantons[id]!==true){document.getElementById(id).src='kantone/ch.gif'}}
function printdetails(objId){mapwin=window.open('pfadistiftung_print?objId='+objId,'printdetail','left=20,top=20,width=720,height=750,menubar=yes,resizable=yes,scrollbars=yes')}
function show_addcomment(id){jq.get("scoutlocation_addcomment",{objId:id},
function(data){jq("#spslps_details_addcomment_"+id).html(data)},"html")}
function addcomment(formdata,id){if(formdata.remark_email.value==""){alert("Please enter your email address.");formdata.remark_email.focus();return false}
if(formdata.remark_name.value==""){alert("Please enter your name.");formdata.remark_name.focus();return false}
jq.get("scoutlocation_addcomment2",{objId:id,remarkEditorName:formdata.remark_name.value,remarkEditorEmail:formdata.remark_email.value,remarkText:formdata.remark_text.value},
function(data){jq("#spslps_details_addcomment_"+id).html(data)},"html")}
function savecomment(formdata,remarkId,id){jq.get("scoutlocation_savecomment",{objId:id,remarkId:remarkId,remarkStatus:formdata.remark_status.value,remarkEditorName:formdata.remark_name.value,remarkEditorEmail:formdata.remark_email.value,remarkText:formdata.remark_text.value},
function(data){reloaddetails(id)})}
function savelagerplatz(formdata,objId){jq.get("scoutlocation_savelocation",{objId:objId,objName:formdata.objName.value,objAltitude:formdata.objAltitude.value,objChKoordX:formdata.objChKoordX.value,objChKoordY:formdata.objChKoordY.value,objParticipantNo:formdata.objParticipantNo.value,objExpanse:formdata.objExpanse.value,objCarAccessRemark:formdata.objCarAccessRemark.value,objDrinkingWaterRemark:formdata.objDrinkingWaterRemark.value,objFireWoodRemark:formdata.objFireWoodRemark.value,objEmergencyAccRemark:formdata.objEmergencyAccRemark.value,objCostRemark:formdata.objCostRemark.value,adrId:formdata.adrId.value,adrFirstName:formdata.adrFirstName.value,adrName:formdata.adrName.value,adrLine0:formdata.adrLine0.value,adrLine1:formdata.adrLine1.value,adrLine2:formdata.adrLine2.value,adrLine3:formdata.adrLine3.value,adrPhone:formdata.adrPhone.value,adrFax:formdata.adrFax.value,adrMobile:formdata.adrMobile.value,adrEmail:formdata.adrEmail.value,adrWebsite:formdata.adrWebsite.value,objDescription:formdata.objDescription.value,objSpecialitiesRemark:formdata.objSpecialitiesRemark.value,objGeneralRemark:formdata.objGeneralRemark.value,objInternalRemark:formdata.objInternalRemark.value,objState:formdata.objState.value,env1:formdata.env1.value,env2:formdata.env2.value,env3:formdata.env3.value,env4:formdata.env4.value,env5:formdata.env5.value,env6:formdata.env6.value6,adrFkCountryId2:formdata.adrFkCountryId2.value,adrCityName:formdata.adrCityName.value,adrZip:formdata.adrZip.value},
function(data){reloaddetails(objId)})}
function removecomment(remarkId,id){Check=confirm("Wollen Sie diesen Kommentar wirklich loeschen?");if(Check==true)
jq.get("scoutlocation_removecomment",{remarkId:remarkId,objId:id},
function(data){reloaddetails(id)})}


/* - contact_overlay.js - */
// http://www5.scout.ch/portal_javascripts/contact_overlay.js?original=1
jq(function(){jq('#overlay').overlay({onBeforeLoad: function(){this.getBackgroundImage().expose({color:'#000000',opacity:'0.6'})},onClose: function(){jq.expose.close()}})});
function openOverlay(){var api=jq("#overlay").overlay();api.load(33)}
jq(document).ready(function(){jq("#geschaeftsstelle").mouseover(function(){jq("#overlay").overlay().load()})});

/* - crossfade.js - */
// http://www5.scout.ch/portal_javascripts/crossfade.js?original=1
window.addEventListener?window.addEventListener("load",so_init,false):window.attachEvent("onload",so_init);var d=document,imgs=new Array(),zInterval=null,current=0,pause=false,crossfaceIsRunning=false;
function so_init(){if(crossfaceIsRunning) return;if(!d.getElementById||!d.createElement)return;crossfaceIsRunning=true;css=d.createElement("link");css.setAttribute("href","xfade2.css");css.setAttribute("rel","stylesheet");css.setAttribute("type","text/css");d.getElementsByTagName("head")[0].appendChild(css);imgs=d.getElementById("imageContainer").getElementsByTagName("img");for(i=1;i<imgs.length;i++) imgs[i].xOpacity=0;imgs[0].style.display="block";imgs[0].xOpacity=.99;setTimeout(so_xfade,4000)}
function so_xfade(){cOpacity=imgs[current].xOpacity;nIndex=imgs[current+1]?current+1:0;nOpacity=imgs[nIndex].xOpacity;cOpacity-=.05;nOpacity+=.05;imgs[nIndex].style.display="block";imgs[current].xOpacity=cOpacity;imgs[nIndex].xOpacity=nOpacity;setOpacity(imgs[current]);setOpacity(imgs[nIndex]);if(cOpacity<=0){imgs[current].style.display="none";current=nIndex;setTimeout(so_xfade,4000)} else{setTimeout(so_xfade,50)}
function setOpacity(obj){if(obj.xOpacity>.99){obj.xOpacity=.99;return}
obj.style.opacity=obj.xOpacity;obj.style.MozOpacity=obj.xOpacity;obj.style.filter="alpha(opacity="+(obj.xOpacity*100)+")"}}


/* - jquery.scrollTo-min.js - */
// http://www5.scout.ch/portal_javascripts/jquery.scrollTo-min.js?original=1
;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);

