//401(k) Plan Menu
// ** BEGIN OUTLINE AUTHOR-ADUSTABLE SPECIFICATIONS **//
// size of horizontal indent per level
var indentPixels = 20

// art files and sizes for three widget styles
// (all three widgets must have same height/width)
var collapsedWidget = "images/plus.gif"
var expandedWidget = "images/minus.gif"
var endpointWidget = "images/spacer.gif"
var widgetWidth = 12
var widgetHeight = 12

// Target for documents loaded when user clicks on a link.
// Specify your target frame name here.
// var displayTarget = "_parent"

var db = new Array()

// ***************************the following are specific MENU ITEMS for different pages***************************
// Create array object containing outline content and attributes.
// To adapt outline for your use, modify this table.
// Start the array with [1], and continue without gaps to your last item.
// The order of the five parameters:
//    1. Boolean (true or false) whether _next_ item is indented.
//    2. String to display in outline entry (including <FONT> or style tags).
//    3. frame TARGET of the link (must be "" if URL is "")
//    4. URL of link for outline entry; Use empty string ("") for no link
//    5. Integer of indentation level (0 is leftmost margin level)
//    6. String for status line during onMouseOver (apostrophes require \\')

function accountInfoMenu() {
	db[1]  = new dbRecord(false,"<FONT COLOR=white>Home</FONT>",                    "_parent",  "http://www.entind-401kplan.com",       0,"401k Plan Home Page")
	db[2]  = new dbRecord(false,"","","",0,"")
	db[3]  = new dbRecord(false, "<FONT COLOR=white>Plan Introduction</FONT>",      "_parent",  "http://www.data-server.info/401kPlan/401_Intro.asp",  0,"401k Plan Intoduction")
	db[4]  = new dbRecord(false,"","","",0,"")
	db[5]  = new dbRecord(false,"<FONT COLOR=white>Participating Local Affiliations</FONT>","_parent",  "http://www.data-server.info/401kPlan/UN_main.asp",     0,"Participating Affiliates")
	db[6]  = new dbRecord(false,"","","",0,"")
	db[7]  = new dbRecord(false,"<FONT COLOR=white>Investment Options</FONT>",      "_parent",  "http://www.entind-401kplan.com/invest-main.htm",0,"Investment Options")
	db[8] = new dbRecord(false,"","","",0,"")
	db[9] = new dbRecord(false,"<FONT COLOR=WHITE>Fees</FONT>",                    "_parent",   "http://www.entind-401kplan.com/fees-main.htm",0,"Administration Fees")
	db[10] = new dbRecord(false,"","","",0,"")
	db[11] = new dbRecord(false,"<FONT COLOR=white>Contact Us</FONT>",              "_parent",  "http://www.entind-401kplan.com/co-main.htm",     0,"Contact Us")
	db[12] = new dbRecord(false,"","","",0,"")
	db[13] = new dbRecord(false,"<FONT COLOR=white>Summary Plan Description</FONT>","_parent",  "http://www.entind-401kplan.com/pdf/401kSPD.PDF",    0,"Summary Plan Description")
	db[14] = new dbRecord(false,"","","",0,"")
	db[15] = new dbRecord(false,"<FONT COLOR=white>Forms</FONT>",               		"_parent",  "http://www.entind-401kplan.com/fo-main.htm",     0,"Forms")
}

