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)}});