function tabberObj(b){var a;
this.div=null;
this.classMain="tabber";
this.classMainLive="tabberlive";
this.classTab="tabbertab";
this.classTabDefault="tabbertabdefault";
this.classNav="tabbernav";
this.classTabHide="tabbertabhide";
this.classNavActive="tabberactive";
this.titleElements=["h2","h3","h4","h5","h6"];
this.titleElementsStripHTML=true;
this.removeTitle=true;
this.addLinkId=false;
this.linkIdFormat="<tabberid>nav<tabnumberone>";
for(a in b){this[a]=b[a]
}this.REclassMain=new RegExp("\\b"+this.classMain+"\\b","gi");
this.REclassMainLive=new RegExp("\\b"+this.classMainLive+"\\b","gi");
this.REclassTab=new RegExp("\\b"+this.classTab+"\\b","gi");
this.REclassTabDefault=new RegExp("\\b"+this.classTabDefault+"\\b","gi");
this.REclassTabHide=new RegExp("\\b"+this.classTabHide+"\\b","gi");
this.tabs=new Array();
if(this.div){this.init(this.div);
this.div=null
}}tabberObj.prototype.init=function(f){var j,d,b,l,g=0,m,a,k,c,h;
if(!document.getElementsByTagName){return false
}if(f.id){this.id=f.id
}this.tabs.length=0;
j=f.childNodes;
for(d=0;
d<j.length;
d++){if(j[d].className&&j[d].className.match(this.REclassTab)){l=new Object();
l.div=j[d];
this.tabs[this.tabs.length]=l;
if(j[d].className.match(this.REclassTabDefault)){g=this.tabs.length-1
}}}m=document.createElement("ul");
m.className=this.classNav;
for(d=0;
d<this.tabs.length;
d++){l=this.tabs[d];
l.headingText=l.div.title;
if(this.removeTitle){l.div.title=""
}if(!l.headingText){for(b=0;
b<this.titleElements.length;
b++){h=l.div.getElementsByTagName(this.titleElements[b])[0];
if(h){l.headingText=h.innerHTML;
if(this.titleElementsStripHTML){l.headingText.replace(/<br>/gi," ");
l.headingText=l.headingText.replace(/<[^>]+>/g,"")
}break
}}}if(!l.headingText){l.headingText=d+1
}a=document.createElement("li");
l.li=a;
k=document.createElement("a");
k.appendChild(document.createTextNode(l.headingText));
k.href="javascript:void(null);";
k.title=l.headingText;
k.onclick=this.navClick;
k.tabber=this;
k.tabberIndex=d;
if(this.addLinkId&&this.linkIdFormat){c=this.linkIdFormat;
c=c.replace(/<tabberid>/gi,this.id);
c=c.replace(/<tabnumberzero>/gi,d);
c=c.replace(/<tabnumberone>/gi,d+1);
c=c.replace(/<tabtitle>/gi,l.headingText.replace(/[^a-zA-Z0-9\-]/gi,""));
k.id=c
}a.appendChild(k);
m.appendChild(a)
}f.insertBefore(m,f.firstChild);
f.className=f.className.replace(this.REclassMain,this.classMainLive);
this.tabShow(g);
if(typeof this.onLoad=="function"){this.onLoad({tabber:this})
}return this
};
tabberObj.prototype.navClick=function(g){var d,b,c,f,e;
b=this;
if(!b.tabber){return false
}c=b.tabber;
f=b.tabberIndex;
b.blur();
if(typeof c.onClick=="function"){e={tabber:c,index:f,event:g};
if(!g){e.event=window.event
}d=c.onClick(e);
if(d===false){return false
}}c.tabShow(f);
return false
};
tabberObj.prototype.tabHideAll=function(){var a;
for(a=0;
a<this.tabs.length;
a++){this.tabHide(a)
}};
tabberObj.prototype.tabHide=function(a){var b;
if(!this.tabs[a]){return false
}b=this.tabs[a].div;
if(!b.className.match(this.REclassTabHide)){b.className+=" "+this.classTabHide
}this.navClearActive(a);
return this
};
tabberObj.prototype.tabShow=function(a){var b;
if(!this.tabs[a]){return false
}this.tabHideAll();
b=this.tabs[a].div;
b.className=b.className.replace(this.REclassTabHide,"");
this.navSetActive(a);
if(typeof this.onTabDisplay=="function"){this.onTabDisplay({tabber:this,index:a})
}return this
};
tabberObj.prototype.navSetActive=function(a){this.tabs[a].li.className=this.classNavActive;
return this
};
tabberObj.prototype.navClearActive=function(a){this.tabs[a].li.className="";
return this
};
function tabberAutomatic(d){var a,c,b;
if(!d){d={}
}a=new tabberObj(d);
c=document.getElementsByTagName("div");
for(b=0;
b<c.length;
b++){if(c[b].className&&c[b].className.match(a.REclassMain)){d.div=c[b];
c[b].tabber=new tabberObj(d)
}}return this
}function tabberAutomaticOnLoad(b){var a;
if(!b){b={}
}a=window.onload;
if(typeof window.onload!="function"){window.onload=function(){tabberAutomatic(b)
}
}else{window.onload=function(){a();
tabberAutomatic(b)
}
}}if(typeof tabberOptions=="undefined"){tabberAutomaticOnLoad()
}else{if(!tabberOptions.manualStartup){tabberAutomaticOnLoad(tabberOptions)
}};