function mainMenu() {
	db[1]  = new dbRecord(false,"<FONT COLOR=WHITE>Home</FONT>",                    "_parent",   "http://www.entind-401kplan.com",      0,"401k Plan Home Page")
	db[2]  = new dbRecord(false,"","","",0,"")
	db[3]  = new dbRecord(false,"<FONT COLOR=WHITE>Member Login</FONT>",            "_parent",  "https://www.entind-401kplan.com/ai-login-main.php",0,"Member Login")
	db[4]  = new dbRecord(false,"","","",0,"")
	db[5]  = new dbRecord(false, "<FONT COLOR=WHITE>Plan Introduction</FONT>",      "_parent",   "http://www.data-server.info/401kPlan/401_Intro.asp", 0,"401k Plan Intoduction")
	db[6]  = new dbRecord(false,"","","",0,"")
	db[7]  = new dbRecord(false,"<FONT COLOR=WHITE>Participating Local Affiliations</FONT>","_parent",   "http://www.data-server.info/401kPlan/UN_main.asp",    0,"Participating Affiliates")
	db[8]  = new dbRecord(false,"","","",0,"")
	db[9]  = new dbRecord(false,"<FONT COLOR=WHITE>Investment Options</FONT>",      "_parent",   "http://www.entind-401kplan.com/invest-main.htm",0,"Investment Options")
	db[10] = new dbRecord(false,"","","",0,"")
	db[11] = new dbRecord(false,"<FONT COLOR=WHITE>Fees</FONT>",                    "_parent",   "http://www.entind-401kplan.com/fees-main.htm",0,"Administration Fees")
	db[12] = new dbRecord(false,"","","",0,"")
	db[13] = new dbRecord(false,"<FONT COLOR=WHITE>Contact Us</FONT>",             "_parent",  "http://www.entind-401kplan.com/co-main.htm",     0,"Contact Us")
	db[14] = new dbRecord(false,"&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=WHITE>Member</FONT>",  "_parent",  "https://www.entind-401kplan.com/ai-login-main.php?contact", 0,"Member Contact")
	db[15] = new dbRecord(false,"&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=WHITE>Local</FONT>",   "_parent",  "https://www.data-server.info/401kPlan/co_loc_main.htm", 0,"Local Contact")
	db[16] = new dbRecord(false,"&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=WHITE>Employer</FONT>","_parent",  "https://www.data-server.info/401kPlan/co_emp_main.htm", 0,"Employer Contact")
	db[17] = new dbRecord(false,"","","",0,"")
	db[18] = new dbRecord(false,"<FONT COLOR=WHITE>Summary Plan Description</FONT>","_parent",  "http://www.entind-401kplan.com/pdf/401kSPD.PDF",    0,"Summary Plan Description")
	db[19] = new dbRecord(false,"","","",0,"")
	db[20] = new dbRecord(false,"<FONT COLOR=WHITE>Forms</FONT>",                   "_parent",  "http://www.entind-401kplan.com/fo-main.htm",     0,"Forms")
}

function feesMenu() {
	db[1]  = new dbRecord(false,"<FONT COLOR=WHITE>Home</FONT>",                    "_parent",  "http://www.entind-401kplan.com/",       0,"401k Plan Home Page")
	db[2]  = new dbRecord(false,"","","",0,"")		
	db[3]  = new dbRecord(false,"<FONT COLOR=WHITE>Member Login</FONT>",            "_parent",  "https://www.entind-401kplan.com/ai-login-main.php",     0,"Member Login")
	db[4]  = new dbRecord(false,"","","",0,"")
	db[5]  = new dbRecord(false, "<FONT COLOR=WHITE>Plan Introduction</FONT>",      "_parent",  "http://www.data-server.info/401kPlan/401_Intro.asp",  0,"401k Plan Intoduction")
	db[6]  = new dbRecord(false,"","","",0,"")
	db[7]  = new dbRecord(false,"<FONT COLOR=WHITE>Participating Local Affiliations</FONT>","_parent",  "http://www.data-server.info/401kPlan/UN_main.asp",     0,"Participating Affiliates")
	db[8]  = new dbRecord(false,"","","",0,"")
	db[9]  = new dbRecord(false,"<FONT COLOR=WHITE>Investment Options</FONT>",      "_parent",  "http://www.entind-401kplan.com/invest-main.htm",0,"Investment Options")
	db[10] = new dbRecord(false,"","","",0,"")
	db[11] = new dbRecord(false,"<FONT COLOR=WHITE>Contact Us</FONT>",              "_parent",  "http://www.entind-401kplan.com/co-main.htm",     0,"Contact Us")
	db[12] = new dbRecord(false,"","","",0,"")
	db[13] = new dbRecord(false,"<FONT COLOR=WHITE>Summary Plan Description</FONT>","_parent",  "http://www.entind-401kplan.com/pdf/401kSPD.PDF",    0,"Summary Plan Description")
	db[14] = new dbRecord(false,"","","",0,"")
	db[15] = new dbRecord(false,"<FONT COLOR=WHITE>Forms</FONT>",               		"_parent",  "http://www.entind-401kplan.com/fo-main.htm",     0,"Forms")
}

