code: function(tab, index) {
              var tabs = this.get('tabs'),
                  before = this.getTab(index),
                  tabParent = this._tabParent,
                  contentParent = this._contentParent,
                  tabElement = tab.get(ELEMENT),
                  contentEl = tab.get(CONTENT_EL);
  
              if (!tabs) { // not ready yet
                  this._queue[this._queue.length] = ['addTab', arguments];
                  return false;
              }
              
              index = (index === undefined) ? tabs.length : index;
              
              tabs.splice(index, 0, tab);
  
              if ( before ) {
                  tabParent.insertBefore(tabElement, before.get(ELEMENT));
              } else {
                  tabParent.appendChild(tabElement);
              }
  
              if ( contentEl && !Dom.isAncestor(contentParent, contentEl) ) {
                  contentParent.appendChild(contentEl);
              }
              
              if ( !tab.get(ACTIVE) ) {
                  tab.set('contentVisible', false, true); /* hide if not active */
              } else {
                  this.set(ACTIVE_TAB, tab, true);
                  this.set('activeIndex', index, true);
              }
  
              this._initTabEvents(tab);
          }
docs: Adds a Tab to the TabView instance.
  If no index is specified, the tab is added to the end of the tab list.
  @method addTab
  @param {YAHOO.widget.Tab} tab A Tab instance to add.
  @param {Integer} index The position to add the tab.
  @return void