if (!Bs_Objects) { var Bs_Objects = []; }; function Bs_TabSet(outerElmId) { var a = arguments; this._outerElmId = (a.length>1) ? a[1] : a[0]; this._id; this._objectId; this.tabs = new Array; this._activeTabIdx = 0; this._onTabSelectEvent; this._constructor = function(button) { this._id = Bs_Objects.length; Bs_Objects[this._id] = this; this._objectId = "Bs_TabSet_"+this._id; this._button = button; } this.addTab = function(caption, container) { if (typeof(caption) == 'object') { var o = caption; } else { var o = new Object; o.caption = caption; o.container = container; } o.tabIdx = this.tabs.length;this.tabs[o.tabIdx] = o; } this.render = function() { var ret = new Array; ret[ret.length] = '
'; ret[ret.length] = '
'; for (var i=0; i' + this.tabs[i].caption + '
'; } ret[ret.length] = '
'; ret[ret.length] = '
' ret[ret.length] = ''; return ret.join(''); } this.draw = function() { var elem = document.getElementById(this._outerElmId + '_tabs'); if (elem) elem.innerHTML = this.render(); } this.switchTo = function(theReg) { newRegIdx = -1; if (theReg=='') theReg = '0'; if (isNaN(parseInt(theReg))) { for (var i=0; i