function formsMenu() {
	db[1]  = new dbRecord(false,"<FONT COLOR=WHITE>Home</FONT>",                    "_parent",   "index.html",      0,"401k Plan Home Page")
	db[2]  = new dbRecord(false,"","","",0,"")
	db[3]  = new dbRecord(false,"<FONT COLOR=WHITE>Member Login</FONT>",               "_parent",   "https://www.entind-401kplan.com/ai-login-main.php",0,"Member Login")
	db[4]  = new dbRecord(false,"","","",0,"")
	db[5]  = new dbRecord(false, "<FONT COLOR=WHITE>Plan Introduction</FONT>",      "_parent",   "http://www.data-server.info/401kPlan/401_Intro.asp", 0,"401k Plan Intoduction")
	db[6]  = new dbRecord(false,"","","",0,"")
	db[7]  = new dbRecord(false,"<FONT COLOR=WHITE>Participating Local Affiliations</FONT>","_parent",   "http://www.data-server.info/401kPlan/UN_main.asp",    0,"Participating Affiliates")
	db[8]  = new dbRecord(false,"","","",0,"")
	db[9]  = new dbRecord(false,"<FONT COLOR=WHITE>Investment Options</FONT>",      "_parent",   "invest-main.htm",0,"Investment Options")
	db[10] = new dbRecord(false,"","","",0,"")
	db[11] = new dbRecord(false,"<FONT COLOR=WHITE>Fees</FONT>",                    "_parent",   "http://www.entind-401kplan.com/fees-main.htm",0,"Administration Fees")
	db[12] = new dbRecord(false,"","","",0,"")
	db[13] = new dbRecord(false,"<FONT COLOR=WHITE>Contact Us</FONT>",               "_parent",   "co-main.htm",    0,"Contact Us")
	db[14] = new dbRecord(false,"","","",0,"")
	db[15] = new dbRecord(false,"<FONT COLOR=WHITE>Summary Plan Description</FONT>","_parent",   "/pdf/401kSPD.PDF",   0,"Summary Plan Description")
}

function introMenu() {
	db[1]  = new dbRecord(false,"<FONT COLOR=WHITE>Home</FONT>",                    "_parent",  "http://www.entind-401kplan.com",       0,"401k Plan Home Page")
	db[2]  = new dbRecord(false,"","","",0,"")
	db[3]  = new dbRecord(false,"<FONT COLOR=WHITE>Member Login</FONT>",            "_parent",  "https://www.entind-401kplan.com/ai-login-main.php",     0,"Member Login")
	db[4]  = new dbRecord(false,"","","",0,"")
	db[5]  = new dbRecord(false,"<FONT COLOR=WHITE>Participating Local Affiliations</FONT>","_parent",  "http://www.data-server.info/401kPlan/UN_main.asp",    0,"Participating Affiliates")
	db[6]  = new dbRecord(false,"","","",0,"")
	db[7]  = new dbRecord(false,"<FONT COLOR=WHITE>Investment Options</FONT>",      "_parent",  "http://www.entind-401kplan.com/invest-main.htm",0,"Investment Options")
	db[8]  = new dbRecord(false,"","","",0,"")
	db[9]  = new dbRecord(false,"<FONT COLOR=WHITE>Fees</FONT>",                    "_parent",   "http://www.entind-401kplan.com/fees-main.htm",0,"Administration Fees")
	db[10] = new dbRecord(false,"","","",0,"")
	db[11] = new dbRecord(false,"<FONT COLOR=WHITE>Contact Us</FONT>",              "_parent",  "http://www.entind-401kplan.com/co-main.htm",     0,"Contact Us")
	db[12] = new dbRecord(false,"","","",0,"")
	db[13] = new dbRecord(false,"<FONT COLOR=WHITE>Summary Plan Description</FONT>","_parent",  "http://www.entind-401kplan.com/pdf/401kSPD.PDF",    0,"Summary Plan Description")
	db[14] = new dbRecord(false,"","","",0,"")
	db[15] = new dbRecord(false,"<FONT COLOR=WHITE>Forms</FONT>",                   "_parent",  "http://www.entind-401kplan.com/fo-main.htm",     0,"Forms")
}

