
if(!window.DHTMLSuite)var DHTMLSuite=new Object();DHTMLSuite.accordionContent=function(){var layoutCss;var dhtmlgoodies_slideSpeed;var dhtmlgoodies_timer;var objectIdToSlideDown;var dhtmlgoodies_activeId;var dhtmlgoodies_slideInProgress;var objectIndex;this.layoutCss="accordion-content.css";this.dhtmlgoodies_slideSpeed=10;this.dhtmlgoodies_timer=10;this.objectIdToSlideDown=false;this.dhtmlgoodies_activeId=false;this.dhtmlgoodies_slideInProgress=false;try{if(!standardObjectsCreated)DHTMLSuite.createStandardObjects();this.objectIndex=DHTMLSuite.variableStorage.arrayDSObjects.length;;DHTMLSuite.variableStorage.arrayDSObjects[this.objectIndex]=this;DHTMLSuite.commonObj.loadCSS(this.layoutCss);}catch(e){alert('You need to include the dhtmlSuite-common.js file');}}
DHTMLSuite.accordionContent.prototype={init:function(groupDivId)
{var divs=document.getElementsByTagName('DIV');var divCounter=1;for(var no=0;no<divs.length;no++){if(divs[no].className=='accordionHeader'){divs[no].onclick=this.__showHideContent;divs[no].id='dhtmlgoodies_q'+divCounter;divs[no].setAttribute('objectIndex',this.objectIndex);var answer=divs[no].nextSibling;while(answer&&answer.tagName!='DIV'){answer=answer.nextSibling;}
answer.id='dhtmlgoodies_a'+divCounter;contentDiv=answer.getElementsByTagName('DIV')[0];contentDiv.style.top=0-contentDiv.offsetHeight+'px';contentDiv.className='dhtmlgoodies_answer_content';contentDiv.id='dhtmlgoodies_ac'+divCounter;answer.style.display='none';answer.style.height='1px';divCounter++;}}},setLayoutCss:function(newCssFileName)
{this.layoutCss=newCssFileName;},setSlideSpeed:function(newSpeed)
{this.dhtmlgoodies_slideSpeed=newSpeed;},__slideContent:function(inputId,direction)
{var obj=document.getElementById('dhtmlgoodies_a'+inputId);var contentObj=document.getElementById('dhtmlgoodies_ac'+inputId);height=obj.clientHeight;if(height==0)height=obj.offsetHeight;height=height+direction;rerunFunction=true;if(height>contentObj.offsetHeight){height=contentObj.offsetHeight;rerunFunction=false;}
if(height<=1){height=1;rerunFunction=false;}
obj.style.height=height+'px';var topPos=height-contentObj.offsetHeight;if(topPos>0)topPos=0;contentObj.style.top=topPos+'px';if(rerunFunction){setTimeout('DHTMLSuite.variableStorage.arrayDSObjects['+this.objectIndex+'].__slideContent('+inputId+','+direction+')',this.dhtmlgoodies_timer);}else{if(height<=1){obj.style.display='none';if(objectIdToSlideDown&&objectIdToSlideDown!=inputId){document.getElementById('dhtmlgoodies_a'+objectIdToSlideDown).style.display='block';document.getElementById('dhtmlgoodies_a'+objectIdToSlideDown).style.visibility='visible';this.__slideContent(objectIdToSlideDown,this.dhtmlgoodies_slideSpeed);}else{this.dhtmlgoodies_slideInProgress=false;}}else{this.dhtmlgoodies_activeId=inputId;this.dhtmlgoodies_slideInProgress=false;}}},__showHideContent:function(e,inputId)
{var refObject=DHTMLSuite.variableStorage.arrayDSObjects[this.getAttribute("objectIndex")];if(refObject.dhtmlgoodies_slideInProgress)return;refObject.dhtmlgoodies_slideInProgress=true;if(!inputId)inputId=this.id;inputId=inputId+'';document.getElementById(inputId).className='accordionHeaderSelected';if(refObject.dhtmlgoodies_activeId)
document.getElementById('dhtmlgoodies_q'+refObject.dhtmlgoodies_activeId).className='accordionHeader';var numericId=inputId.replace(/[^0-9]/g,'');var answerDiv=document.getElementById('dhtmlgoodies_a'+numericId);objectIdToSlideDown=false;if(!answerDiv.style.display||answerDiv.style.display=='none'){if(refObject.dhtmlgoodies_activeId&&refObject.dhtmlgoodies_activeId!=numericId){objectIdToSlideDown=numericId;refObject.__slideContent(refObject.dhtmlgoodies_activeId,(refObject.dhtmlgoodies_slideSpeed*-1));}else{answerDiv.style.display='block';answerDiv.style.visibility='visible';refObject.__slideContent(numericId,refObject.dhtmlgoodies_slideSpeed);}}else{refObject.__slideContent(numericId,(refObject.dhtmlgoodies_slideSpeed*-1));refObject.dhtmlgoodies_activeId=false;}}}