
// SUB MENU Definitions
var qMenuStyle = new ItemStyle(20, 1, '&gt;&gt;', -15, 1, '#F5F5DC', '#F5F5DC', 'qLiteTextm', 'qDarkText',
 'qItemBorder', 'qItemBorder', null, null, 'hand', 'default');
var qMenuTitleStyle = new ItemStyle(20, 1, '&gt;&gt;', -15, 1, '#F5F5DC', '#F5F5DC', 'qTitleText','qTitleText',
 'qItemBorder', 'qItemBorder', null, null, 'hand', 'default');

var qMenu = new PopupMenu('qMenu');
with (qMenu)

{
  // 0 // MENU BAR values
// root, vertical, right align minus menu width, vertical position, width for text, style
startMenu('root', true, 'page.winW()-109', 'page.scrollY() + 125', 85, qMenuStyle);
addItem('Quick Links', '', '', qMenuTitleStyle, null, 22);
addItem('Events<br />Calendar', '/ffx_chapter_calendar.html', '', null, 36);
addItem('Member<br />News', '/ffx_chapter_announcements.html', '', null, 36);
addItem('Newsletter', '/ffx_about_newsletter.html', '', null, 20);
addItem('Leadership', '/ffx_about_leadership.html', '', null, 20);
addItem('Contacts', '/ffx_about_contact.html', '', null, 20);
//addItem('', '', '', qMenuStyle, null, 08);
addItem('Top<br />- of -<br />Page', '#top', '', null, 52);

}

// MENU BAR Definitions
var hBar = new ItemStyle(0, 5, '', 0, 0, '#000099', '#F5F5DC', 'liteTextm', 'darkText',
 'itemBorder', 'itemBorderdown', null, null, 'hand', 'default');

// SUB MENU Definitions
 
var subM = new ItemStyle(20, 1, '<img src="/objects/plus.gif">', -15, 1, '#D7D7D7', '#F5F5DC', 'liteText', 'darkText',
 'itemBorder', 'itemBorder', null, null, 'hand', 'default');

var pMenu = new PopupMenu('pMenu');
with (pMenu)

