//--------------------------------------------------------------
// NAV_MENU.JS - SCRIPT FILE FOR HEADER NAVIGATION MENU - WUCC
//--------------------------------------------------------------

var isXMAS = false;

//----------------------------------------------
// CONSTANTS
//----------------------------------------------

var MAIN_MENU_TEXT_COLOR_NORMAL, MAIN_MENU_TEXT_COLOR_HIGHLIGHT;
var MAIN_MENU_BACK_COLOR_NORMAL, MAIN_MENU_BACK_COLOR_HIGHLIGHT;
var SUB_MENU_TEXT_COLOR_NORMAL, SUB_MENU_TEXT_COLOR_HIGHLIGHT;
var SUB_MENU_BACK_COLOR_NORMAL, SUB_MENU_BACK_COLOR_HIGHLIGHT;
var SUB_SUB_MENU_TEXT_COLOR_NORMAL, SUB_SUB_MENU_TEXT_COLOR_HIGHLIGHT;
var SUB_SUB_MENU_BACK_COLOR_NORMAL, SUB_SUB_MENU_BACK_COLOR_HIGHLIGHT;

var PALE_DULL_YELLOW   = "#FFFF99";
var LIGHT_FADED_YELLOW = "#FFFF66";
var LIGHT_HARD_TEAL    = "#33FF99";
var DARK_WEAK_GREEN    = "#003300";
var DARK_GREEN         = "#006400";
var FOREST_GREEN       = "#228B22";
var MIDNIGHT_BLUE      = "#191970";
var MAROON             = "#800000";
var OBSCURE_WEAK_RED   = "#330000";
var EASTER_RED         = "#C00000";
var LENT_PURPLE        = "#9900CC";
var SUMMER_GREEN_MENU  = "#007966";

// MENU COLORS
MAIN_MENU_BACK_COLOR_NORMAL = SUB_MENU_BACK_COLOR_NORMAL = SUMMER_GREEN_MENU; 
MAIN_MENU_BACK_COLOR_HIGHLIGHT = SUB_MENU_BACK_COLOR_HIGHLIGHT = DARK_WEAK_GREEN;
SUB_SUB_MENU_BACK_COLOR_NORMAL = DARK_WEAK_GREEN;
SUB_SUB_MENU_BACK_COLOR_HIGHLIGHT = FOREST_GREEN;

// TEXT COLORS
MAIN_MENU_TEXT_COLOR_NORMAL = SUB_MENU_TEXT_COLOR_NORMAL = SUB_SUB_MENU_TEXT_COLOR_NORMAL = PALE_DULL_YELLOW;
MAIN_MENU_TEXT_COLOR_HIGHLIGHT = SUB_MENU_TEXT_COLOR_HIGHLIGHT = SUB_SUB_MENU_TEXT_COLOR_HIGHLIGHT = LIGHT_FADED_YELLOW;



var MEMBERS    = "members";
var ADMIN      = "administration";
var  ANNUALREPORTS = ADMIN+"_annualReports";
var ARCHIVES   = "archives";

var EDUCATION          = "education";
var  THIRDGRADE        = EDUCATION+"_thirdgrade";
var  EDUCATIONARCHIVE  = EDUCATION+"_archive";
var  CONFIRMATION      = EDUCATION+"_confirmation";

var MINISTRY   = "ministry";
var COMMITTEES = "committees";

var ACTIVITIES = "activities";
var  DARTBALL = ACTIVITIES+"_dartball";
var  SOFTBALL = ACTIVITIES+"_softball";


var PHOTOS          = "photogallery";
var  BLDGPHOTOS     = PHOTOS+"_building";
var  CHICKENPHOTOS  = PHOTOS+"_chickenDinner";
var  CHOIRPHOTOS    = PHOTOS+"_choir";
var  CAROLINGPHOTOS = PHOTOS+"_caroling";
var  EGGHUNTPHOTOS  = PHOTOS+"_egghunt";
var  FFPHOTOS       = PHOTOS+"_ff";
var  PHOTOS2005     = PHOTOS+"_2005";
var  EDUCATIONPHOTOS= PHOTOS+"_education";

var PHOTOS_1   = "photos1";
var PHOTOS_2   = "photos2";
var ANNOUNCEMENTS = "announcements";
var SITEMAP    = "siteMap";
var END        = "end";
var BLDGPIX    = "buildingpictures"
var SUB_MENU="";
var SUB_SPEC_MENU="SPEC";
var LEVEL_2 = "level2"
var MAIN_ITEM = 1;
var SUB_ITEM = 2;
var SUB_SPECIAL_ITEM = 3
var SPECIAL_ITEM = 4;

//----------------------------------------------
// CREATE MENU
//----------------------------------------------
var HEADER_BROWN   = "#512828" ;
var HEADER_SILVER  = "#C0C0C0" ;
var HEADER_XMAS    = "#006400" ;

function addNavigation(isMemberArea,directory,color)
{
  addNavigationBar(color,isMemberArea);
}

// SPECIAL VARIABLE FOR USE WITH PAGES THAT DISPLAY A GRAPHIC AS BACKGROUND FOR THE NAV BAR
var noBackColor=false;
function addNavigationBar(color,isMemberArea)
{
  if ( isMemberArea !=null && ! isMemberArea ) 
  {
    return;
  }
  
  if (document.getElementById("mainTable")) document.getElementById("mainTable").style.top="90px";
  
  var background = "";
  if (color==null || color=="" || color=="blue") background = MAIN_MENU_BACK_COLOR_NORMAL;
  
  if (isXMAS) background = HEADER_XMAS;
  
  // DO NOT ADD XMAS GREEN TO NAV MENU FOR OTHERS
  if (color=="brown")        background = MAIN_MENU_BACK_COLOR_NORMAL = HEADER_BROWN;
  else if (color=="silver")  background = MAIN_MENU_BACK_COLOR_NORMAL = HEADER_SILVER;
  else if (color=="none")  { background = MAIN_MENU_BACK_COLOR_NORMAL = ""; noBackColor=true; }
  
  if (background != ""){
    document.getElementById('Outline').style.backgroundColor  = 
    document.getElementById(MEMBERS).style.backgroundColor    =
    document.getElementById(ADMIN).style.backgroundColor      =
    document.getElementById(EDUCATION).style.backgroundColor  =
    document.getElementById(MINISTRY).style.backgroundColor   =
    document.getElementById(COMMITTEES).style.backgroundColor =
    document.getElementById(ACTIVITIES).style.backgroundColor =
    document.getElementById(PHOTOS).style.backgroundColor     =
    document.getElementById(SITEMAP).style.backgroundColor    =
    document.getElementById(END).style.backgroundColor        =
    background ;
  }
}


