rem: if (lastIndex >= this.sourceTabList.length) lastIndex = this.sourceTabList.length - 1; if (lastIndex >= 0) this.showTab(lastIndex);  
add: if (lastIndex >= this.sourceTabList.length) lastIndex = this.sourceTabList.length - 1; if (lastIndex >= 0) this.showTab(lastIndex); } else if (this.lastSelectedTab > this.sourceTabList.length) { this.lastSelectedTab = this.sourceTabList.length; }  
context: function s2v_removeindex (index){    var lastIndex = this.tabs.selectedIndex;    var sourceTab = this.sourceTabList[index];    if (this.highlightTab == sourceTab)        this.unmarkHighlight();    sourceTab.tab = null;    sourceTab.iframe = null;    sourceTab.content = null;    sourceTab.stopNode = null;    arrayRemoveAt (this.sourceTabList, index);    if (this.tabs)        this.tabs.removeItemAt(index);    if (this.deck)        this.deck.removeChild(this.deck.childNodes[index]);    if (lastIndex >= this.sourceTabList.length)        lastIndex = this.sourceTabList.length - 1;    if (lastIndex >= 0)        this.showTab(lastIndex);    if (this.sourceTabList.length == 0)        this.clearOutputDeck();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/7a048cbfc1ac42af94a8a245106a9864d3db3975/venkman-views.js/buggy/extensions/venkman/resources/content/venkman-views.js