	
	function loadprofiletabs(){
    
    var tabPanelHeight = 500;
    var tabs = new Ext.TabPanel({
        renderTo:'tabContainer',
        activeTab: 0,
        enableTabScroll:true,
        deferredRender: false,
        width:'100%',
		height:tabPanelHeight,
        plain: true
    });

    function addMainTab(title, tabID){
        tabs.add({
            title: title.innerHTML,
            //iconCls: 'Profiletabs',
            //autoLoad: 'ajax.cfm?a=cal'
            items: new Ext.TabPanel(
                {
                  id: 'tab_' + tabID,
                  activeTab: 0,
				  border:false,
			      autoScroll:true,
                  /*layout:'accordion',
                  layoutConfig: {
                      // layout-specific configs go here
                       hideCollapseTool: true,
                      animate: true,
                      activeOnTop: false
                  },*/
                  deferredRender: false
                }
              )
        });
    }
    function addTab(tabID, title, item){
        Ext.getCmp('tab_' + tabID).add({
            title: title,
			bodyStyle:'padding:5px',
			height:468,
            //iconCls: 'Profiletabs',
            //autoLoad: 'ajax.cfm?a=cal'
			border:false,
			autoScroll:true,
            html: item
        });

    }
    function buildTabs(tabToLoad){
      var currentTab = $(tabToLoad);
      var tmpElement = currentTab.childElements();
      var tabTitle = tmpElement[0]; //h2 
      addMainTab(tabTitle, tabToLoad);
      
      tmpElement[1].childElements().each(function(s){
        var tmpChildElement = s.childElements();
        var tabTitleChild = tmpChildElement[0].innerHTML; //h3 
        var tabPanelsChild = tmpChildElement[1].innerHTML; // div
        //alert(tmpChildElement[0].innerHTML);
        addTab(tabToLoad, tabTitleChild, tabPanelsChild);
      });
      
      currentTab.addClassName('hidden');
    }
    
    
    $$('.Profiletabs').each(function(s){buildTabs(s.id);});

    tabs.setActiveTab(1);
    tabs.doLayout();
	tabs.hideTabStripItem(0);
    
}