//----------------------------------------------
// VARIABLES
//----------------------------------------------
var currentMenu="";
var currentSubMenu="";


// NOTE: NEEDED TO BRANCH OFF FROM MEMBERS DIRECTORY
var directoryPath = "";
if (DIR==MEMBERS){}
else if (DIR==ACTIVITIES)    { directoryPath = "../"; }
else if (DIR==ADMIN)         { directoryPath = "../"; }
else if (DIR==ARCHIVES)      { directoryPath = "../"; }
else if (DIR==COMMITTEES)    { directoryPath = "../"; }
else if (DIR==EDUCATION)     { directoryPath = "../"; }
else if (DIR==MINISTRY)      { directoryPath = "../"; }
else if (DIR==PHOTOS)        { directoryPath = "../"; }
else if (DIR==PHOTOS_1)      { directoryPath = "../../"; }
else if (DIR==ANNOUNCEMENTS) { directoryPath = "../../../"; }
else if (DIR==BLDGPIX)       { directoryPath = "../../"; }
else if (DIR==PHOTOS_2)      { directoryPath = "../../../"; }
else if (DIR==LEVEL_2)       { directoryPath = "../../"; }



var itemLevel;
function showMenuItem(menuName)
{
  // DISPLAYS THE MENU ITEMS (DROPDOWN) WHEN A MAIN ITEM IS MOUSED OVER
  if (menuName==null) return;
  hideMenuItem();
  var el = document.getElementById(menuName);
  el.style.clip="rect(0px 400px 750px 0px)";
  el.style.backgroundColor=SUB_MENU_BACK_COLOR_NORMAL;
  
  currentMenu=menuName;
}


function hideMenuItem(menuName)
{
  // HIDES SUB MENUS WHENEVER A SPECIFIC MENU IS NOT HOVERED OVER
  if (currentMenu!="")
  {
    hideSpecialMenuItems();
    
    //RESET MAIN MENU BACKGROUND TO DEFAULT
    var el = document.getElementById(currentMenu);
    el.style.clip="rect(0px 400px 30px 0px)";
    el.style.backgroundColor = MAIN_MENU_BACK_COLOR_NORMAL;
    if (noBackColor) document.getElementById(currentMenu+"_main").style.backgroundColor = MAIN_MENU_BACK_COLOR_NORMAL;

    //RESET MAIN MENU TEXT TO DEFAULT
    el = document.getElementById(currentMenu+"_main")
    el.style.fontWeight="normal";
    el.style.color = MAIN_MENU_TEXT_COLOR_NORMAL;
  }
}


function hideSpecialMenuItems()
{
  // SPECIAL MENU ITEMS ARE SUB-SUB MENUS (EG: Admin-->Annual Reports...-->**2008 & 2007** etc)
  document.getElementById(BLDGPHOTOS).style.display        = 
  document.getElementById(CHOIRPHOTOS).style.display       = 
  document.getElementById(FFPHOTOS).style.display          = 
  document.getElementById(EGGHUNTPHOTOS).style.display     = 
  document.getElementById(CAROLINGPHOTOS).style.display    = 
  document.getElementById(CHICKENPHOTOS).style.display     = 
  document.getElementById(EDUCATIONARCHIVE).style.display  =
  document.getElementById(EDUCATIONPHOTOS).style.display   = 
  document.getElementById(THIRDGRADE).style.display        = 
  document.getElementById(CONFIRMATION).style.display      =
  document.getElementById(DARTBALL).style.display          = 
  document.getElementById(SOFTBALL).style.display          = 
  document.getElementById(PHOTOS2005).style.display        = 
  document.getElementById(ANNUALREPORTS).style.display     = 
  "none";
}


function mouseOverMainItem(elem,divToShow,hasOwnPage)
{
  // MAIN ITEM IS THE ALWAYS DISPLAYED MENU ITEM (Members/Admin/Education/Ministry Teams/Committees etc)
  level=1;
  hideSpecialMenuItems();
  if (divToShow!="") { showMenuItem(divToShow); }
  elem.style.fontWeight="bold";
  elem.style.color = MAIN_MENU_TEXT_COLOR_HIGHLIGHT;
  if (noBackColor) elem.style.backgroundColor = "#000000";
  if (hasOwnPage) elem.style.cursor="pointer";
  //alert(document.getElementById(divToShow).innerHTML)
}


function mouseOverSubItem(elem,divToShow)
{
  // SUB ITEMS ARE THE MENU LISTS THAT DISPLAY AND HIDE (Under ADMIN... Council/Council Minutes/Clerk etc)
  // CAN HAVE SUB MENUS OF THEIR OWN. 
  level=2;
  if (currentSubMenu!="")
  {
    document.getElementById(currentSubMenu).style.fontWeight="normal";
    document.getElementById(currentSubMenu).style.color = SUB_MENU_TEXT_COLOR_NORMAL;
  }
  hideSpecialMenuItems();
  elem.style.cursor="pointer";
  elem.style.fontWeight="bold";
  elem.style.color = SUB_MENU_TEXT_COLOR_HIGHLIGHT;
  elem.style.backgroundColor = SUB_MENU_BACK_COLOR_HIGHLIGHT;

  currentSubMenu = elem.id;
}


function mouseOverSubSpecialItem(elem,divToShow)
{
  // SPECIAL MENU ITEMS ARE SUB MENU ITEMS THAT HAVE SUBS OF THEIR OWN (EG: Admin-->**ANNUAL REPORTS...**--> 2008/2007 etc)
  level=3;
  hideSpecialMenuItems();
  // FORMAT SUB ITEM (LEVEL 2) MENU ITEM
  elem.style.cursor="pointer";
  elem.style.fontWeight="bold";
  elem.style.color = SUB_MENU_TEXT_COLOR_HIGHLIGHT;
  elem.style.backgroundColor = SUB_SUB_MENU_BACK_COLOR_NORMAL;
  if (divToShow!="") document.getElementById(divToShow).style.display = "inline";
  currentSubMenu = elem.id;
}