{
  // 0 // MENU BAR values
startMenu('root', true, 2, 162, 162, hBar, '', false);
addItem('&nbsp; Home', '/index.html', '', null, 18);
addItem('&nbsp; Chapter Activities', 'Activities', 'sm:', null, 18);
addItem('&nbsp; About Fairfax Resolves', 'About', 'sm:', null, 18);
addItem('&nbsp; Programs', 'Programs', 'sm:', null, 18);
addItem('&nbsp; Observances', 'Observances', 'sm:', null, 18);
addItem('&nbsp; Historical Records', 'Records', 'sm:', null, 18);
addItem('&nbsp; Membership', 'Membership', 'sm:', null, 18);
addItem('&nbsp; Resources', 'Resources', 'sm:', null, 18);
//addItem('&nbsp; Genealogy', 'Genealogy', 'sm:', null, 18);
addItem('&nbsp; Links', 'Links', 'sm:', null, 18);

	  // 1 // *Chapter Activities* drop down menu
	startMenu('Activities', true, 168, 0, 170, subM);
	addItem('&nbsp; Events Calendar', '/ffx_chapter_calendar.html', '', '');
	addItem('&nbsp; Member News', '/ffx_chapter_announcements.html', '', '');
	addItem('&nbsp; Presentations', '/ffx_chapter_presentations.html', '', '');
	addItem('&nbsp; Color Guard', '/ffx_chapter_colorguard.html', '', '');
	addItem('&nbsp; Newsletters', '/ffx_about_newsletter.html', '', '');
	addItem('&nbsp; Press Coverage', '/ffx_chapter_press.html', '', '');
	addItem('&nbsp; Picture Galleries', '/ffx_chapter_galleries.html', '', '');

	  // 1 // *ABOUT* Fairfax Resolves drop down menu
	startMenu('About', true, 168, 0, 170, subM, '', false);
	addItem('&nbsp; Who We Are', '/ffx_about_about.html', '', '');
	addItem('&nbsp; Leadership', '/ffx_about_leadership.html', '', '');
	addItem('&nbsp; History', '/ffx_about_history.html', '', '');
	addItem('&nbsp; Contact Fairfax Resolves', '/ffx_about_contact.html', '', '');

	  // 1 // *Programs* drop down menu
	startMenu('Programs', true, 168, 0, 170, subM);
	addItem('&nbsp; Patriotic', 'Patriotic', 'sm:', '')
	addItem('&nbsp; Youth', 'Youth', 'sm:', '')
	addItem('&nbsp; Public Service', 'Community', 'sm:', '')
	addItem('&nbsp; Historical', 'Historical', 'sm:', '')


		  // 2 // *Patriotic* drop down menu
		startMenu('Patriotic', true, 170, 0, 180, subM);
		//addItem('&nbsp; Graves', 'Graves', 'sm:', '');
		//addItem('&nbsp; Veterans Programs', '/ffx_patriotic_veteransprograms.html', '', '');
		addItem('&nbsp; Patriotic Flag Program', '/ffx_patriotic_flagprogram.html', '', '');
		addItem('&nbsp; Veterans Common', '/ffx_patriotic_veteranscommon.html', '', '');
		//addItem('&nbsp; Memorial Day', '/ffx_patriotic_memorialday.html', '', '');
		//addItem('&nbsp; Medals and Awards', '/ffx_patriotic_medals.html', '', '');

		  // 2 // *Youth* drop down menu
		startMenu('Youth', true, 170, 0, 180, subM);
		addItem('&nbsp; C.A.R. Flag Day', '/ffx_youthcar_flagday.html', '', '');
		//addItem('&nbsp; Children of the American Revolution', 'CAR', 'sm:', '')
		//addItem('&nbsp; Student Good Citizenship', '/ffx_youth_goodcitizen.html', '');
		addItem('&nbsp; Eagle Scout Scholarship', '/ffx_youth_eaglescout.html', '');
		addItem('&nbsp; Rumbaugh Oration Contest', '/ffx_youth_oration.html', '');
		addItem('&nbsp; Knight Essay Contest', '/ffx_youth_knightessay.html', '');
		addItem('&nbsp; JROTC Recognition', '/ffx_youth_jrotc.html', '');
		addItem('&nbsp; Outstanding Student Program', '/ffx_youth_outstandingstudent.html', '');
		addItem('&nbsp; National History Day', '/ffx_youth_historyday.html', '');
		addItem('&nbsp; Americanism Poster Contest', '/ffx_youth_postercontest.html', '');

			  // 3 // *CAR* sub menu
			//startMenu('CAR', true, 161, 0, 160, subM);
			//addItem('&nbsp; SAR and the CAR', '/ffx_youthcar_sarandcar.html', '', '');
			//addItem('&nbsp; C.A.R Senior Leadership', '/ffx_youthcar_carseniors.html', '', '');
			//addItem('&nbsp; Flag Day', '/ffx_youthcar_flagday.html', '', '');
			//addItem('&nbsp; Sponsored Society', '/ffx_youthcar_sponsoredcar.html', '', '');

		  // 2 // Community drop down menu
		startMenu('Community', true, 170, 0, 180, subM);
		addItem('&nbsp; Citizen of the Year', '/ffx_community_citizenofyear.html', '');
		addItem('&nbsp; Teacher of the Year', '/ffx_community_teacherofyear.html', '');
		addItem('&nbsp; Law Enforcement Medal', '/ffx_community_lawenforcement.html', '');
		addItem('&nbsp; Fire Safety Medal', '/ffx_community_firesafetymedal.html', '');
		addItem('&nbsp; EMS Medal', '/ffx_community_emsmedal.html', '');
		addItem('&nbsp; Medal for Heroism', '/ffx_community_medalforheroism.html', '');

		  // 2 // Historical drop down menu
		startMenu('Historical', true, 170, 0, 180, subM);
		//addItem('&nbsp; Patriot Graves', 'Graves', 'sm:', '');
		addItem('&nbsp; Patriot Grave Programs', '/ffx_patriotic_patriotgraveprograms.html', '', '');
		addItem('&nbsp; Patriot Grave Markings', '/ffx_patriotic_patriotgravemarking.html', '', '');
		addItem('&nbsp; Forgotten Patriot Program', '/ffx_patriotic_forgottenpatriot.html', '', '');
		//addItem('&nbsp; Observances', '/ffx_historical_observe.html', '');

			  // 3 // *Graves* sub menu
			//startMenu('Graves', true, 161, 0, 160, subM);
			//addItem('&nbsp; Grave Markings', '/ffx_patriotic_patriotgravemarking.html', '', '');
			//addItem('&nbsp; Grave Programs', '/ffx_patriotic_patriotgraveprograms.html', '', '');
			//addItem('&nbsp; Grave Registration', '/ffx_gravereg.html', '', '');
			//addItem('&nbsp; Grave Maintenance', '/ffx_gravemain.html', '', '');

	  // 1 // *Historical Observances* sub menu
	startMenu('Observances', true, 168, 0, 170, subM);
	addItem('&nbsp; Battle of Cowpens', '/ffx_observance_cowpens.html', '');
	addItem('&nbsp; Battle of Point Pleasant', '/ffx_observance_pointpleasant.html', '');
	addItem('&nbsp; Guilford Courthouse', '/ffx_observance_guilfordcourthouse.html', '');
	addItem('&nbsp; Martin\'s Station', '/ffx_observance_martinstation.html', '');
	addItem('&nbsp; Valley Forge', '/ffx_observance_valleyforge.html', '');
	addItem('&nbsp; Yorktown Day', '/ffx_observance_yorktown.html', '');

	  // 1 // *Historical Records* sub menu
	startMenu('Records', true, 168, 0, 170, subM);
	addItem('&nbsp; Patriot Ancestors', '/ffx_patriotic_patriotancestors.html', '', '');
	addItem('&nbsp; Patriot Grave Markings', '/ffx_patriotic_patriotgravemarking.html', '', '');
	addItem('&nbsp; Pension Applications', '/ffx_historical_pensions.html', '', '');
	addItem('&nbsp; Legislative Petitions', '/ffx_historical_petitions.html', '', '');
	addItem('&nbsp; Civil Service Records', '/ffx_historical_civilservice.html', '', '');


	  // 1 // *Membership* Brochures submenu on the Membership tab
	startMenu('Membership', true, 168, 0, 170, subM);
	addItem('&nbsp; Benefits of Membership', '/ffx_membership_benefits.html', '', '');
	addItem('&nbsp; How To Join', '/ffx_membership_joining.html', '', '');
	addItem('&nbsp; Registrar&#146;s Report', '/ffx_chapter_registrarreport.html', '', '');
	//addItem('&nbsp; Membership Forms', '/ffx_membership_memberform.html', '', '');

	  // 1 // *Resources* Brochures submenu on the Membership tab
	startMenu('Resources', true, 168, 0, 170, subM);
	addItem('&nbsp; Forms & Resources', '/ffx_resources_forms.html', '', '');
	addItem('&nbsp; Chapter Documents', '/ffx_resources_chapter.html', '', '');
	//addItem('&nbsp; Membership Forms', '/ffx_membership_memberform.html', '', '');

	  // 1 // Genealogy drop down menu
	startMenu('Genealogy', true, 168, 0, 170, subM);
	addItem('&nbsp; Genealogy', '/ffx_geneology.html', '');

	  // 1 // LINKS drop down menu
	startMenu('Links', true, 168, 0, 170, subM);
	addItem('&nbsp; SAR - National Society', 'http://www.sar.org/', '');
	addItem('&nbsp; SAR - Virginia Society', 'http://www.virginia-sar.org/', '');
	addItem('&nbsp; DAR - National Society', 'http://www.dar.org', '');
	addItem('&nbsp; DAR - Virginia DAR', 'http://www.vadar.org/', '');
	addItem('&nbsp; C.A.R. - National Society', 'http://www.nscar.org/', '');
	addItem('&nbsp; C.A.R. - Virginia Society', 'http://www.vscar.org/', '')

}