function investMenu() {
	db[1]  = new dbRecord(false,"<FONT COLOR=WHITE>Home</FONT>",                    "_parent",  "http://www.entind-401kplan.com",       0,"401k Plan Home Page")
	db[2]  = new dbRecord(false,"","","",0,"")
	db[3]  = new dbRecord(false,"<FONT COLOR=WHITE>Member Login</FONT>",               "_parent",  "https://www.entind-401kplan.com/ai-login-main.php",     0,"Member Login")
	db[4]  = new dbRecord(false,"","","",0,"")
	db[5]  = new dbRecord(false, "<FONT COLOR=WHITE>Plan Introduction</FONT>",      "_parent",  "http://www.data-server.info/401kPlan/401_Intro.asp",  0,"401k Plan Intoduction")
	db[6]  = new dbRecord(false,"","","",0,"")
	db[7]  = new dbRecord(false,"<FONT COLOR=WHITE>Participating Local Affiliations</FONT>","_parent",  "http://www.data-server.info/401kPlan/UN_main.asp",     0,"Participating Affiliates")
	db[8]  = new dbRecord(false,"","","",0,"")
	db[9]  = new dbRecord(false,"<FONT COLOR=WHITE>Fees</FONT>",                    "_parent",   "http://www.entind-401kplan.com/fees-main.htm",0,"Administration Fees")
	db[10] = new dbRecord(false,"","","",0,"")
	db[11] = new dbRecord(false,"<FONT COLOR=WHITE>Contact Us</FONT>",              "_parent",  "http://www.entind-401kplan.com/co-main.htm",     0,"Contact Us")
	db[12] = new dbRecord(false,"","","",0,"")
	db[13] = new dbRecord(false,"<FONT COLOR=WHITE>Summary Plan Description</FONT>","_parent",  "http://www.entind-401kplan.com/pdf/401kSPD.PDF",    0,"Summary Plan Description")
	db[14] = new dbRecord(false,"","","",0,"")
	db[15] = new dbRecord(false,"<FONT COLOR=WHITE>Forms</FONT>",               "_parent",  "http://www.entind-401kplan.com/fo-main.htm",     0,"Forms")
}

