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

 var customersupport = new Ext.menu.Menu({ id:'customersupport', items: [{text:'Add Support Inquiry',href:'addedit-support-inquiry.php'}
,{text:'View Support Inquiry',href:'view-support-inquiry.php'}
,{text:'Add Support',href:'addedit-support.php'}
,{text:'View Support',href:'view-support.php'}
,{text:'Add Customer Support',href:'addedit-custsupport.php'}
]}); 

 var vendor = new Ext.menu.Menu({ id:'vendor', items: [{text:'Add Vendor',href:'addedit-vendor.php'}
,{text:'Vendor Invoice',href:'addedit-invoice.php'}
]}); 

 var customerreport = new Ext.menu.Menu({ id:'customerreport', items: [{text:'Customer Information Report',href:'report-form-customer.php'}
,{text:'Customer Order Report',href:'report-from-custome-order.php'}
,{text:'Customer -Info Report',href:'report-customer-distwise.php'}
,{text:'Customer Report',href:'report-form-customer_dist.php'}
]}); 

 var vendorreport = new Ext.menu.Menu({ id:'vendorreport', items: [{text:'Vendor Information Report',href:'report-form-vendor.php'}
,{text:'Vendor Order Report',href:'report-from-vendor-order.php'}
]}); 

 var supportreport = new Ext.menu.Menu({ id:'supportreport', items: [{text:'Support Inquery Report',href:'report-from-support-inquery.php'}
,{text:'Customer Given Support',href:'report-from-customer-suppot.php'}
,{text:'Support Expenses Report',href:'report-from-suppot-expenses.php'}
,{text:'All Customer Support Report New',href:'report-cust-support.php'}
]}); 


	// Sub menu code
	 var master = new Ext.menu.Menu({ id:'master', items: [{text:'Customer',menu:customer}
,{text:'Customer Support',menu:customersupport}
,{text:'Vendor',menu:vendor}
,{text:'View Designation',href:'view-designation.php'}
]}); 

 var product = new Ext.menu.Menu({ id:'product', items: [{text:'Add Product',href:'addedit-product.php'}
,{text:'Product Inquiry',href:'addedit-product-inquiry.php'}
,{text:'View Product Inquiry',href:'view-product-inquiry.php'}
,{text:'Product Follow Up',href:'search-product-inquiry.php'}
,{text:'View Product Follow Up',href:'view-product-inquiry-followup.php'}
,{text:'View Current Stock',href:'view-currentstock.php'}
,{text:'View AMC Product Report ',href:'view-amcproduct-report-result.php'}
]}); 

 var reports = new Ext.menu.Menu({ id:'reports', items: [{text:'Customer Report',menu:customerreport}
,{text:'Vendor Report',menu:vendorreport}
,{text:'Support Report',menu:supportreport}
,{text:'Inquiery Report',href:'report-customer-inquiry.php'}
,{text:'Follow Report',href:'report-customer-follow.php'}
,{text:'inquiry Not Follow Report',href:'report-customer-not-follow.php'}
]}); 

 var csc = new Ext.menu.Menu({ id:'csc', items: [{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:'Invoice Printed Report',href:'print-invoice-reprot.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:'Master',menu:master}
,{text:'Product',menu:product}
,{text:'Quotation',menu:quotation}
,{text:'Account',menu:account}
,{text:'Reports',menu:reports}
,{text:'Utility',menu:utility}
,{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();
});