// BORDER: Added to all menus in a named object using a specified ItemStyle. The syntax is:
//  addMenuBorder(menuObject, ItemStyle,
//   opacity of border, 'border colour', border width, 'padding colour', padding width);
// Opacity is a number from 0 to 100, or null for solid colour (just like the ItemStyles).

addMenuBorder(qMenu, qMenuStyle, null, '#000000', 1, '#000099', 0);


function addMenuBorder(mObj, iS, alpha, bordCol, bordW, backCol, backW)
{
 // Loop through the menu array of that object, finding matching ItemStyles.
 for (var mN in mObj.menu)
 {
  var mR=mObj.menu[mN], dS='<div style="position:absolute; background:';
  if (mR[0].itemSty != iS) continue;
  // Loop through the items in that menu, move them down and to the right a bit.
  for (var mI=1; mI<mR.length; mI++)
  {
   mR[mI].iX += bordW+backW;
   mR[mI].iY += bordW+backW;
  }
  // Extend the total dimensions of menu accordingly.
  mW = mR[0].menuW += 2*(bordW+backW);
  mH = mR[0].menuH += 2*(bordW+backW);

  // Set the menu's extra content string with divs/layers underneath the items.
  if (isNS4) mR[0].extraHTML += '<layer bgcolor="'+bordCol+'" left="0" top="0" width="'+mW+
   '" height="'+mH+'" z-index="980"><layer bgcolor="'+backCol+'" left="'+bordW+'" top="'+
   bordW+'" width="'+(mW-2*bordW)+'" height="'+(mH-2*bordW)+'" z-index="990"></layer></layer>';
  else mR[0].extraHTML += dS+bordCol+'; left:0px; top:0px; width:'+mW+'px; height:'+mH+
   'px; z-index:980; '+
   (alpha!=null?'filter:alpha(opacity='+alpha+'); -moz-opacity:'+alpha+'%; opacity:'+(alpha/100):'')+
   '">'+dS+backCol+'; left:'+bordW+'px; top:'+bordW+'px; width:'+(mW-2*bordW)+'px; height:'+
   (mH-2*bordW)+'px; z-index:990"></div></div>';
 }
};

