function ddtabcontent(_1){
this.tabinterfaceid=_1;
this.tabs=document.getElementById(_1).getElementsByTagName("a");
this.enabletabpersistence=true;
this.hottabspositions=[];
this.currentTabIndex=0;
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);
}
},cycleit:function(_8,_9){
if(_8=="next"){
var _a=(this.currentTabIndex<this.hottabspositions.length-1)?this.currentTabIndex+1:0;
}else{
if(_8=="prev"){
var _a=(this.currentTabIndex>0)?this.currentTabIndex-1:this.hottabspositions.length-1;
}
}
if(typeof _9=="undefined"){
this.cancelautorun();
}
this.expandtab(this.tabs[this.hottabspositions[_a]]);
},setpersist:function(_b){
this.enabletabpersistence=_b;
},setselectedClassTarget:function(_c){
this.selectedClassTarget=_c||"link";
},getselectedClassTarget:function(_d){
return (this.selectedClassTarget==("linkparent".toLowerCase()))?_d.parentNode:_d;
},urlparamselect:function(_e){
var _f=window.location.search.match(new RegExp(_e+"=(\\d+)","i"));
return (_f==null)?null:parseInt(RegExp.$1);
},expandtab:function(_10){
var _11=_10.getAttribute("rel");
var _12=(_10.getAttribute("rev"))?","+_10.getAttribute("rev").replace(/\s+/,"")+",":"";
this.expandsubcontent(_11);
this.expandrevcontent(_12);
for(var i=0;i<this.tabs.length;i++){
this.getselectedClassTarget(this.tabs[i]).className=(this.tabs[i].getAttribute("rel")==_11)?"selected":"";
}
if(this.enabletabpersistence){
ddtabcontent.setCookie(this.tabinterfaceid,_10.tabposition);
}
this.setcurrenttabindex(_10.tabposition);
},expandsubcontent:function(_14){
for(var i=0;i<this.subcontentids.length;i++){
var _16=document.getElementById(this.subcontentids[i]);
_16.style.display=(_16.id==_14)?"block":"none";
}
},expandrevcontent:function(_17){
var _18=this.revcontentids;
for(var i=0;i<_18.length;i++){
document.getElementById(_18[i]).style.display=(_17.indexOf(","+_18[i]+",")!=-1)?"block":"none";
}
},setcurrenttabindex:function(_1a){
for(var i=0;i<this.hottabspositions.length;i++){
if(_1a==this.hottabspositions[i]){
this.currentTabIndex=i;
break;
}
}
},autorun:function(){
this.cycleit("next",true);
},cancelautorun:function(){
if(typeof this.autoruntimer!="undefined"){
clearInterval(this.autoruntimer);
}
},init:function(_1c){
var _1d=ddtabcontent.getCookie(this.tabinterfaceid);
var _1e=-1;
var _1f=this.urlparamselect(this.tabinterfaceid);
this.automodeperiod=_1c||0;
for(var i=0;i<this.tabs.length;i++){
this.tabs[i].tabposition=i;
if(this.tabs[i].getAttribute("rel")){
var _21=this;
this.hottabspositions[this.hottabspositions.length]=i;
this.subcontentids[this.subcontentids.length]=this.tabs[i].getAttribute("rel");
this.tabs[i].onclick=function(){
_21.expandtab(this);
_21.cancelautorun();
return false;
};
if(this.tabs[i].getAttribute("rev")){
this.revcontentids=this.revcontentids.concat(this.tabs[i].getAttribute("rev").split(/\s*,\s*/));
}
if(_1f==i||this.enabletabpersistence&&_1e==-1&&parseInt(_1d)==i||!this.enabletabpersistence&&_1e==-1&&this.getselectedClassTarget(this.tabs[i]).className=="selected"){
_1e=i;
}
}
}
if(_1e!=-1){
this.expandtab(this.tabs[_1e]);
}else{
this.expandtab(this.tabs[this.hottabspositions[0]]);
}
if(parseInt(this.automodeperiod)>500&&this.hottabspositions.length>1){
this.autoruntimer=setInterval(function(){
_21.autorun();
},this.automodeperiod);
}
}};


