var HordeSidebar={getCookie:function(c,f){var b=document.cookie,e=c+"=",d=b.indexOf("; "+e),a;if(d==-1){d=b.indexOf(e);if(d!=0){return f}}else{d+=2}a=b.indexOf(";",d);if(a==-1){a=b.length}return unescape(b.substring(d+e.length,a))},toggleMenuFrame:function(){if(!parent||!parent.document.getElementById("hf")){return}var c,a=new Date(),b=horde_sidebar_rtl;if($("expandedSidebar").visible()){c=b?"*,20":"20,*"}else{c=(b?"*,":"")+horde_sidebar_cols+(b?"":",*")}parent.document.getElementById("hf").setAttribute("cols",c);$("expandedSidebar","hiddenSidebar").invoke("toggle");if($("themelogo")){$("themelogo").toggle()}a.setTime(a.getTime()+31536000000);document.cookie="horde_sidebar_expanded="+$("expandedSidebar").visible()+";DOMAIN="+horde_sidebar_domain+";PATH="+horde_sidebar_path+";expires="+a.toGMTString()},updateSidebar:function(){new Ajax.PeriodicalUpdater("horde_menu",horde_sidebar_url,{parameters:{httpclient:1},method:"get",evalScripts:true,frequency:horde_sidebar_refresh})}};Event.observe(window,"load",function(){$("hiddenSidebar").hide();if(HordeSidebar.getCookie("horde_sidebar_expanded",true).toString()!=$("expandedSidebar").visible().toString()){HordeSidebar.toggleMenuFrame()}if(horde_sidebar_refresh){HordeSidebar.updateSidebar.delay(horde_sidebar_refresh)}});