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

 var customer = new Ext.menu.Menu({ id:'customer', items: [{text:'Add Customer',href:'addedit-customer.php'}
,{text:'Customer Invoice',href:'addedit-customerinvoice.php'}
,{text:'Customer Receipt',href:'addedit-receipt.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 accountreport = new Ext.menu.Menu({ id:'accountreport', items: [{text:'Account Master Group Wise Report',href:'report-form-account-master-result.php'}
,{text:'Day Book Report',href:'report-form-day-book.php'}
,{text:'Monthly Tarij Report',href:'report-form-monthly-tarij.php'}
,{text:'Profit And Loss Report',href:'report-form-account-profit-loss.php'}
,{text:'Balance Sheet Report',href:'report-form-balance-sheet.php'}
]}); 

 var employeereport = new Ext.menu.Menu({ id:'employeereport', items: [{text:'Employee Information Report',href:'report-form-employee.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 Invoice Report',href:'report-customerinvoicesummary.php'}
,{text:'Customer Due Payment Report',href:'report-customer-duepayment.php'}
,{text:'Customer Payment Report',href:'report-customer-payment.php'}
,{text:'ProductWise Due Payment Report',href:'report-productwise-duepayment.php'}
,{text:'Customer -Info Report',href:'report-customer-distwise.php'}
,{text:'View AMC Product Report ',href:'view-amcproduct-report.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'}
]}); 

 var stock = new Ext.menu.Menu({ id:'stock', items: [{text:'Current Stock',href:'report-current-stock.php'}
]}); 


	// Sub menu code
	 var master = new Ext.menu.Menu({ id:'master', items: [{text:'Company Profile',href:'addedit-company.php?ID=3'}
,{text:'Employee',menu:employee}
,{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'}
]}); 

 var quotation = new Ext.menu.Menu({ id:'quotation', items: [{text:'Header/Footer-Template',href:'addedit-quotation-header-footer.php'}
,{text:'Add Quotation',href:'addedit-quotation.php'}
,{text:'View Quotation',href:'view-quotation.php'}
,{text:'New Quotation Form',href:'addedit-customer-quotation.php'}
,{text:'Quotation Report Date Wise',href:'report-customerquotationsummary.php'}
]}); 

 var account = new Ext.menu.Menu({ id:'account', items: [{text:'Group Entry',href:'addedit-acgroup.php'}
,{text:'Sub Group Entry',href:'addedit-acsubgroup.php'}
,{text:'Accont Master',href:'addedit-acmaster.php'}
,{text:'Add vouchar Information',href:'addedit-voucher.php'}
,{text:'View Vouchar Information',href:'view-voucher.php'}
,{text:'Account Report',menu:accountreport}
]}); 

 var reports = new Ext.menu.Menu({ id:'reports', items: [{text:'Employee Report',menu:employeereport}
,{text:'Customer Report',menu:customerreport}
,{text:'Vendor Report',menu:vendorreport}
,{text:'Support Report',menu:supportreport}
,{text:'Stock',menu:stock}
,{text:'Customer Bill',href:'addedit-customerbill.php'}
,{text:'Customer Bill Report',href:'report-customerbillsummary.php'}
,{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 utility = new Ext.menu.Menu({ id:'utility', items: [{text:'Change Password',href:'change-password.php'}
]}); 

 var dailywork = new Ext.menu.Menu({ id:'dailywork', items: [{text:'Add Work Details',href:'addedit-work.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}
,
	'-',
	/*{       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();
});