function Tabs(_1,_2,_3,_4,_5,_6,_7){
this.autoOnClick=_5;
this.tabIds=_1;
this.tabBoxIds=_2;
this.wrapperId=_3;
this.onBeforeSwitchFn=!!_7?_7:function(){
return true;
};
this.onSwitchFn=!!_6?_6:function(){
};
switch(typeof (_4)){
case "string":
this.activeIndex=this.getTabBoxIndexById(_4);
if(this.activeIndex<0){
this.activeIndex=0;
}
break;
case "number":
this.activeIndex=_4>=0?_4:0;
break;
default:
this.activeIndex=0;
break;
}
if(this.isSupported){
this.activeIndex=(this.activeIndex>0?this.activeIndex:0);
if(this.autoOnClick){
var i=0;
var _9=this.tabIds.length;
while(i<_9){
document.getElementById(this.tabIds[i]).getElementsByTagName("a")[0].onclick=this.createOnClick(this,i);
i++;
}
}
this.detectTabByURL();
}
}
Tabs.prototype={_tab_found_in_url:false,isSupported:document.getElementById&&document.getElementsByTagName?true:false,createOnClick:function(_a,_b){
function doSwitchTab(){
_a.switchTab(_b);
return false;
}
return doSwitchTab;
},detectTabByURL:function(){
if(!Tabs._tab_found_in_url&&this.enabled){
var _c=""+window.location;
var _d=0;
var _e="";
var _f=0;
_d=_c.indexOf("#");
if(_d>0){
_e=_c.substring(_d+1,_c.length);
if(this.getTabBoxIndexById(_e)>-1){
this.switchTab(this.getTabBoxIndexById(_e));
Tabs._tab_found_in_url=true;
}
}
}
},fixIE:function(){
if(!document.all||!window.ActiveXObject){
return;
}
var _10=document.getElementById(this.getActiveTabBoxId());
_10.innerHTML=_10.innerHTML;
_10=null;
},focusTabBox:function(i){
var _12=document.getElementById(this.tabBoxIds[i]+"_anchor");
if(_12&&_12.focus&&(!_12.onfocus||(typeof (_12.onfocus)=="function"&&_12.onfocus()))){
_12.focus();
}
},getActiveTabBoxId:function(){
return this.tabBoxIds[this.activeIndex];
},getTabBoxIndexById:function(_13){
for(var i=0,end=this.tabBoxIds.length;i<end;i++){
if(this.tabBoxIds[i]==_13){
return i;
}
}
return -1;
},setActiveTab:function(_16){
if(typeof (this.activeIndex)!=="number"&&typeof (_16)==="number"){
this.activeIndex=_16;
}
if(typeof (this.activeIndex)==="number"){
for(var i=0,end=this.tabBoxIds.length;i<end;i++){
if(i!=this.activeIndex){
this.switchTabOff(i);
}else{
this.switchTabOn(i);
}
}
}
},switchTab:function(_19){
var _1a;
var _1b;
var _1c;
var _1d;
if(this.isSupported&&_19!==this.activeIndex&&this.onBeforeSwitchFn(this.activeIndex,_19)){
this.switchTabOff(this.activeIndex);
this.switchTabOn(_19);
this.focusTabBox(_19);
this.activeIndex=_19;
this.onSwitchFn(this.activeIndex,this.tabIds[this.activeIndex],this.tabBoxIds[this.activeIndex]);
}
},switchTabOff:function(i){
var tab=document.getElementById(this.tabIds[i]);
var _20=document.getElementById(this.tabBoxIds[i]);
tab.className=tab.className.replace("tabOn","tabOff");
_20.className=_20.className.replace("tabBoxOn","tabBoxOff");
tab=null;
_20=null;
},switchTabOn:function(i){
var tab=document.getElementById(this.tabIds[i]);
var _23=document.getElementById(this.tabBoxIds[i]);
tab.className=tab.className.replace("tabOff","tabOn");
_23.className=_23.className.replace("tabBoxOff","tabBoxOn");
tab=null;
_23=null;
}};