function spdMenu() {
	db[1]  = new dbRecord(false,"<FONT COLOR=WHITE>Home</FONT>",                    "_parent",  "http://www.entind-401kplan.com",       0,"401k Plan Home Page")
	db[2]  = new dbRecord(false,"","","",0,"")
	db[3]  = new dbRecord(false,"<FONT COLOR=WHITE>Member Login</FONT>",               "_parent",  "https://www.entind-401kplan.com/ai-login-main.php",     0,"Member Login")
	db[4]  = new dbRecord(false,"","","",0,"")
	db[5]  = new dbRecord(false, "<FONT COLOR=WHITE>Plan Introduction</FONT>",      "_parent",  "http://www.data-server.info/401kPlan/401_Intro.asp",  0,"401k Plan Intoduction")
	db[6]  = new dbRecord(false,"","","",0,"")
	db[7]  = new dbRecord(false,"<FONT COLOR=WHITE>Participating Local Affiliations</FONT>","_parent",  "http://www.data-server.info/401kPlan/UN_main.asp",    0,"Participating Affiliates")
	db[8]  = new dbRecord(false,"","","",0,"")
	db[9]  = new dbRecord(false,"<FONT COLOR=WHITE>Investment Options</FONT>",      "_parent",  "http://www.entind-401kplan.com/invest-main.htm",0,"Investment Options")
	db[10] = new dbRecord(false,"","","",0,"")
	db[11] = new dbRecord(false,"<FONT COLOR=WHITE>Fees</FONT>",                    "_parent",   "http://www.entind-401kplan.com/fees-main.htm",0,"Administration Fees")
	db[12] = new dbRecord(false,"","","",0,"")
	db[13] = new dbRecord(false,"<FONT COLOR=WHITE>Contact Us</FONT>",              "_parent",  "http://www.entind-401kplan.com/co-main.htm",     0,"Contact Us")
	db[14] = new dbRecord(false,"","","",0,"")
	db[15] = new dbRecord(true,"<FONT COLOR=WHITE>Summary Plan Description</FONT>",  "",         "",                    0,"Summary Plan Description")
	db[16] = new dbRecord(false,"<FONT COLOR=WHITE>Inroduction</FONT>",              "mainframe","spd-main.htm#intro",  1,"Introduction")
	db[17] = new dbRecord(false,"<FONT COLOR=WHITE>Definitions</FONT>",              "mainframe","spd-main.htm#defin",  1,"Definitions")
	db[18] = new dbRecord(false,"<FONT COLOR=WHITE>Participation</FONT>",            "mainframe","spd-main.htm#part",   1, "Participation")
	db[19] = new dbRecord(false,"<FONT COLOR=WHITE>Your Account</FONT>",             "mainframe","spd-main.htm#account",1,"Your Account")
	db[20] = new dbRecord(false,"<FONT COLOR=WHITE>Elective Deferral</FONT>",        "mainframe","spd-main.htm#defer",  1,"Elective Deferral")
	db[21] = new dbRecord(false,"<FONT COLOR=WHITE>Your Plan Benefits</FONT>",       "mainframe","spd-main.htm#benefit",1,"Your Plan Benefits")
	db[22] = new dbRecord(false,"<FONT COLOR=WHITE>Amendments or Termination</FONT>","mainframe","spd-main.htm#amend",  1,"Amendments or Termination")
	db[23] = new dbRecord(false,"<FONT COLOR=WHITE>Making a Claim</FONT>",           "mainframe","spd-main.htm#claim",  1,"Making a Claim")
	db[24] = new dbRecord(false,"<FONT COLOR=WHITE>Rights Under ERISA</FONT>",       "mainframe","spd-main.htm#erisa",  1,"Rights Under ERISA")
	db[25] = new dbRecord(false,"<FONT COLOR=WHITE>Additional Information</FONT>",   "mainframe","spd-main.htm#addl",   1,"Additional Information")
	db[26] = new dbRecord(false,"<FONT COLOR=WHITE>Plan Information</FONT>",         "mainframe","spd-main.htm#info",   1,"Plan Information")
	db[27] = new dbRecord(false,"<FONT COLOR=WHITE>Trustees</FONT>",                 "mainframe","spd-main.htm#trustee",1,"Trustees")
	db[28] = new dbRecord(false,"","","",0,"")
	db[29] = new dbRecord(false,"<FONT COLOR=WHITE>Forms</FONT>",               "_parent",  "http://www.entind-401kplan.com/fo-main.htm",     0,"Forms")
}

