var DashboardPane=Class.create({initialize:function(B,A){if(!$(B)){throw ("Attempted to initalize DashboardPane with id: "+B+" which was not found.")}typeof B=="string"?this.pane=$(B):this.pane=B;this.contentWrapper="DIV";this.contentClass="sectionlist";this.paneContent=this._getPaneContent();this.togglerClass="toggler";this.toggler=this._getToggler();if(A){if(A=="open"||A=="closed"){this.state=A}else{this.state="closed"}}else{this.state="closed"}this.animated=true;this.animationSpeed="0.2";this.closedIcon="/static/img/ico_section_closed.gif";this.openIcon="/static/img/ico_section_open.gif";if(this.animated==true&&typeof Effect=="undefined"){throw ("dashboard-pane.js requires including script.aculo.us' effects.js library!")}if(this.state=="closed"){this.paneContent.hide()}else{this.paneContent.show()}this.toggleIcon();this.initToggler();log("----- DashboardPane constructor finished for: #"+B+" -----")},_getPaneContent:function(){var A=new Element(this.contentWrapper,{"class":"sectionWrapper"});var C="#"+this.pane.id+" ."+this.contentClass;var B=$$(C);B.each(function(D){D.wrap(A)});return this.pane.down(this.contentWrapper)},_getToggler:function(){var A="#"+this.pane.id+" ."+this.togglerClass;if($$(A)[0]){if($$(A)[0].tagName.toLowerCase()=="a"){return $$(A)[0]}}else{return $$("#"+this.pane.id)[0].down("A")}},initToggler:function(){this.toggler.setStyle({cursor:"pointer"});Event.observe(this.toggler,"click",this._onTogglerClick.bindAsEventListener(this))},_onTogglerClick:function(A){A.stop();this.toggle()},open:function(){this.animated?Effect.SlideDown(this.paneContent,{duration:this.animationSpeed}):this.paneContent.show();this.state="open";this.toggleIcon()},close:function(){this.animated?Effect.SlideUp(this.paneContent,{duration:this.animationSpeed}):this.paneContent.hide();this.state="closed";this.toggleIcon()},toggle:function(){if(this.animated){this.state=="open"?Effect.SlideUp(this.paneContent,{duration:this.animationSpeed}):Effect.SlideDown(this.paneContent,{duration:this.animationSpeed})}else{this.paneContent.toggle()}this.state=="open"?this.state="closed":this.state="open";this.toggleIcon()},toggleIcon:function(){if(this.state=="open"){this.toggler.setStyle({background:'url("'+this.openIcon+'") no-repeat center right'})}else{this.toggler.setStyle({background:'url("'+this.closedIcon+'") no-repeat center right'})}}});