
Ext.onReady(function(){
	Ext.BLANK_IMAGE_URL = "images/gray/s.gif";	
	Ext.QuickTips.init();

	var cardTabs = {
		xtype: 'tabpanel',
		region: 'center',
		id: 'card-tabs-panel',
		plain: true,  //remove the header border
		activeItem: 1,
		margins: '2 5 5 0',
		bodyStyle : 'background-color:transparent;',
		defaults: {bodyStyle: 'padding:15px'},
		items:[{
			title: 'Overview',
			autoLoad : {url:'resources/webcastdescription.htm'},
			autoScroll: true
		},{
			title: 'Slides',
			contentEl: 'divSlides'
		},{
			title: 'Sponsors',
			contentEl: 'divSponsors'
		},{
			title: 'Help',
			contentEl: 'divHelp'
		}],
		listeners: {
			tabchange: function(tb, p) {
				if(p.title=="Slides") {
					f = document.getElementById('slidesframe');
					d = f.contentWindow;
					try{
						d.swfLoop();
					}catch(e) {//void
					}
				}
			}
		}
	};

	var mediaPanel = {
		id: 'mediapanel',
        region: 'north',
		autoWidth: true,
        minSize: 150,
		height: 300,
		margins: '25px 0px 0px 0px',
        bodyStyle: 'padding:0px;background:transparent;',
		autoScroll: false,
		border:false
	};
	var detailsPanel = {
		id: 'detailspanel',
        title: 'Please Note',
        region: 'center',
        bodyStyle: 'padding-bottom:15px;background:#eee;',
		margins: '4px 0px 0px 0px',
		autoScroll: true,
		contentEl: 'divdetail'
    };
	
    new Ext.Viewport({
		layout: 'border',
		title: 'Ext Layout Browser',
		items: [{
			xtype: 'box',
			region: 'north',
			applyTo: 'header',
			height: 60
		},{
			layout: 'border',
	    	id: 'westregion',
	        region:'west',
	        border: false,
	        split:true,
			margins: '2 0 5 5',
	        width: 314,
	        minSize: 100,
	        maxSize: 500,
			items: [mediaPanel, detailsPanel]
		},
			cardTabs
		],
        renderTo: Ext.getBody()
    });

	var mediawin = new Ext.Window({ 
		title: 'Live Webcast',
		width: 314,
		height: 300,
		layout:'fit',
		minimizable: false,
		maximizable: false,
		closable: false,
		plain: true,
		shadow: false,
		contentEl: 'divWMP'
		
	});

	mediawin.setPosition(5,85);
	mediawin.show();
	
});


