/*
 * Ext JS Library 2.0.1
 * Copyright(c) 2006-2008, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://extjs.com/license
 */
 
 var numTab;
 var tabs;
function loadTab(tab){
	numTab = tab;
	}
Ext.onReady(function(){
    // basic tabs 1, built from existing content
    tabs = new Ext.TabPanel({
		id:'centerTabContainer',
        renderTo: 'tabs1',
        width:650,
        activeTab: numTab,
        frame:true,
        defaults:{autoHeight: true},
        items:[
            {contentEl:'script', title: 'Member Log in', id:'tab1'},
            {contentEl:'markup1', title: 'Booking Resort / Hotel', id: 'tab2'},
            {contentEl:'markup2', title: 'Booking Transfer', id: 'tab3'}
        ]
    });

    // second tabs built from JS
  /*  var tabs2 = new Ext.TabPanel({
        renderTo: document.body,
        activeTab: 0,
        width:600,
        height:250,
        plain:true,
        defaults:{autoScroll: true},
        items:[{
                title: 'Normal Tab',
                html: "My content was added during construction."
            },{
                title: 'Ajax Tab 1',
                autoLoad:'ajax1.htm'
            },{
                title: 'Ajax Tab 2',
                autoLoad: {url: 'ajax2.htm', params: 'foo=bar&wtf=1'}
            },{
                title: 'Event Tab',
                listeners: {activate: handleActivate},
                html: "I am tab 4's content. I also have an event listener attached."
            },{
                title: 'Disabled Tab',
                disabled:true,
                html: "Can't see me cause I'm disabled"
            }
        ]
    });*/

    function handleActivate(tab){
        alert(tab.title + ' was activated.');
    }
});

function SetTab2() {
Ext.getCmp('centerTabContainer').activate('tab2');
}


function SetTab3() {
Ext.getCmp('centerTabContainer').activate('tab3');
}
