// define menu look and feel 
fontFamily				= "arial, helvetica, sans-serif"
fontSize					= 10
fontWeight				= "bold"
fontColor				= "white"
fontHighlightColor	= "#FFCC33"
bgColor					= "#284C86"
bgHighlightColor		= "#8698B5"
hAlign					= "left"
vAlign					= "middle"
itemPadding				= 5
itemSpacing				= 0
itemIndent				= 0
itemHeight				= 20
menuLightBorderColor	= "white"
menuDarkBorderColor	= ""
menuLineColor			= "white"
menuBorder				= 0 			// 1=yes, 0=no
menuLeft					= 5			// from left of mouse over element
menuTop					= 1			// from bottom of mouse over element
hideMenuTime			= 1500		// time until menu disappears when not in use; in milliseconds
showMenus				= true		// determines whether the menus should be rendered and usable
nfgStyle				= "font-weight:"+fontWeight+";font-size:"+fontSize+";"	// override nfg style sheet

if (showMenus) {
	// define protocol, server, etc. for menu item links 
	SiteBaseUrl				= "http://" + location.host
	SiteBaseSSLUrl			= "https://" + location.host
}
// required functionality
function setMenu(width){this.width=width;this.height=itemHeight}
function formatMenu(menu){menu.fontWeight=fontWeight;menu.hideOnMouseOut=true;menu.menuBorder=menuBorder;menu.menuLiteBgColor=menuLightBorderColor;menu.menuBorderBgColor=menuDarkBorderColor;menu.bgColor=menuLineColor}
function itemProps(text,href){this.text=text;this.href=href}
function createItems(menu,items){for(i=0;i<items.length;i++){menu.addMenuItem(items[i].text,"location='"+items[i].href+"'")}}

// menu items; function called at bottom of NfgShell.ascx
function loadMenus() {
	if (showMenus) {
		// DONATE
		menuDonate = new setMenu(155)
		window.menuDonate = new Menu(menuDonate.width,itemHeight,fontFamily,fontSize,fontColor,fontHighlightColor,bgColor,bgHighlightColor,hAlign,vAlign,itemPadding,itemSpacing,hideMenuTime,true,true,itemIndent,0,0,true,"root",nfgStyle)
		var arrDonate = new Array();
		arrDonate[0] = new itemProps("Search for a Charity",SiteBaseUrl + "/donate/")
		arrDonate[1] = new itemProps("Gift Baskets",SiteBaseUrl + "/giftbasket/")
		arrDonate[2] = new itemProps("Favorite Charities List",SiteBaseUrl + "/wishlist/")
		arrDonate[3] = new itemProps("Giving Calculator",SiteBaseUrl + "/donate/calculator/")
		arrDonate[4] = new itemProps("10 Tips on Giving Wisely",SiteBaseUrl + "/donate/donatetips.aspx")
		arrDonate[5] = new itemProps("Tax Tips &amp; Resources",SiteBaseUrl + "/donate/taxtips.aspx")
		createItems(menuDonate,arrDonate)
		formatMenu(menuDonate)
		
		// VOLUNTEER
		menuVolunteer = new setMenu(185)
		window.menuVolunteer = new Menu(menuVolunteer.width,itemHeight,fontFamily,fontSize,fontColor,fontHighlightColor,bgColor,bgHighlightColor,hAlign,vAlign,itemPadding,itemSpacing,hideMenuTime,true,true,itemIndent,0,0,true,"root",nfgStyle)
		var arrVolunteer = new Array();
		arrVolunteer[0] = new itemProps("Search for an Opportunity",SiteBaseUrl + "/volunteer/")
		arrVolunteer[1] = new itemProps("Volunteer Record of Service","/offsiteframe/?SiteUrl=https://www.presidentialserviceawards.gov/tgact/ros/dspROSlogin.cfm")
		arrVolunteer[2] = new itemProps("Youth Volunteer Network",SiteBaseUrl + "/offsiteframe/?SiteUrl=http://www.youthnoise.com/link/AOLNFGyvnhome/")
		arrVolunteer[3] = new itemProps("10 Tips on Volunteering Wisely",SiteBaseUrl + "/volunteer/volunteertips.aspx")
		createItems(menuVolunteer,arrVolunteer)
		formatMenu(menuVolunteer)
		
		// MY PROFILE
		menuMyProfile = new setMenu(163)
		window.menuMyProfile = new Menu(menuMyProfile.width,itemHeight,fontFamily,fontSize,fontColor,fontHighlightColor,bgColor,bgHighlightColor,hAlign,vAlign,itemPadding,itemSpacing,hideMenuTime,true,true,itemIndent,0,0,true,"root",nfgStyle)
		var arrMyProfile = new Array();
		arrMyProfile[0] = new itemProps("Login",SiteBaseSSLUrl + "/profile/login.aspx")
		arrMyProfile[1] = new itemProps("Create a Profile",SiteBaseSSLUrl + "/profile/create.aspx")
		arrMyProfile[2] = new itemProps("Edit My Profile",SiteBaseSSLUrl + "/profile/EditProfile.aspx")
		arrMyProfile[3] = new itemProps("My Favorite Charities List",SiteBaseSSLUrl + "/wishlist/edit.aspx")
		arrMyProfile[4] = new itemProps("My Charity Badges",SiteBaseSSLUrl + "/pca/MyPcas.aspx")
		arrMyProfile[5] = new itemProps("My Donation History",SiteBaseSSLUrl + "/donate/DonationHistory.aspx")
		arrMyProfile[6] = new itemProps("My Recurring Donations",SiteBaseSSLUrl + "/donate/Recurring/")
		arrMyProfile[7] = new itemProps("Logout",SiteBaseSSLUrl + "/profile/logout.aspx")
		createItems(menuMyProfile,arrMyProfile)
		formatMenu(menuMyProfile)

		// write menus
		menuDonate.writeMenus()
	}
}