var currentSubItem;
function mouseOverSpecialItem(elem,subOf,isHR)
{
//alert(elem.tagName);
  // SPECIAL ITEMS ARE SUB-SUB MENU INDIVIDUAL ITEMS (Admin-->Annual Reports...-->**2008**)
  level=4;
  if (! isHR) {
    elem.style.cursor="pointer";
    elem.style.fontWeight="bold";
    elem.style.color = SUB_SUB_MENU_TEXT_COLOR_HIGHLIGHT;
    elem.style.backgroundColor = SUB_SUB_MENU_BACK_COLOR_HIGHLIGHT;
  }
  
  if (subOf==EDUCATIONARCHIVE)     currentSubItem = document.getElementById("education6");
  else if (subOf==THIRDGRADE)      currentSubItem = document.getElementById("education7");
  else if (subOf==CONFIRMATION)    currentSubItem = document.getElementById("education8");
  else if (subOf==DARTBALL)        currentSubItem = document.getElementById("activities3");
  else if (subOf==SOFTBALL)        currentSubItem = document.getElementById("activities6");
  else if (subOf==BLDGPHOTOS)      currentSubItem = document.getElementById("photogallery1");
  else if (subOf==CHICKENPHOTOS)   currentSubItem = document.getElementById("photogallery2");
  else if (subOf==CHOIRPHOTOS)     currentSubItem = document.getElementById("photogallery3");
  else if (subOf==CAROLINGPHOTOS)  currentSubItem = document.getElementById("photogallery4");
  else if (subOf==EDUCATIONPHOTOS) currentSubItem = document.getElementById("photogallery5");
  else if (subOf==EGGHUNTPHOTOS)   currentSubItem = document.getElementById("photogallery6");
  else if (subOf==FFPHOTOS)        currentSubItem = document.getElementById("photogallery7");
  else if (subOf==PHOTOS2005)      currentSubItem = document.getElementById("photogallery8");
  else if (subOf==ANNUALREPORTS)   currentSubItem = document.getElementById("administration5");

  currentSubItem.style.fontWeight="bold";
  currentSubItem.style.color=SUB_MENU_TEXT_COLOR_HIGHLIGHT;
  currentSubItem.style.backgroundColor = SUB_SUB_MENU_BACK_COLOR_NORMAL;
}


function mouseOutItem(elem)
{
  elem.style.fontWeight = "normal";
  elem.style.color = SUB_MENU_TEXT_COLOR_NORMAL;
  if (level==4) {
    // CURSOR WAS OVER A SUB-SUB MENU
    elem.style.backgroundColor = SUB_SUB_MENU_BACK_COLOR_NORMAL;
    currentSubItem.style.backgroundColor = SUB_MENU_BACK_COLOR_NORMAL;
    currentSubItem.style.fontWeight = "normal";
  }
  else elem.style.backgroundColor = SUB_MENU_BACK_COLOR_NORMAL;
}



function getMainItem(ID,hrefIn,showMenu,displayText)
{
  var text = getMenuItem(ID+"_main",hrefIn,showMenu,displayText,MAIN_ITEM,true);
  //text += "<br/>";
  return text;
}


function getSubItem(ID,hrefIn,displayText)
{
  return getMenuItem(ID,hrefIn,SUB_MENU,displayText,SUB_ITEM,false);
}


function getSubSpecialItem(ID,hrefIn,showSubMenu,displayText)
{
  return getMenuItem(ID,hrefIn,showSubMenu,displayText,SUB_SPECIAL_ITEM,false);
}


function getSpecialItem(ID,hrefIn,subOf,displayText)
{
  return getMenuItem(ID,hrefIn,subOf,displayText,SPECIAL_ITEM,false);
}


function getMenuItem(ID,hrefIn,showMenu,displayText,itemType,isMain)
{
  var text = "";
  text += "<div id='"+ID+"' ";
  if (! hrefIn=="")
  {
	  text += " onclick='document.location.href=\""+directoryPath+hrefIn+"\";'";
  }
  if (itemType==MAIN_ITEM)
  {
    text += " onMouseOver='mouseOverMainItem(this,\""+showMenu+"\",true);' ";
    text += " style='padding:5px;padding-bottom:12px;' ";
  }
  else if (itemType==SUB_ITEM)
  {
    text += " onMouseOver='mouseOverSubItem(this,\""+showMenu+"\");' ";
    text += " style='padding-top:5px;padding-bottom:5px;padding-left:5px;' ";
  }
  else if (itemType==SUB_SPECIAL_ITEM)
  {
    text += " onMouseOver='mouseOverSubSpecialItem(this,\""+showMenu+"\");' ";
    text += " style='padding-top:5px;padding-bottom:5px;padding-left:5px;' ";
  }
  else if (itemType==SPECIAL_ITEM)
  {
    text += " onMouseOver='mouseOverSpecialItem(this,\""+showMenu+"\");' ";
    text += " style='padding-top:5px;padding-bottom:5px;padding-left:5px;' ";
  }
  else
  {
    alert("Undefined Menu");
  }
  if (isMain) { text+=">"; }
  else {text += " onMouseOut='mouseOutItem(this);'>"; }
  text += displayText
  text += "</div>";
  //alert(text);
  return text;
}


/*-----------------------------------------------------------
  BASE/MEMBER MENU
-------------------------------------------------------------*/

function getMemberMenuItems()
{
var i=0;
var memberText = "";
memberText += "<div id='"+MEMBERS+"' class='topmenu' style='padding-bottom:10px;'>";
memberText += getMainItem(MEMBERS,"",MEMBERS,"&nbsp;&nbsp;Members");
memberText += getSubItem(MEMBERS+(++i),"member_index.htm","&bull; Member Home");
memberText += getSubItem(MEMBERS+(++i),"../index.htm","&bull; Web Home");
memberText += getSubItem(MEMBERS+(++i),"calendars/"+currYear+"_"+currMonth+"_calendar.htm","&bull; Monthly Calendar");
memberText += getSubItem(MEMBERS+(++i),"../eventcalendar.htm","&bull; Event Calendar");
memberText += getSubItem(MEMBERS+(++i),"administration/announcements/index.htm","&bull; Announcements");
memberText += getSubItem(MEMBERS+(++i),"pastorspage.htm","&bull; Pastors Page");
memberText += getSubItem(MEMBERS+(++i),"ministry/sermon_index.htm","&bull; Sermons");
memberText += getSubItem(MEMBERS+(++i),"newsletters.htm","&bull; Newsletters");
memberText += getSubItem(MEMBERS+(++i),"toc.htm","&bull; Table of Contents");
memberText += "</div>";
return memberText;
}