function supportMenu() {
	db[1]  = new dbRecord(false,"<FONT COLOR=WHITE>Home</FONT>",                    "_parent",  "http://www.entind-401kplan.com",       0,"401k Plan Home Page")
	db[2]  = new dbRecord(false,"","","",0,"")
	db[3]  = new dbRecord(false,"<FONT COLOR=WHITE>Member Login</FONT>",            "_parent",  "https://www.entind-401kplan.com/ai-login-main.php",     0,"Member Login")
	db[4]  = new dbRecord(false,"","","",0,"")
	db[5]  = new dbRecord(false,"<FONT COLOR=WHITE>Participating Local Affiliations</FONT>","_parent",  "http://www.data-server.info/401kPlan/UN_main.asp",    0,"Participating Affiliates")
	db[6]  = new dbRecord(false,"","","",0,"")
	db[7]  = new dbRecord(false,"<FONT COLOR=WHITE>Investment Options</FONT>",      "_parent",  "http://www.entind-401kplan.com/invest-main.htm",0,"Investment Options")
	db[8]  = new dbRecord(false,"","","",0,"")
	db[9]  = new dbRecord(false,"<FONT COLOR=WHITE>Fees</FONT>",                    "_parent",   "http://www.entind-401kplan.com/fees-main.htm",0,"Administration Fees")
	db[10] = new dbRecord(false,"","","",0,"")
	db[11] = new dbRecord(false,"<FONT COLOR=WHITE>Contact Us</FONT>",              "_parent",  "http://www.entind-401kplan.com/co-main.htm",     0,"Contact Us")
	db[12] = new dbRecord(false,"","","",0,"")
	db[13] = new dbRecord(false,"<FONT COLOR=WHITE>Summary Plan Description</FONT>","_parent",  "http://www.entind-401kplan.com/pdf/401kSPD.PDF",    0,"Summary Plan Description")
	db[14] = new dbRecord(false,"","","",0,"")
	db[15] = new dbRecord(false,"<FONT COLOR=WHITE>Forms</FONT>",                   "_parent",  "http://www.entind-401kplan.com/fo-main.htm",     0,"Forms")
}

function UnionsMenu() {
	db[1]  = new dbRecord(false,"<FONT COLOR=WHITE>Home</FONT>",                    "_parent",  "http://www.entind-401kplan.com",       0,"401k Plan Home Page")
	db[2]  = new dbRecord(false,"","","",0,"")
	db[3]  = new dbRecord(false,"<FONT COLOR=WHITE>Member Login</FONT>",               "_parent",  "https://www.entind-401kplan.com/ai-login-main.php",     0,"Member Login")
	db[4]  = new dbRecord(false,"","","",0,"")
	db[5]  = new dbRecord(false, "<FONT COLOR=WHITE>Plan Introduction</FONT>",      "_parent",  "http://www.data-server.info/401kPlan/401_Intro.asp",  0,"401k Plan Intoduction")
	db[6]  = new dbRecord(false,"","","",0,"")
	db[7]  = new dbRecord(false,"<FONT COLOR=WHITE>Participating Local Affiliations</FONT>","_parent","http://www.data-server.info/401kPlan/UN_main.asp",0,"Participating Affiliates")
	db[8]  = new dbRecord(false,"","","",0,"")
	db[9]  = new dbRecord(false,"<FONT COLOR=WHITE>Investment Options</FONT>",      "_parent",  "http://www.entind-401kplan.com/invest-main.htm",0,"Investment Options")
	db[10] = new dbRecord(false,"","","",0,"")
	db[11] = new dbRecord(false,"<FONT COLOR=WHITE>Fees</FONT>",                    "_parent",   "http://www.entind-401kplan.com/fees-main.htm",0,"Administration Fees")
	db[12] = new dbRecord(false,"","","",0,"")
	db[13] = new dbRecord(false,"<FONT COLOR=WHITE>Contact Us</FONT>",              "_parent",  "http://www.entind-401kplan.com/co-main.htm",     0,"Contact Us")
	db[14] = new dbRecord(false,"","","",0,"")
	db[15] = new dbRecord(false,"<FONT COLOR=WHITE>Summary Plan Description</FONT>","_parent",  "http://www.entind-401kplan.com/pdf/401kSPD.PDF",    0,"Summary Plan Description")
	db[16] = new dbRecord(false,"","","",0,"")
	db[17] = new dbRecord(false,"<FONT COLOR=WHITE>Forms</FONT>",               "_parent",  "http://www.entind-401kplan.com/fo-imain.htm",     0,"Forms")
}

