function ddtabcontent(_1){this.tabinterfaceid=_1;this.tabs=document.getElementById(_1).getElementsByTagName("a");this.enabletabpersistence=true;this.hottabspositions=[];this.subcontentids=[];this.revcontentids=[];this.selectedClassTarget="link";}ddtabcontent.getCookie=function(_2){var re=new RegExp(_2+"=[^;]+","i");if(document.cookie.match(re)){return document.cookie.match(re)[0].split("=")[1];}return "";};ddtabcontent.setCookie=function(_4,_5){document.cookie=_4+"="+_5+";path=/";};ddtabcontent.prototype={expandit:function(_6){this.cancelautorun();var _7="";try{if(typeof _6=="string"&&document.getElementById(_6).getAttribute("rel")){_7=document.getElementById(_6);}else{if(parseInt(_6)!=NaN&&this.tabs[_6].getAttribute("rel")){_7=this.tabs[_6];}}}catch(err){alert("Invalid Tab ID or position entered!");}if(_7!=""){this.expandtab(_7);}},setpersist:function(_8){this.enabletabpersistence=_8;},setselectedClassTarget:function(_9){this.selectedClassTarget=_9||"link";},getselectedClassTarget:function(_a){return (this.selectedClassTarget==("linkparent".toLowerCase()))?_a.parentNode:_a;},expandtab:function(_b){var _c=_b.getAttribute("rel");var _d=(_b.getAttribute("rev"))?","+_b.getAttribute("rev").replace(/\s+/,"")+",":"";this.expandsubcontent(_c);this.expandrevcontent(_d);for(var i=0;i<this.tabs.length;i++){this.getselectedClassTarget(this.tabs[i]).className=(this.tabs[i].getAttribute("rel")==_c)?"selected":"";}if(this.enabletabpersistence){ddtabcontent.setCookie(this.tabinterfaceid,_b.tabposition);}},expandsubcontent:function(_f){for(var i=0;i<this.subcontentids.length;i++){var _11=document.getElementById(this.subcontentids[i]);_11.style.display=(_11.id==_f)?"block":"none";}},expandrevcontent:function(_12){var _13=this.revcontentids;for(var i=0;i<_13.length;i++){document.getElementById(_13[i]).style.display=(_12.indexOf(","+_13[i]+",")!=-1)?"block":"none";}},autorun:function(){var _15=this.automode_currentTabIndex;var _16=this.hottabspositions;this.expandtab(this.tabs[_16[_15]]);this.automode_currentTabIndex=(_15<_16.length-1)?_15+1:0;},cancelautorun:function(){if(typeof this.autoruntimer!="undefined"){clearInterval(this.autoruntimer);}},init:function(_17){var _18=ddtabcontent.getCookie(this.tabinterfaceid);var _19=true;this.automodeperiod=_17||0;for(var i=0;i<this.tabs.length;i++){this.tabs[i].tabposition=i;if(this.tabs[i].getAttribute("rel")){var _1b=this;this.hottabspositions[this.hottabspositions.length]=i;this.subcontentids[this.subcontentids.length]=this.tabs[i].getAttribute("rel");this.tabs[i].onclick=function(){_1b.expandtab(this);_1b.cancelautorun();return false;};if(this.tabs[i].getAttribute("rev")){this.revcontentids=this.revcontentids.concat(this.tabs[i].getAttribute("rev").split(/\s*,\s*/));}if(this.enabletabpersistence&&parseInt(_18)==i||!this.enabletabpersistence&&this.getselectedClassTarget(this.tabs[i]).className=="selected"){this.expandtab(this.tabs[i]);_19=false;this.automode_currentTabIndex=(i>0)?0:1;}}}if(_19){this.expandtab(this.tabs[this.hottabspositions[0]]);}if(parseInt(this.automodeperiod)>500&&this.hottabspositions.length>1){this.automode_currentTabIndex=this.automode_currentTabIndex||0;this.autoruntimer=setInterval(function(){_1b.autorun();},this.automodeperiod);}}};function ddtabcontent(_1){this.tabinterfaceid=_1;this.tabs=document.getElementById(_1).getElementsByTagName("a");this.enabletabpersistence=true;this.hottabspositions=[];this.subcontentids=[];this.revcontentids=[];this.selectedClassTarget="link";}ddtabcontent.getCookie=function(_2){var re=new RegExp(_2+"=[^;]+","i");if(document.cookie.match(re)){return document.cookie.match(re)[0].split("=")[1];}return "";};ddtabcontent.setCookie=function(_4,_5){document.cookie=_4+"="+_5+";path=/";};ddtabcontent.prototype={expandit:function(_6){this.cancelautorun();var _7="";try{if(typeof _6=="string"&&document.getElementById(_6).getAttribute("rel")){_7=document.getElementById(_6);}else{if(parseInt(_6)!=NaN&&this.tabs[_6].getAttribute("rel")){_7=this.tabs[_6];}}}catch(err){alert("Invalid Tab ID or position entered!");}if(_7!=""){this.expandtab(_7);}},setpersist:function(_8){this.enabletabpersistence=_8;},setselectedClassTarget:function(_9){this.selectedClassTarget=_9||"link";},getselectedClassTarget:function(_a){return (this.selectedClassTarget==("linkparent".toLowerCase()))?_a.parentNode:_a;},expandtab:function(_b){var _c=_b.getAttribute("rel");var _d=(_b.getAttribute("rev"))?","+_b.getAttribute("rev").replace(/\s+/,"")+",":"";this.expandsubcontent(_c);this.expandrevcontent(_d);for(var i=0;i<this.tabs.length;i++){this.getselectedClassTarget(this.tabs[i]).className=(this.tabs[i].getAttribute("rel")==_c)?"selected":"";}if(this.enabletabpersistence){ddtabcontent.setCookie(this.tabinterfaceid,_b.tabposition);}},expandsubcontent:function(_f){for(var i=0;i<this.subcontentids.length;i++){var _11=document.getElementById(this.subcontentids[i]);_11.style.display=(_11.id==_f)?"block":"none";}},expandrevcontent:function(_12){var _13=this.revcontentids;for(var i=0;i<_13.length;i++){document.getElementById(_13[i]).style.display=(_12.indexOf(","+_13[i]+",")!=-1)?"block":"none";}},autorun:function(){var _15=this.automode_currentTabIndex;var _16=this.hottabspositions;this.expandtab(this.tabs[_16[_15]]);this.automode_currentTabIndex=(_15<_16.length-1)?_15+1:0;},cancelautorun:function(){if(typeof this.autoruntimer!="undefined"){clearInterval(this.autoruntimer);}},init:function(_17){var _18=ddtabcontent.getCookie(this.tabinterfaceid);var _19=true;this.automodeperiod=_17||0;for(var i=0;i<this.tabs.length;i++){this.tabs[i].tabposition=i;if(this.tabs[i].getAttribute("rel")){var _1b=this;this.hottabspositions[this.hottabspositions.length]=i;this.subcontentids[this.subcontentids.length]=this.tabs[i].getAttribute("rel");this.tabs[i].onclick=function(){_1b.expandtab(this);_1b.cancelautorun();return false;};if(this.tabs[i].getAttribute("rev")){this.revcontentids=this.revcontentids.concat(this.tabs[i].getAttribute("rev").split(/\s*,\s*/));}if(this.enabletabpersistence&&parseInt(_18)==i||!this.enabletabpersistence&&this.getselectedClassTarget(this.tabs[i]).className=="selected"){this.expandtab(this.tabs[i]);_19=false;this.automode_currentTabIndex=(i>0)?0:1;}}}if(_19){this.expandtab(this.tabs[this.hottabspositions[0]]);}if(parseInt(this.automodeperiod)>500&&this.hottabspositions.length>1){this.automode_currentTabIndex=this.automode_currentTabIndex||0;this.autoruntimer=setInterval(function(){_1b.autorun();},this.automodeperiod);}}};