/*-----------------------------------------------------------
  ADMINISTRATION MENU
-------------------------------------------------------------*/

function getAdminMenuItems()
{
i=0;
var adminText = "";
adminText += "<div id='"+ADMIN+"' class='topmenu' style='padding-bottom:10px;'>";
adminText += getMainItem(ADMIN,"",ADMIN,"Admin");
adminText += getSubItem(ADMIN+(++i),"administration/council.htm","&bull; Council");
adminText += getSubItem(ADMIN+(++i),"administration/council_minutes.htm","&bull; Council Minutes");
adminText += getSubItem(ADMIN+(++i),"administration/clerk.htm","&bull; Clerk");
adminText += getSubItem(ADMIN+(++i),"administration/treasurer.htm","&bull; Treasurer");
adminText += "<hr/>";
adminText += getSubSpecialItem(ADMIN+(++i),"",ANNUALREPORTS,"&bull; Annual Reports...");
adminText += getSubItem(ADMIN+(++i),"administration/documents/constitution.htm","&bull; Constitution");
adminText += getSubItem(ADMIN+(++i),"administration/documents/bylawsAppendix.htm","&bull; By-Laws");
adminText += getSubItem(ADMIN+(++i),"administration/documents/adminstructure.htm","&bull; Admin Structure");
adminText += "</div>";
return adminText;
}

function getAdminMenu_AnnualReportsSubMenuItems()
{
i=0;
var adminARText = "";
adminARText += "<div id='"+ANNUALREPORTS+"' class='topmenu' >";
adminARText += getSpecialItem(ANNUALREPORTS+(++i),"administration/2008_reports.htm",ANNUALREPORTS,"&bull;&nbsp;&nbsp;&nbsp;&nbsp;2008");
adminARText += getSpecialItem(ANNUALREPORTS+(++i),"administration/2007_reports.htm",ANNUALREPORTS,"&bull;&nbsp;&nbsp;&nbsp;&nbsp;2007");
adminARText += "</div>";
return adminARText ;
}


/*-----------------------------------------------------------
  EDUCATION MENU
-------------------------------------------------------------*/

function getEducationMenuItems()
{
i=0;
var edText = "";
edText += "<div id='"+EDUCATION+"' class='topmenu' style='padding-bottom:10px;'>";
edText += getMainItem(EDUCATION,"",EDUCATION,"Education");
edText += getSubItem(EDUCATION+(++i),"education/index.htm","&bull; Education Home");
edText += getSubItem(EDUCATION+(++i),"education/resources.htm","&bull; Resources");
edText += getSubItem(EDUCATION+(++i),"education/2007_2008_calendar.htm","&bull; 2007 Calendar");
edText += getSubItem(EDUCATION+(++i),"education/2007_2008_education_staff.htm","&bull; 2007 Staff");
edText += getSubItem(EDUCATION+(++i),"education/aboutJackie.htm","&bull; About Jackie");
edText += getSubSpecialItem(EDUCATION+(++i),"",EDUCATIONARCHIVE,"&bull; Archives...");
edText += "<hr onmouseover='hideSpecialMenuItems()'/>";
edText += getSubSpecialItem(EDUCATION+(++i),"",THIRDGRADE,"&bull; 3rd Grade Class...");
edText += getSubSpecialItem(EDUCATION+(++i),"",CONFIRMATION,"&bull; Confirmation...");
edText += "</div>";
return edText;
}


function getEducationMenu_ThirdGradeSubMenuItems()
{
i=0;
var ed3rdText = "";
ed3rdText += "<div id='"+THIRDGRADE+"' class='topmenu' >";
ed3rdText += getSpecialItem(THIRDGRADE+(++i),"education/3rd_grade.htm",THIRDGRADE,"&bull; Class Page");
ed3rdText += getSpecialItem(THIRDGRADE+(++i),"education/3rd_grade/roving_reporter.htm",THIRDGRADE,"&bull; Current Roving Reporter");
ed3rdText += getSpecialItem(THIRDGRADE+(++i),"education/3rd_grade/roving_reporter_v108.htm",THIRDGRADE,"&bull; Roving Reporter 1/6/2008");
ed3rdText += getSpecialItem(THIRDGRADE+(++i),"education/3rd_grade/roving_reporter_v107v2.htm",THIRDGRADE,"&bull; Roving Reporter 11/4/2007");
ed3rdText += getSpecialItem(THIRDGRADE+(++i),"education/3rd_grade/roving_reporter_v107v1.htm",THIRDGRADE,"&bull; Roving Reporter 10/28/2007");
ed3rdText += "</div>";
return ed3rdText;
}

function getEducationMenu_ArchiveSubMenuItems()
{
i=0;
var edArchiveText = "";
edArchiveText += "<div id='"+EDUCATIONARCHIVE+"' class='topmenu' >";
edArchiveText += getSpecialItem(EDUCATIONARCHIVE+(++i),"education/2006_2007_calendar.htm",EDUCATIONARCHIVE,"&bull; 2006-07 Calendar");
edArchiveText += getSpecialItem(EDUCATIONARCHIVE+(++i),"education/2006_2007_education_staff.htm",EDUCATIONARCHIVE,"&bull; 2006-07 Staff");
edArchiveText += "</div>";
return edArchiveText;
}

function getEducationMenu_ConfirmationSubMenuItems()
{
i=0;
var edConfText = "";
edConfText += "<div id='"+CONFIRMATION+"' class='topmenu' >";
edConfText += getSpecialItem(CONFIRMATION+(++i),"photogallery/confirmation/2009_confirmation.htm",CONFIRMATION,"&bull; 2009 Class");
edConfText += getSpecialItem(CONFIRMATION+(++i),"photogallery/confirmation/2008_confirmation.htm",CONFIRMATION,"&bull; 2008 Class");
edConfText += "</div>";
return edConfText ;
}