//************************************* end of MENU ITEMS *********************************************

function dbRecord(mother,display,frame,URL,indent,statusMsg){
  // object constructor for each outline entry
	this.mother = mother   // is this item a parent?
	this.display = display // text to display
    this.frame = frame   // wsm added this to include various frame targets
	this.URL = URL         // link tied to text; if empty string, item appears as straight text
	this.indent = indent   // how many levels nested?
	this.statusMsg = statusMsg  // descriptive text for status bar 
	return this
}

// pre-load all images into cache
var fillerImg = new Image(1,1)
fillerImg.src = "images/spacer.gif"
var collapsedImg = new Image(widgetWidth,widgetHeight)
collapsedImg.src = collapsedWidget
var expandedImg = new Image(widgetWidth,widgetHeight)
expandedImg.src = expandedWidget
var endpointImg = new Image(widgetWidth,widgetHeight)
endpointImg.src = endpointWidget

// ** functions that get and set persistent cookie data **
// set cookie data
var mycookie = document.cookie

function setCurrState(setting) {
        mycookie = document.cookie = "currState=" + escape(setting)
}

function getCurrState() {
	// retrieve cookie data
	var label = "currState="
	var labelLen = label.length
	var cLen = mycookie.length
	var i = 0
	while (i < cLen) {
					var j = i + labelLen
					if (mycookie.substring(i,j) == label) {
									var cEnd = mycookie.indexOf(";",j)
									if (cEnd ==     -1) {
													cEnd = mycookie.length
									}
									return unescape(mycookie.substring(j,cEnd))
					}
					i++
	}
	return ""
}

// **function that updates persistent storage of state**
function toggle(n) {
  // toggles an outline mother entry, storing new value in the cookie
	if (n != 0) {
		var newString = ""
		var currState = getCurrState() // of whole outline
		var expanded = currState.charAt(n-1) // of clicked item
		newString += currState.substring(0,n-1)
		newString += expanded ^ 1 // Bitwise XOR clicked item
		newString += currState.substring(n,currState.length)
		setCurrState(newString) // write new state back to cookie
	}
}

// **functions used in assembling updated outline**
function getGIF(n) {
  // returns the proper GIF file name for each entry's control
	var mom = db[n].mother  // is entry a parent?
	var expanded = getCurrState().charAt(n-1) // of clicked item
	if (!mom) {
		return endpointWidget
	} else {
		if (expanded == 1) {
			return expandedWidget
		}
	}
	return collapsedWidget
}

function getGIFStatus(n) {
  // returns the proper status line text based on the icon style
	var mom = db[n].mother  // is entry a parent
	var expanded = getCurrState().charAt(n-1) // of rolled item
	if (!mom) {
		return ""
	} else {
		if (expanded == 1) {
			return "Click to collapse nested items"
		}
	}
	return "Click to expand nested items"
}

// initialize 'current state' storage field
if (getCurrState() == "" || getCurrState().length != (db.length-1)) {
	initState = ""
	for (i = 1; i < db.length; i++) {
		initState += "0"
	}
	setCurrState(initState)
}

