var ytabs=new YahooTabs();function YahooTabs(){this.tabView=new YAHOO.widget.TabView("demo")}YahooTabs.prototype.TabIndex=function(B){var F=this.tabView.get("tabs");if(F==undefined){return -1}var D=new String(B);for(var C=0;C<F.length;C++){var G=this.tabView.getTab(C);var E=G.get("label");var A=this.ExtractUniqueId(E);if(A==D){return C}}return -1};YahooTabs.prototype.MakeActiveByIndex=function(A){this.tabView.set("activeIndex",A)};YahooTabs.prototype.ExtractUniqueId=function(A){if(A.indexOf("-->")<0){return""}return A.substr(4,A.indexOf("-->")-4)};YahooTabs.prototype.addTab4Marker=function(G){if(G==""){return false}var B=G.MarkerId();var D=this.TabIndex(B);if(D!=-1){this.MakeActiveByIndex(D);return false}var C=G.ToTabName();var A="<!--"+B+"-->"+C;var F=G.ToDetails(false,false);var E=new YAHOO.widget.Tab({label:A,content:F,active:true});this.tabView.addTab(E);return true};YahooTabs.prototype.removeCurrentTab=function(){var A=this.tabView.get("activeTab");this.tabView.removeTab(A)};