/* --------------------------------------------------------------------------
  To add a new topic:
  
	1. Add a record to database table 'techtree'.
	2. Create a php page containing the new content. Place it in directory
			'zenlike/tech'.
	3. Add a panel to 'techContent.js' which will autoLoad the php page
			created in step 2.
			- The panel component's name must match the value in field
				'entryDiv' of the new record added in step 1.
			- Add the name of the new panel component to the items array in
				panel 'techContentPanel' at the bottom of the js file.
				
	Voila!  You're done.				
----------------------------------------------------------------------------- */

var techSplash = new Ext.Panel({
	id: 'techSplash',
	border: false,
	autoLoad: 'tech/techsplash.php',
	listeners: {
		'afterRender': function() {
			current_tech_item = 'techSplash';
			//alert( 'current_tech_item = ' + current_tech_item);
		}
	}
});

var techExtJS = new Ext.Panel({
	id: 'techExtJS',
	hidden: true,
	border: false,
	autoLoad: 'tech/techExtJS.php'
});

var techJavascript = new Ext.Panel({
	id: 'techJavascript',
	hidden: true,
	border: false,
	autoLoad: 'tech/techJavascript.php'
});

var techSoftDev = new Ext.Panel({
	id: 'techSoftDev',
	hidden: true,
	border: false,
	autoLoad: 'tech/techSoftDev.php'
});

var techDAAS = new Ext.Panel({
	id: 'techDAAS',
	hidden: true,
	border: false,
	autoLoad: 'tech/techDAAS.php'
});

var techExtJS_override = new Ext.Panel({
	layout: 'fit',
	id: 'techExtJS_override',
	hidden: true,
	border: false,
	autoLoad: 'tech/extjs_override.php'
});
// -------------------------------------------------------------------------

var techExtJS_RadioGroupSample = new Ext.Panel({
	autoLoad: 'tech/extRadioGroup.php',
	autoScroll: true,
	border: false
});

var techExtJS_RadioGroup = new Ext.TabPanel({
	id: 'techExtJS_RadioGroup',
    fitToFrame: true,
    deferredRender:false,
    enableTabScroll: true,
	hidden: true,
	border: false,
    activeTab:0,
    //autoScroll:true,
    layoutOnTabChange: true,
	defaults: {
        closable:false,
		style: 'margin:10px;font-size:1em'
	},
    items:[
    {
        title: 'Sample Usage',
        iconCls: 'tech',
        items: techExtJS_RadioGroupSample
    },{
        title: 'Notes',
        iconCls: 'leaf',
        items: [{
			xtype: 'panel',
			border: false,
			autoScroll: true,
			autoLoad: 'tech/extRadioGroupNotes.php'
		}]
    }]
});

var techContentPanel = new Ext.Panel({
	layout: 'fit',
	autoScroll: true,
	items: [techSplash, techExtJS, techExtJS_RadioGroup, techJavascript, techSoftDev, techDAAS, techExtJS_override]
});

// Initial tech content name.
var current_tech_item = 'techSplash';


