
var ForioMenu = function(menuId)
{          
	//..create an object that holds all the menu information
	//..*must be in this format in order to use with YUI
	var menuItems = [
		{  text: "Home", url: "http://forio.com/simulation/climate-development"},   
		{  text: "Briefing",   
		   submenu: {
				id: "charts6",
				itemdata: [
					 {text: "Motivation/Background", url: "http://forio.com/simulation/climate-development/htm/motivation.htm"},
					 {text: "Instructions", url: "http://forio.com/simulation/climate-development/htm/instructions.htm"},
					 //{text: "Understanding Results", url: "http://forio.com/simulation/climate-development/htm/understanding.htm"},
					 {text: "Sim Media", url: "http://www.climateinteractive.org/simulations/C-ROADS/simulation-media"},
					 {text: "FAQs", url: "http://forio.com/simulation/climate-development/htm/faqs2.htm"},
					 {text: "Credits/Contact", url: "http://forio.com/simulation/climate-development/htm/credits.htm"}
				]
			}
		},
		{  text: "Fossil Fuel Emissions",   
			submenu: {
				id: "charts2",
				itemdata: [
					 {text: "Total fossil fuel emissions - comparative", url: "http://forio.com/simulation/climate-development/htm/total-ff-emissions.htm"},
					 {text: "Fossil fuel emissions - stacked", url: "http://forio.com/simulation/climate-development/htm/ff-emissions-stacked.htm"},
					 {text: "Cumulative emissions fraction", url: "http://forio.com/simulation/climate-development/htm/cumulative-emissions-fraction.htm"},
					 {text: "Emissions per capita", url: "http://forio.com/simulation/climate-development/htm/emissions-per-capita.htm"}
				]
			}
		},
		{   text: "Other Emissions",
			submenu: {
				id: "charts1",
				itemdata: [
					{text: "Global emissions total - comparative", url: "http://forio.com/simulation/climate-development/htm/global-emissions-comp.htm"},
					{text: "Land use emissions - comparative", url: "http://forio.com/simulation/climate-development/htm/land-use-emissions-comp.htm"},
					{text: "Sources of emissions - stacked", url: "http://forio.com/simulation/climate-development/htm/sources-of-emissions.htm"}
				]
			}
		},
		{  text: "CO2 in Atmosphere",   
		   submenu: {
				id: "charts3",
				itemdata: [
					 {text: "CO2 in atmosphere - comparative", url: "http://forio.com/simulation/climate-development/htm/co2-atmosphere-comp.htm"},
					 {text: "Emissions and removals", url: "http://forio.com/simulation/climate-development/htm/emissions-and-removals.htm"},
					 {text: "Removals - comparative", url: "http://forio.com/simulation/climate-development/htm/removals-comp.htm"},
					 {text: "Afforestation - comparative", url: "http://forio.com/simulation/climate-development/htm/afforestation-comp.htm"},
					 //{text: "Sources of removals - stacked", url: "http://forio.com/simulation/climate-development/htm/sources-of-removals-stacked.htm"}
				]
			}
		},
		{  text: "Temperature",   
		   submenu: {
				id: "charts4",
				itemdata: [
					 {text: "Temperature - comparative", url: "http://forio.com/simulation/climate-development/htm/temperature-comp.htm"}
				]
			}
		},
		{  text: "Sea level rise",   
		   submenu: {
				id: "charts7",
				itemdata: [
					 {text: "Sea level rise - comparative", url: "http://forio.com/simulation/climate-development/htm/sea-level-rise-comp.htm"}
				]
			}
		},
		{  text: "Data",   
		   submenu: {
				id: "charts5",
				itemdata: [
					 {text: "Output variables", url: "http://forio.com/simulation/climate-development/htm/data-table.htm?var1=Aggregated%20CO2%20FF%20emissions[Developed%20Countries]&var2=Aggregated%20CO2%20FF%20emissions[Developing%20A]&var3=Aggregated%20CO2%20FF%20emissions[Developing%20B]&units=billion%20tons%20C%20per%20year&headervar1=Developed%20Countries&headervar2=Developing%20A&headervar3=Developing%20B&graph=Fossil%20Fuel%20Emissions&v=15"}
				]
			}
		}
		
	]
	
	//..collect the menuId argument that came in  
	var menuId = menuId;
	
	//..initialize the MenuBar widget
	var yMenu = new YAHOO.widget.MenuBar(menuId); 
	
	//..pass in the object we created to the addItems method, render the menu, and show it 
	yMenu.addItems(menuItems);
	yMenu.render();
	yMenu.show();
	
	return null;
};
