function cAutoTabs(){this.CLASS_NAME_AFTER='auto-tabs';this.CLASS_NAME_BEFORE='no-auto-tabs';this.CLASS_NAME_SEL='selected';this.oDdContent=null;this.oDtSelected=null;this._findAssocDd=function(oDt){var oElem=oDt;while(oElem=oElem.nextSibling){if(oElem.tagName&&oElem.tagName.match(/DD/i)){return oElem;}}
return null;}
this._findFirstDt=function(oDl){for(var i=0;i<oDl.childNodes.length;++i){var oElem=oDl.childNodes[i];if(oElem.tagName&&oElem.tagName.match(/DT/i)){return oElem;}}
return null;},this.initialize=function(oDl,obj){if(jQuery('#col1').css('float')!='left'){return true;}
$(oDl).addClass(this.CLASS_NAME_AFTER);$(oDl).removeClass(this.CLASS_NAME_BEFORE);this.oDdContent=document.createElement('dd');$(this.oDdContent).addClass('auto-tabs-content');$(oDl).append(this.oDdContent);var _a=$(oDl).children();$.each(_a,function(iIdx,oElem){obj._setupChild(oElem,obj)});if(!this.oDtSelected){this.select(this._findFirstDt(oDl));}
return true;},this._onDtSelected=function(oDt){if(oDt){this.select(oDt);}},this.select=function(oDt){if(jQuery('#col1').css('float')!='left'){return true;}
if(oDt){var _dt=$(oDt);var _dd=oDt.oDd;this.unselect(this.oDtSelected);_dt.addClass(this.CLASS_NAME_SEL);this.oDdContent.innerHTML=_dd?_dd.innerHTML:'';this.oDtSelected=oDt;}},this._setupChild=function(oElem,obj){if(oElem!=this.oDdContent&&oElem.tagName){if(oElem.tagName.match(/DT/i)){oElem.oDd=this._findAssocDd(oElem);var sText=oElem.firstChild.nodeValue;var oWrapperA=document.createElement('a');jQuery(oWrapperA).attr("href","#");var oWrapperSpan=document.createElement('span');oWrapperSpan.appendChild(document.createTextNode(sText));oWrapperA.appendChild(oWrapperSpan);oElem.replaceChild(oWrapperA,oElem.firstChild);$(oElem).bind("click",function(){obj._onDtSelected(this);return false;});if($(oElem).attr("className")==this.CLASS_NAME_SEL){this.select(oElem);}}else if(oElem.tagName.match(/DD/i)){$(oElem).hide();}}},this.unselect=function(oDt){if(oDt){$(oDt).removeClass(this.CLASS_NAME_SEL);}}};jQuery(document).ready(function(){var _a=$('dl.no-auto-tabs');$.each(_a,function(iIdx,oElem){var oTabs=new cAutoTabs();oTabs.initialize(oElem,oTabs);});});