/*-----------------------------------------------------------
  MINISTRY TEAM MENU
-------------------------------------------------------------*/

function getMinistryMenuItems()
{
i=0;
var ministryText = "";
ministryText += "<div id='"+MINISTRY+"' class='topmenu' style='padding-bottom:10px;'>";
ministryText += getMainItem(MINISTRY,"",MINISTRY,"Ministry Teams");
ministryText += getSubItem(MINISTRY+(++i),"ministry/buildingsandgrounds.htm","&bull; Buildings & Grounds");
ministryText += getSubItem(MINISTRY+(++i),"ministry/comfortTeam.htm","&bull; Comfort Team");
ministryText += getSubItem(MINISTRY+(++i),"ministry/congregationallife.htm","&bull; Congregational Life");
ministryText += getSubItem(MINISTRY+(++i),"ministry/hospitality.htm","&bull; Hospitality");
ministryText += getSubItem(MINISTRY+(++i),"ministry/nurture.htm","&bull; Nurture");
ministryText += getSubItem(MINISTRY+(++i),"ministry/outreach.htm","&bull; Outreach");
ministryText += getSubItem(MINISTRY+(++i),"ministry/worship.htm","&bull; Worship & Music");
ministryText += "</div>";
return ministryText;
}


/*-----------------------------------------------------------
  COMMITTEE MENU
-------------------------------------------------------------*/

function getCommitteeMenuItems()
{
i=0;
var commText = "";
commText += "<div id='"+COMMITTEES+"' class='topmenu' style='padding-bottom:10px;'>";
commText += getMainItem(COMMITTEES,"",COMMITTEES,"Committees");
commText += getSubItem(COMMITTEES+(++i),"committees/finance.htm","&bull; Finance & Stewarship");
commText += getSubItem(COMMITTEES+(++i),"committees/heritage.htm","&bull; Heritage");
commText += getSubItem(COMMITTEES+(++i),"committees/memorial.htm","&bull; Memorial");
commText += getSubItem(COMMITTEES+(++i),"committees/pastoralrelations.htm","&bull; Pastoral Relations");
commText += getSubItem(COMMITTEES+(++i),"committees/personnel.htm","&bull; Personnel");
commText += "<hr/>";
commText += getSubItem(COMMITTEES+(++i),"committees/building.htm","&bull; Building");
commText += getSubItem(COMMITTEES+(++i),"committees/capitalcampaign.htm","&bull; Capital Campaign");
commText += getSubItem(COMMITTEES+(++i),"committees/fallfestival_2008.htm","&bull; Fall Festival");
commText += "<hr/>";
commText += getSubItem(COMMITTEES+(++i),"committees/foundation.htm","&bull; Foundation");
commText += getSubItem(COMMITTEES+(++i),"committees/scholarship.htm","&bull; Scholarship");
commText += "</div>";
return commText;
}


/*-----------------------------------------------------------
  ACTIVITY MENU
-------------------------------------------------------------*/

function getActivityMenuItems()
{
i=0;
var actText = "";
actText += "<div id='"+ACTIVITIES+"' class='topmenu' style='padding-bottom:10px;'>";
actText += getMainItem(ACTIVITIES,"",ACTIVITIES,"Activities");
actText += getSubItem(ACTIVITIES+(++i),"activities/choirs.htm","&bull; Choirs");
actText += getSubItem(ACTIVITIES+(++i),"activities/cornerstone.htm","&bull; Cornerstone Praise Band");
actText += getSubSpecialItem(ACTIVITIES+(++i),"activities/dartball.htm",DARTBALL,"&bull; Dartball...");
actText += getSubItem(ACTIVITIES+(++i),"activities/keystone.htm","&bull; Keystone Men's Ministry");
actText += getSubItem(ACTIVITIES+(++i),"activities/rachelcircle2009.htm","&bull; Rachel Circle");
actText += getSubSpecialItem(ACTIVITIES+(++i),"activities/softball_2009.htm",SOFTBALL,"&bull; Softball Team...");
actText += getSubItem(ACTIVITIES+(++i),"activities/youth_musical_2009.htm","&bull; Youth Musical");
actText += "<hr/>";
actText += getSubItem(ACTIVITIES+(++i),"activities/chickenDinner2008.htm","&bull; Chicken Dinner");
actText += getSubItem(ACTIVITIES+(++i),"photogallery/christmasCaroling/20071209_caroling.htm","&bull; Christmas Caroling");
actText += getSubItem(ACTIVITIES+(++i),"activities/fallfestival_2008.htm","&bull; Fall Festival");
actText += getSubItem(ACTIVITIES+(++i),"activities/wintercamping.htm","&bull; Winter Camping");
actText += "</div>";
return actText;
}


function getActivityMenu_dartballSubMenuItems()
{
i=0;
var text = "";
text += "<div id='"+DARTBALL+"' class='topmenu' onmouseover='mouseOverSpecialItem(this,\"activities_dartball\",true)'>";
text += getSpecialItem(DARTBALL+(++i),"activities/dartball.htm",DARTBALL,"&bull; 2008-09 Team Page");
text += getSpecialItem(DARTBALL+(++i),"activities/dartball.htm#league",DARTBALL,"&bull; Standings");
text += getSpecialItem(DARTBALL+(++i),"activities/dartball.htm#results",DARTBALL,"&bull; Contest Results");
text += getSpecialItem(DARTBALL+(++i),"activities/dartball.htm#remain",DARTBALL,"&bull; Remaining Games");
text += getSpecialItem(DARTBALL+(++i),"activities/dartball.htm#roster",DARTBALL,"&bull; Roster");
text += "<hr/>";
text += getSpecialItem(DARTBALL+(++i),"photogallery/dartball/2005_2006.htm",DARTBALL,"&bull; Photo Gallery");
text += "<hr/>";
text += getSpecialItem(DARTBALL+(++i),"activities/dartball_2007_2008.htm",DARTBALL,"&bull; 2007-08 Team Page");
text += getSpecialItem(DARTBALL+(++i),"activities/dartball_2006_2007.htm",DARTBALL,"&bull; 2006-07 Team Page");
text += getSpecialItem(DARTBALL+(++i),"activities/dartball_2005_2006.htm",DARTBALL,"&bull; 2005-06 Team Page");
text += "<div style='padding-top:7px;'> </div>";
text += "</div>";
return text;
}


