Ext.onReady(function(){
 	Ext.QuickTips.init(); 	
	
	// Sub Sub menu code
	
	// Sub menu code
	 var dailywork = new Ext.menu.Menu({ id:'dailywork', items: [{text:'Add Work Details',href:'addedit-work.php'}
]}); 

 var csc = new Ext.menu.Menu({ id:'csc', items: [{text:'Search CSC Order',href:'search-csc-order.php'}
,{text:'View CSC Order/Address Print',href:'view-csc-customer.php'}
,{text:'Add CSC Order',href:'add-csc-order.php'}
,{text:'View CSC Order',href:'view-csc-order.php'}
,{text:'Address Report',href:'csc-address.php'}
,{text:'Upload CSC Order',href:'upload_csc_data.php'}
,{text:'CSC Printed Order  Data',href:'csc-order-printed-data.php'}
,{text:'CSC Ledger Report',href:'csc-ledger-report.php'}
,{text:'Import Inventory Report',href:'csc-invoice-print-tally.php'}
]}); 

	
	//Sub menu code	
	var tb = new Ext.Toolbar();
    tb.render('main-menu');	
    tb.add (
			{ 
		   	xtype:'tbbutton',
            text:'Home',
			handler: function(btn)
				{ var redirect = 'loginhome.php';
				  window.location = redirect;	
				}
  			},
	{text:'Daily Work',menu:dailywork}
,{text:'CSC',menu:csc}
,
	'-',
	/*{       xtype:'tbbutton',
            text: 'Utility',
            //tooltip: {text:'This is a an example QuickTip for a toolbar item', title:'Tip Title'},
            iconCls: 'blist',
            menu : {
            items: [
				
				{
                	text:'Change Password',
				    href:'change-password.php'
					
                }
				]
            }
	    },*/
		{ 
		   	xtype:'tbbutton',
            text:'Logout',
			handler: function(btn)
				{ 
				  var redirect ='logout.php';
				  window.location = redirect;	
				}
    	}
	);
	tb.doLayout();
});