Ext.onReady(function(){
	var about_menu = new Ext.menu.Menu({
		id: 'aboutMenu',
		items: [
			new Ext.menu.Item({text: 'The Conserv Fuel Story', handler: story}),
			new Ext.menu.Item({text: 'Management', handler: management})
		]});
	var products_menu = new Ext.menu.Menu({
		id: 'productsMenu',
		items: [
			new Ext.menu.Item({text: 'Gasoline', handler: gasoline}),			
			new Ext.menu.Item({text: 'Biodiesel', handler: biodiesel}),
			new Ext.menu.Item({text: 'Ethanol', handler: ethanol}),
			new Ext.menu.Item({text: 'Fleet Accounts', handler: fleet_accts})
		]});
	var community_menu = new Ext.menu.Menu({
		id: 'communityMenu',
		items: [
			new Ext.menu.Item({text: 'Membership', handler: membership}),
			new Ext.menu.Item({text: 'Fleet Members', handler: fleet_members}),
			new Ext.menu.Item({text: 'Charity Members', handler: chairty}),
			new Ext.menu.Item({text: 'Forum', handler: forum})
		]});

	var tb = new Ext.Toolbar('toolbar');
		tb.add({
			text: 'Home',
			handler: home
		},
		{
			text: 'News',
			handler: press
		},
		{
			text:'About Us',
			menu: about_menu  // assign menu by instance
        },
		{
			text: 'Products &amp; Services',
			menu: products_menu
		},
		{
			text: 'Community',
			menu: community_menu
		},
		{
			text: 'Conservation Tips',
			handler: conservation
		},
		{
			text: 'FAQ',
			handler: faq
		},
		{
			text: 'Contact Us',
			handler: contactus
		},
{
			text: 'Store',
			handler: store
		});
});

function home() {
	window.location = '/';
}
function story() {
	window.location =  '/about/cfstory';
}
function management() {
	window.location = '/about/management';
}
function press() {
	window.location = '/about/press';
}
function biodiesel() {
	window.location = '/services/biodiesel';
}
function gasoline() {
	window.location = '/services/gasoline';
}
function conservation() {
	window.location = '/services/conservation';
}
function ethanol() {
	window.location = '/services/ethanol';
}
function fleet_accts() {
	window.location = '/services/fleetaccounts';
}
function membership() {
	window.location = '/membership/register';
}
function fleet_members() {
	window.location = '/community/fleetmembers';
}
function chairty() {
	window.location = '/community/charitymembers';
}
function contactus() {
	window.location = '/contact'
}
function faq() {
	window.location = '/faq';
}
function forum() {
	window.location = '/forums';
}
function store() {
window.location = '/store';
}