function getActivityMenu_softballSubMenuItems()
{
i=0;
var text = "";
text += "<div onmouseover='mouseOverSpecialItem(this,\"activities_softball\",true)' id='"+SOFTBALL+"' class='topmenu' >";
text += getSpecialItem(SOFTBALL+(++i),"activities/softball_2009.htm",SOFTBALL,"&bull; 2009 Team Page");
text += getSpecialItem(SOFTBALL+(++i),"activities/softball_2009.htm#league",SOFTBALL,"&bull; Standings");
text += getSpecialItem(SOFTBALL+(++i),"activities/softball_2009.htm#results",SOFTBALL,"&bull; Contest Results");
text += getSpecialItem(SOFTBALL+(++i),"activities/softball_2009.htm#remain",SOFTBALL,"&bull; Remaining Games");
text += getSpecialItem(SOFTBALL+(++i),"activities/softball_2009.htm#roster",SOFTBALL,"&bull; Roster");
text += "<hr>";
text += getSpecialItem(SOFTBALL+(++i),"activities/softball_2008.htm",SOFTBALL,"&bull; 2008 Team Page");
text += "<div style='padding-top:7px;'> </div>";
text += "</div>";
//alert(text);
return text;
}



/*-----------------------------------------------------------
  PHOTO GALLERY MENU
-------------------------------------------------------------*/

function getPhotoMenuItems()
{
i=0;
var photoText = "";
photoText += "<div id='"+PHOTOS+"' class='topmenu' style='padding-bottom:10px;'>";
photoText += getMainItem(PHOTOS,"",PHOTOS,"Photo Galleries");
photoText += getSubSpecialItem(PHOTOS+(++i),"",BLDGPHOTOS,"&bull; Building...");
photoText += getSubSpecialItem(PHOTOS+(++i),"photogallery/chicken_dinner/20070324_cnb_dinner.htm",CHICKENPHOTOS,"&bull; Chicken Dinner...");
photoText += getSubSpecialItem(PHOTOS+(++i),"photogallery/choirs/20080316_youth_choir.htm",CHOIRPHOTOS,"&bull; Choirs...");
photoText += getSubSpecialItem(PHOTOS+(++i),"photogallery/christmasCaroling/20071209_caroling.htm",CAROLINGPHOTOS,"&bull; Christmas Caroling...");
photoText += getSubSpecialItem(PHOTOS+(++i),"",EDUCATIONPHOTOS,"&bull; Education...");
photoText += getSubSpecialItem(PHOTOS+(++i),"photogallery/easterEggHunt/20060408_eggHunt.htm",EGGHUNTPHOTOS,"&bull; Easter Egg Hunts...");
photoText += getSubSpecialItem(PHOTOS+(++i),"photogallery/fallfestival/20070922_ff_gallery_1.htm",FFPHOTOS,"&bull; Fall Festival...");
photoText += getSubSpecialItem(PHOTOS+(++i),"",PHOTOS2005,"&bull; 2005 Photos...");
photoText += "<hr onmouseover='hideSpecialMenuItems();' />";
photoText += getSubItem(PHOTOS+(++i),"photogallery/youth/musical/20090401_rehearsal.htm","&bull; Youth Musical Rehearsals 2009");
photoText += getSubItem(PHOTOS+(++i),"photogallery/activities/20080831_medema_concert.htm","&bull; Ken Medema Concert - 8/31/2008");
photoText += getSubItem(PHOTOS+(++i),"photogallery/hangingGreens/20071202_greens.htm","&bull; Hanging of the Greens - 12/02/2007");
photoText += getSubItem(PHOTOS+(++i),"activities/picnic2006.htm","&bull; Picnic - 8/13/2006");
photoText += getSubItem(PHOTOS+(++i),"photogallery/parade/july4thparade2006.htm","&bull; Parade - July 4, 2006");
photoText += getSubItem(PHOTOS+(++i),"photogallery/cornerstone/20060615_concert.htm","&bull; Cornerstone Concert - 6/16/2006");
photoText += getSubItem(PHOTOS+(++i),"photogallery/adultgroup/20060420_adultgroup.htm","&bull; Adult Discussion Group - 4/20/2006");
photoText += "</div>";
return photoText;
}


