/*!
 * Ext JS Library 3.0+
 * Copyright(c) 2006-2009 Ext JS, LLC
 * licensing@extjs.com
 * http://www.extjs.com/license
 */
function buildTabs(tabId){		
    Ext.get(tabId).select('div.contentwrap').each(function(e){
    		title = '';
    		e.select('h1.tabName').each(function(el){
					tabtitle = el.dom.innerHTML;
					el.remove();
				});
				e.set({title: tabtitle}).addClass('x-tab');
    });
    var tabs = new Ext.TabPanel({
        applyTo:tabId,
        autoTabs: true,
        deferredRender: false,
        activeTab: 0,
        autoWidth: true,
        minTabWidth: 120,
        autoHeight: true,
        autoScroll: true,
        enableTabScroll:true,
        resizeTabs:true,
        listeners: {
            'tabchange': function(tabPanel, tab){
                if (typeof wiredminds != "undefined"){
                  wiredminds.count('Tab_'+tab.title);
                }
                
            }
        }
    });
}