function buildMenu() {
	// build new outline based on the values of the cookie
	// and data points in the outline data array.
	// This fires each time the user clicks on a control,
	// because the HREF for each one reloads the current document.
	var newOutline = ""
	var prevIndentDisplayed = 0
	var showMyDaughter = 0
	//document.write("<CENTER><H3>401(k) Plan</H3><HR></CENTER>")
	// cycle through each entry in the outline array
	for (var i = 1; i < db.length; i++) {
		var theGIF = getGIF(i)				// get the image
		var theGIFStatus = getGIFStatus(i)  // get the status message
		var currIndent = db[i].indent		// get the indent level
		var expanded = getCurrState().charAt(i-1) // current state
		// display entry only if it meets one of three criteria
		if (currIndent == 0 || currIndent <= prevIndentDisplayed || (showMyDaughter == 1 && (currIndent - prevIndentDisplayed == 1))) {
			newOutline += "<IMG SRC=\"images/spacer.gif\" HEIGHT = 1 WIDTH =" + (indentPixels * currIndent) + ">"
			newOutline += "<A HREF=\"javascript:history.go(0)\" onMouseOver=\"window.status=\'" + theGIFStatus + "\';return true;\" onClick=\"toggle(" + i + ");return " + (theGIF != endpointWidget) + "\">"
			newOutline += "<IMG SRC=\"" + theGIF + "\" HEIGHT=" + widgetHeight + " WIDTH=" + widgetWidth + " BORDER=0></A>"		
			if (db[i].URL == "" || db[i].URL == null) {
				newOutline += " " + db[i].display + "<BR>"	// no link, just a listed item	
			} else {
				newOutline += " <A HREF=\"" + db[i].URL + "\" TARGET=\"" + db[i].frame + "\" onMouseOver=\"window.status=\'" + db[i].statusMsg + "\';return true;\">" + db[i].display + "</A><BR>"
			}
			prevIndentDisplayed = currIndent
			showMyDaughter = expanded
			if (db.length > 25) {
				document.write(newOutline)
				newOutline = ""
			}
		}
	}
	document.write(newOutline)
}
function buildMenuLeft() {

	document.write("<TD ID='menu' VALIGN='top' WIDTH='15%'><BR><FONT SIZE='2'></TD>")

}
function buildMenuLeftOLD() {    //WSM buildMenuLeft includes the table tags
	// build new outline based on the values of the cookie
	// and data points in the outline data array.
	// This fires each time the user clicks on a control,
	// because the HREF for each one reloads the current document.
	var newOutline = ""
	var prevIndentDisplayed = 0
	var showMyDaughter = 0
	document.write("<TD ID='menu' VALIGN='top' WIDTH='25%'><BR><FONT SIZE='2'>")
	// cycle through each entry in the outline array
	for (var i = 1; i < db.length; i++) {
		var theGIF = getGIF(i)				// get the image
		var theGIFStatus = getGIFStatus(i)  // get the status message
		var currIndent = db[i].indent		// get the indent level
		var expanded = getCurrState().charAt(i-1) // current state
		// display entry only if it meets one of three criteria
		if (currIndent == 0 || currIndent <= prevIndentDisplayed || (showMyDaughter == 1 && (currIndent - prevIndentDisplayed == 1))) {
			newOutline += "<IMG SRC=\"images/spacer.gif\" HEIGHT = 1 WIDTH =" + (indentPixels * currIndent) + ">"
			newOutline += "<A HREF=\"javascript:history.go(0)\" onMouseOver=\"window.status=\'" + theGIFStatus + "\';return true;\" onClick=\"toggle(" + i + ");return " + (theGIF != endpointWidget) + "\">"
			newOutline += "<IMG SRC=\"" + theGIF + "\" HEIGHT=" + widgetHeight + " WIDTH=" + widgetWidth + " BORDER=0></A>"		
			if (db[i].URL == "" || db[i].URL == null) {
				newOutline += " " + db[i].display + "<BR>"	// no link, just a listed item	
			} else {
				newOutline += " <A HREF=\"" + db[i].URL + "\" TARGET=\"" + db[i].frame + "\" onMouseOver=\"window.status=\'" + db[i].statusMsg + "\';return true;\">" + db[i].display + "</A><BR>"
			}
			prevIndentDisplayed = currIndent
			showMyDaughter = expanded
			if (db.length > 25) {
				document.write(newOutline)
				newOutline = ""
			}
		}
	}
	document.write(newOutline)
	document.write ("</FONT></TD>")
}