function getPhotoMenu_bldgSubMenuItems()
{
i=0;
var menuText = "";
menuText += "<div id='"+BLDGPHOTOS+"' class='topmenu' >";
menuText += getSpecialItem(BLDGPHOTOS+(++i),"photogallery/building/20090412_cross.htm",BLDGPHOTOS,"&bull; 2009-Apr-12 (Easter Cross)");
menuText += getSpecialItem(BLDGPHOTOS+(++i),"photogallery/building/20080203_cross.htm",BLDGPHOTOS,"&bull; 2008-Feb-3 (Lent Cross)");
menuText += getSpecialItem(BLDGPHOTOS+(++i),"committees/buildingPictures/20070908_exterior.htm",BLDGPHOTOS,"&bull; 2007-Sept-8 (Building)");
menuText += getSpecialItem(BLDGPHOTOS+(++i),"committees/buildingPictures/20070908_garage_raising.htm",BLDGPHOTOS,"&bull; 2007-Sept-8 (Garage)");
menuText += getSpecialItem(BLDGPHOTOS+(++i),"committees/buildingPictures/20070121_building_construction_1.htm",BLDGPHOTOS,"&bull; 2007-Jan-21");
menuText += getSpecialItem(BLDGPHOTOS+(++i),"committees/buildingPictures/20070109_chairs_kitchen.htm",BLDGPHOTOS,"&bull; 2007-Jan-9 (Chairs)");
menuText += getSpecialItem(BLDGPHOTOS+(++i),"committees/buildingPictures/20061231_building_construction_upper_1.htm",BLDGPHOTOS,"&bull; 2006-Dec-31");
menuText += getSpecialItem(BLDGPHOTOS+(++i),"committees/buildingPictures/20061210_last_service.htm",BLDGPHOTOS,"&bull; 2006-Dec-10 (Last Service)");
menuText += getSpecialItem(BLDGPHOTOS+(++i),"committees/buildingPictures/20061210_piano.htm",BLDGPHOTOS,"&bull; 2006-Dec-10 (Piano Move)");
menuText += getSpecialItem(BLDGPHOTOS+(++i),"committees/buildingPictures/20061203_building_construction_upper.htm",BLDGPHOTOS,"&bull; 2006-Dec-3");
menuText += getSpecialItem(BLDGPHOTOS+(++i),"committees/buildingPictures/20061119_building_construction_exterior_1.htm",BLDGPHOTOS,"&bull; 2006-Nov-19");
menuText += getSpecialItem(BLDGPHOTOS+(++i),"committees/buildingPictures/20061015_building_construction.htm",BLDGPHOTOS,"&bull; 2006-Oct-15");
menuText += getSpecialItem(BLDGPHOTOS+(++i),"committees/buildingPictures/20060927_building_construction.htm",BLDGPHOTOS,"&bull; 2006-Sept-27");
menuText += getSpecialItem(BLDGPHOTOS+(++i),"committees/buildingPictures/20060924_building_construction.htm",BLDGPHOTOS,"&bull; 2006-Sept-24");
menuText += getSpecialItem(BLDGPHOTOS+(++i),"committees/buildingPictures/20060903_building_construction.htm",BLDGPHOTOS,"&bull; 2006-Sept-3");
menuText += getSpecialItem(BLDGPHOTOS+(++i),"committees/buildingPictures/20060822_building_construction.htm",BLDGPHOTOS,"&bull; 2006-August-22");
menuText += getSpecialItem(BLDGPHOTOS+(++i),"committees/buildingPictures/20060816_building_construction.htm",BLDGPHOTOS,"&bull; 2006-August-16");
menuText += getSpecialItem(BLDGPHOTOS+(++i),"committees/buildingPictures/20060708_building_construction.htm",BLDGPHOTOS,"&bull; 2006-July-8");
menuText += getSpecialItem(BLDGPHOTOS+(++i),"committees/buildingPictures/20060610_building_construction.htm",BLDGPHOTOS,"&bull; 2006-June-10 (Building)");
menuText += getSpecialItem(BLDGPHOTOS+(++i),"committees/buildingPictures/20060610_kitchen_wall.htm",BLDGPHOTOS,"&bull; 2006-June-10 (Kitchen)");
menuText += getSpecialItem(BLDGPHOTOS+(++i),"committees/buildingPictures/20060521_building_construction.htm",BLDGPHOTOS,"&bull; 2006-May-21");
menuText += getSpecialItem(BLDGPHOTOS+(++i),"committees/buildingPictures/20060430_groundbreaking.htm",BLDGPHOTOS,"&bull; 2006-April-30 (Groundbreaking)");
menuText += "</div>";
return menuText ;
}


function getPhotoMenu_choirSubMenuItems()
{
i=0;
var photoText = "";
photoText += "<div id='"+CHOIRPHOTOS+"' class='topmenu' >";
photoText += getSpecialItem(CHOIRPHOTOS+(++i),"photogallery/choirs/20080316_youth_choir.htm",CHOIRPHOTOS,"&bull; 2008-Mar-16 (3/4/5 Grades)");
photoText += getSpecialItem(CHOIRPHOTOS+(++i),"photogallery/choirs/20071104_youth_choir.htm",CHOIRPHOTOS,"&bull; 2007-Nov-4 (Pre & K)");
photoText += getSpecialItem(CHOIRPHOTOS+(++i),"photogallery/choirs/20070408_choir.htm",CHOIRPHOTOS,"&bull; 2007-Apr-8 (Easter-Both)");
photoText += getSpecialItem(CHOIRPHOTOS+(++i),"photogallery/choirs/20070325_teen.htm",CHOIRPHOTOS,"&bull; 2007-March-25 (Teen)");
photoText += getSpecialItem(CHOIRPHOTOS+(++i),"photogallery/choirs/20070128_childrens_choir.htm",CHOIRPHOTOS,"&bull; 2007-Jan-28 (Youth)");
photoText += getSpecialItem(CHOIRPHOTOS+(++i),"photogallery/choirs/20061224_choir.htm",CHOIRPHOTOS,"&bull; 2006-Dec-24 (Youth)");
photoText += getSpecialItem(CHOIRPHOTOS+(++i),"photogallery/choirs/20060927_youth_choir_practice.htm",CHOIRPHOTOS,"&bull; 2006-Sept-27 (Kids Practice)");
photoText += getSpecialItem(CHOIRPHOTOS+(++i),"photogallery/choirs/20060430_choir.htm",CHOIRPHOTOS,"&bull; 2006-April-30 (Easter-Both)");
photoText += getSpecialItem(CHOIRPHOTOS+(++i),"photogallery/choirs/20060416_choir.htm",CHOIRPHOTOS,"&bull; 2006-April-16 (Both)");
photoText += getSpecialItem(CHOIRPHOTOS+(++i),"photogallery/choirs/20050327_choir.htm",CHOIRPHOTOS,"&bull; 2005-March-27 (Both)");
photoText += "</div>";
return photoText;
}


function getPhotoMenu_fallFestivalSubMenuItems()
{
i=0;
var menuText = "";
menuText += "<div id='"+FFPHOTOS+"' class='topmenu' >";
menuText += getSpecialItem(FFPHOTOS+(++i),"photogallery/fallfestival/20070922_ff_gallery_1.htm",FFPHOTOS,"&bull; 2007 Galleries");
menuText += getSpecialItem(FFPHOTOS+(++i),"photogallery/fallfestival/20060923_ff_1.htm",FFPHOTOS,"&bull; 2006 Galleries");
menuText += getSpecialItem(FFPHOTOS+(++i),"photogallery/fallfestival/20050924_ff_1.htm",FFPHOTOS,"&bull; 2005 Galleries");
menuText += "</div>";
return menuText ;
}


function getPhotoMenu_eggHuntSubMenuItems()
{
i=0;
var menuText = "";
menuText += "<div id='"+EGGHUNTPHOTOS+"' class='topmenu' >";
menuText += getSpecialItem(EGGHUNTPHOTOS+(++i),"photogallery/easterEggHunt/20060408_eggHunt.htm",EGGHUNTPHOTOS,"&bull; Egg Hunt 2006");
menuText += getSpecialItem(EGGHUNTPHOTOS+(++i),"photogallery/easterEggHunt/20050319_eggHunt.htm",EGGHUNTPHOTOS,"&bull; Egg Hunt 2005");
menuText += "</div>";
return menuText ;
}

function getPhotoMenu_carolingSubMenuItems()
{
i=0;
var menuText = "";
menuText += "<div id='"+CAROLINGPHOTOS+"' class='topmenu' >";
menuText += getSpecialItem(CAROLINGPHOTOS+(++i),"photogallery/christmasCaroling/20071209_caroling.htm",CAROLINGPHOTOS,"&bull; Caroling 2007");
menuText += getSpecialItem(CAROLINGPHOTOS+(++i),"photogallery/christmasCaroling/20071209_caroling_church.htm",CAROLINGPHOTOS,"&bull; At the Church 2007");
menuText += getSpecialItem(CAROLINGPHOTOS+(++i),"photogallery/christmasCaroling/20061215_caroling.htm",CAROLINGPHOTOS,"&bull; Caroling 2006");
menuText += getSpecialItem(CAROLINGPHOTOS+(++i),"photogallery/christmasCaroling/20051216_caroling.htm",CAROLINGPHOTOS,"&bull; Caroling 2005");
menuText += "</div>";
return menuText ;
}

function getPhotoMenu_cnbSubMenuItems()
{
i=0;
var menuText = "";
menuText += "<div id='"+CHICKENPHOTOS+"' class='topmenu' >";
menuText += getSpecialItem(CHICKENPHOTOS+(++i),"photogallery/chicken_dinner/20070324_cnb_dinner.htm",CHICKENPHOTOS,"&bull; Chicken Dinner 2007");
menuText += getSpecialItem(CHICKENPHOTOS+(++i),"photogallery/chicken_dinner/20060318_cnb_dinner.htm",CHICKENPHOTOS,"&bull; Chicken Dinner 2006");
menuText += getSpecialItem(CHICKENPHOTOS+(++i),"photogallery/chicken_dinner/20050327_cnb_dinner.htm",CHICKENPHOTOS,"&bull; Chicken Dinner 2005");
menuText += "</div>";
return menuText ;
}

function getPhotoMenu_2005SubMenuItems()
{
i=0;
var menuText = "";
menuText += "<div id='"+PHOTOS2005+"' class='topmenu' >";
menuText += getSpecialItem(PHOTOS2005+(++i),"photogallery/activities/20051224_christmasEve.htm",PHOTOS2005,"&bull; Christmas Eve 2005");
menuText += getSpecialItem(PHOTOS2005+(++i),"photogallery/youth/christmasPageant/20051218_pageant.htm",PHOTOS2005,"&bull; Christmas Pageant 2005");
menuText += getSpecialItem(PHOTOS2005+(++i),"photogallery/activities/200512_cookie_bake.htm",PHOTOS2005,"&bull; Cookie Bake 2005");
menuText += "</div>";
return menuText ;
}

function getPhotoMenu_educationSubMenuItems()
{
i=0;
var menuText = "";
menuText += "<div id='"+EDUCATIONPHOTOS+"' class='topmenu' >";
menuText += getSpecialItem(EDUCATIONPHOTOS+(++i),"photogallery/education/20060514_ss.htm",EDUCATIONPHOTOS,"&bull; May 14, 2006 (Year End)");
menuText += getSpecialItem(EDUCATIONPHOTOS+(++i),"photogallery/education/20050515_ss.htm",EDUCATIONPHOTOS,"&bull; May 15, 2005 (Year End)");
menuText += "</div>";
return menuText ;
}




/*-----------------------------------------------------------
  SITE MAP MENU
-------------------------------------------------------------*/
function getSiteMapMenuItems()
{
i=0;
var siteMapText = "";
siteMapText += "<div id='"+SITEMAP+"' class='topmenu' style='padding-bottom:10px;'>";
siteMapText += getMainItem(SITEMAP,"toc.htm",SITEMAP,"Site Map");
siteMapText += getSubItem(SITEMAP+(++i),"../index.htm","&bull; Web Home");
siteMapText += getSubItem(SITEMAP+(++i),"member_index.htm","&bull; Members Home");
siteMapText += getSubItem(SITEMAP+(++i),"toc.htm","&bull; Table of Contents");
siteMapText += "</div>";
return siteMapText;
}


function getEnd()
{
i=0;
var endText = "";
endText += "<div id='"+END+"' class='topmenu' onmouseover='hideMenuItem();'>";
endText += "</div>";
return endText ;
}


/*-----------------------------------------------------------
  SET MENU FUNCTION - SET THE DATA IN THE PAGE
-------------------------------------------------------------*/
function setMenu()
{
var allText = "";
allText += getMemberMenuItems();
allText += getAdminMenuItems();
allText += getAdminMenu_AnnualReportsSubMenuItems();
allText += getEducationMenuItems();
allText += getEducationMenu_ThirdGradeSubMenuItems();
allText += getEducationMenu_ArchiveSubMenuItems();
allText += getEducationMenu_ConfirmationSubMenuItems();
allText += getMinistryMenuItems();
allText += getCommitteeMenuItems();
allText += getActivityMenuItems();
allText += getActivityMenu_dartballSubMenuItems();
allText += getActivityMenu_softballSubMenuItems();
allText += getPhotoMenuItems();
allText += getPhotoMenu_bldgSubMenuItems();
allText += getPhotoMenu_cnbSubMenuItems();
allText += getPhotoMenu_carolingSubMenuItems();
allText += getPhotoMenu_choirSubMenuItems();
allText += getPhotoMenu_eggHuntSubMenuItems();
allText += getPhotoMenu_fallFestivalSubMenuItems();
allText += getPhotoMenu_2005SubMenuItems();
allText += getPhotoMenu_educationSubMenuItems();
allText += getSiteMapMenuItems();
allText += getEnd();

document.write(allText);
document.write("<div id='Outline'>&nbsp;</div><br />");
}



