	// filter out the good and bad browsers
	function initializeMenu(blockNav) {
		
		// first filter for IE5/mac and older versions of Opera
		this.etype = typeof document.addEventListener != "undefined" ? "addEventListener" : typeof document.attachEvent != "undefined" ? "attachEvent" : "none";
		if(typeof window.opera != "undefined" && parseFloat(navigator.userAgent.toLowerCase().split(/opera[\/ ]/)[1].split(' ')[0], 10) < 7.5) this.etype = "none";
		
		if (this.etype != "none") {
			initializeParents(blockNav);
		}
	}
	
	// make top level list items clickable, append anchor for keyboard navigation
	function initializeParents(blockNav) {
	
		for (i = 0; i < blockNav.childNodes.length; i++) {
			
			var blockNavChild = blockNav.childNodes[i];
			
			if ((blockNavChild.tagName == "LI") && (blockNavChild.childNodes.length > 1)) {
				
				appendAnchor(blockNavChild);
				
				initializeChildren(blockNavChild, i);
				
				// attach the event listeners for the mouse command
				attachMouseListener(blockNavChild, expandMenu);
			}
		}
	}
	
	// open and close the first child UL
	function initializeChildren(blockNavChild, i) {
		
		for (j = 0; j < blockNavChild.childNodes.length; j++) {
			
			var targetChild = blockNavChild.childNodes[j];
			
			if (targetChild.tagName == "UL") {			
				for (k = 0; k < targetChild.childNodes.length; k++) {
					
					if((targetChild.childNodes[k].tagName == "LI") && (targetChild.childNodes[k].childNodes.length > 1)) {
						
						appendAnchor(targetChild.childNodes[k]);
						
						var objMapClickableText = document.createTextNode('(map)');		
						var objMapClickable = document.createElement("a");
							objMapClickable.href = "javascript:void(null);";
							//objMapClickable.style.display = "block";
							objMapClickable.style.marginLeft = "5px";
							objMapClickable.appendChild(objMapClickableText);
							
						//attachMouseListener(objMapClickable, FocusMap);
						//attachKeyListener(objMapClickable, FocusMap);
						
						if (targetChild.childNodes[k].firstChild.nextSibling.lastChild.tagName != "A") {
							//targetChild.childNodes[k].firstChild.nextSibling.appendChild(objMapClickable);
						}
					}
				}
			}
      
			if (targetChild.className == "currentSection") {
				if ((navigator.product == "Gecko") || (navigator.userAgent.indexOf("Safari") > 0)) {
					targetChild.stretcher = new Stretcher(targetChild, "true");
					targetChild.stretcher.stretch();
				} else {
					targetChild.style.display = "block";
				}
				
				targetChild.parentNode.firstChild.style.backgroundImage = "url('images/back-minus.gif')";
			}
		}
	}
	
	// create a new anchor for controlling keyboard events on top level and secondary level list items
	function appendAnchor(blockNavChild) {
  
    arrSpans = blockNavChild.getElementsByTagName("span");
		
		var anchorObj = document.createElement("a");
			anchorObj.href = "javascript:void(null);";
			anchorObj.title = "Select " + arrSpans[0].firstChild.nodeValue + " to continue";
			anchorObj.className = "button";
			anchorObj.style.backgroundImage = "url('images/back-plus.gif')";

		anchorObj.onfocus = function() { anchorObj.className += " buttonFocus"; }
		anchorObj.onblur = function() { anchorObj.className = "button"; }
				
		blockNavChild.onmouseover = function() { this.style.cursor = "pointer";	}		
		blockNavChild.onmouseout = function() {	this.className = null; }
		
		blockNavChild.insertBefore(anchorObj, blockNavChild.firstChild);
		
		// attach event listeners for the keyboard command
		attachKeyListener(anchorObj, keyPressExpand);
	}
	
	// attach new anchors and attach event handlers where the coresponding className directs
	function initializeDeliverables(thisNode) {
		
		while (thisNode != null) {
			
			cnt++;
			//document.getElementById("counter").value = cnt;
			
			if (thisNode.nodeType == 1) {
				
				if ((thisNode.className.indexOf("deliverable") >= 0) && (thisNode.firstChild.tagName != "A")) {
					var delAnchorValue = document.createTextNode(thisNode.firstChild.nodeValue);
					var delAnchorObj = document.createElement("a");
						delAnchorObj.href = "javascript:void(null);";
						delAnchorObj.title = "Select " + thisNode.firstChild.nodeValue + " to continue";
						delAnchorObj.appendChild(delAnchorValue);
						
					thisNode.firstChild.nodeValue = "";
					thisNode.insertBefore(delAnchorObj, thisNode.firstChild);
										
					attachMouseListener(thisNode.firstChild, FocusDeliverable);
					attachKeyListener(thisNode.firstChild, FocusDeliverable);
				} else {
					initializeDeliverables(thisNode.firstChild);
				}
				
			} else if (thisNode.nodeType == 3) {

			}
			
			thisNode = thisNode.nextSibling;
		}
	}
	
	// remove cloned nodes marked for removal
	function clearDeliverables(thisNode) {
  
    document.getElementById("pointer").style.display = "none";
		
		while (thisNode != null) {
			
			cnt++;
			//document.getElementById("counter").value = cnt;
			
			if (thisNode.nodeType == 1) {
				//document.write("<font size='2' face='courier new'>" + appendSpaces(depth) + thisNode.tagName + " Type: " + thisNode.nodeType + "</font><br/>");
				
				if ((thisNode.className == "objDel") || (thisNode.className == "objMap")) {
					thisNode.parentNode.removeChild(thisNode);
				}
				
				clearDeliverables(thisNode.firstChild);
				
			} else if (thisNode.nodeType == 3) {
				//document.write("<font size='2' face='courier new'>" + appendSpaces(depth) +  " " + thisNode.nodeValue.substring(thisNode.nodeValue.length - 20) + "</font><br/>");
				
				if (thisNode.className == "objDel") {
					thisNode.parentNode.removeChild(thisNode);
				}
				
				if (thisNode.className == "objDelHidden") {
					thisNode.parentNode.removeChild(thisNode);
				}
			}
			
			thisNode = thisNode.nextSibling;
		}
	}
	
	
	// catch the mouse events
	function attachMouseListener(node, funct) {
		if (navigator.userAgent.indexOf("Safari") > 0) {
	
			node.addEventListener("click", funct, false);
			
		} else if (navigator.product == "Gecko") {
		
			node.addEventListener("click", funct, false);
			
		} else {
		
			node.attachEvent("onclick", funct);
			isIE = true;
		}
	}
	
	// catch the keyboard events
	function attachKeyListener(node, funct) {
		
		if (navigator.userAgent.indexOf("Safari") > 0) {
	
			node.addEventListener("keydown", funct, false);
			
		} else if (navigator.product == "Gecko") {
		
			node.addEventListener("keypress", funct, false);
			
		} else {
		
			node.attachEvent("onkeydown", funct);
			isIE = true;
		}
	}
	
	// pass all events onto the method to clone deliverables
	function FocusDeliverable(event) {
		
		if (!event) var event = window.event;
		
		if (event.target) {
			target = event.target;
			if (target.nodeType == 3) target = target.parentNode; // safari compatible
		}
		else if (event.srcElement) target = event.srcElement; // ie compatible

		if ((event.keyCode == 13) || (event.type == "click")) { 
			setDeliverables(target, target.parentNode.className); 
		}
	}
	
	// if marked to do so, clone the corresponding node from "deliverables" and append it to the targeted node
	function setDeliverables(element, deliverableId) {
		
		var win;		
		var objDel = document.getElementById("deliverables");
		var objDelChildren = objDel.getElementsByTagName("DIV");
		var objDelArr = new Array();
		var objDelArrHidden = new Array();
				
		for (i = 0; i < objDelChildren.length; i++) {
			
			var objDelChild = objDelChildren[i];
			
			objDelChild.style.display = "none";
				
			if (objDelChild.id == deliverableId) {
				
				if (element.parentNode.parentNode.parentNode.className == "objDelContain") {
					
					element.nextSibling.className += " objDelFade";
					
					if(win) {
            window.clearTimeout(win);
          }
          win = setTimeout(function() { element.parentNode.lastChild.className = "objDel"; }, 500);
					
					element.parentNode.parentNode.className = null;
					
				} else {
					clearDeliverables(document.getElementById("blockNav"));
          
					objDelArr[i] = objDelChild.cloneNode(true);
					objDelArr[i].className = "objDel";
					
					element.parentNode.parentNode.style.position = "relative";
					element.parentNode.parentNode.className = "objDelContain";
					element.parentNode.parentNode.insertBefore(objDelArr[i], element.parentNode.nextSibling);
				}
			}
		}
	}
	
	function displayMap(element, mapId) {

		var objMap = document.getElementById("maps");
		var objMapChildren = objMap.getElementsByTagName("DIV");
		var objMapArr = new Array();
		
		for (l = 0; l < objMapChildren.length; l++) {
			
			var objMapChild = objMapChildren[l];
			
			objMapChild.style.display = "none";
      
			if (objMapChild.id == mapId) {

				clearDeliverables(document.getElementById("blockNav"));
        
				objMapArr[l] = objMapChild.cloneNode(true);
				objMapArr[l].className = "objMap";
				
				element.parentNode.style.position = "relative";
				element.parentNode.appendChild(objMapArr[l]);
			}
		}
	}
	
	function FocusMap(event) {
		
		if (!event) var event = window.event;
		
		if (event.target) {
			target = event.target;
			if (target.nodeType == 3) target = target.parentNode; // safari compatible
		}
		else if (event.srcElement) target = event.srcElement; // ie compatible

		if ((event.keyCode == 13) || (event.type == "click")) { 
			
			//alert(target.parentNode.className);
			
			objMap = document.getElementById("maps");
			objMapChildren = objMap.getElementsByTagName("DIV");
			objMapArr = new Array();
			
			for (l = 0; l < objMapChildren.length; l++) {
			
				var objMapChild = objMapChildren[l];
				
				objMapChild.style.display = "none";
					
				if (objMapChild.id == target.parentNode.className) {
	
					clearDeliverables(document.getElementById("blockNav"));
									
					objMapArr[l] = objMapChild.cloneNode(true);
					objMapArr[l].className = "objMap";
					
					target.parentNode.parentNode.style.position = "relative";
					target.parentNode.parentNode.appendChild(objMapArr[l]);
				}
			}
		}
	}
	
	// pass the keyboard event onto the UL menu expansion
	function keyPressExpand(event) {
		
		if ((event.keyCode == 13) && (this.tagName == "UL")) expandMenu(event);
	}

	// search children of the event target to find the nodes in which to initiate a stretcher
	function expandMenu(event) {
		
		var target;
		var storedCookieName = new Array();	
    
		if (!event) var event = window.event;
		
		if (event.target) {
			target = event.target;
			if (target.nodeType == 3) target = target.parentNode; // safari compatible
		}
		else if (event.srcElement) target = event.srcElement; // ie compatible
		
		if (target.tagName != "LI") target = target.parentNode;
			
		var highlight = document.getElementById("highlight");
		   
		for (i = 0; i < target.childNodes.length; i++) {
			
			targetChild = target.childNodes[i];
			
			parseNodes(targetChild, event);
		}
	}
	
	// create and initiate a stretcher for the targeted node
	// the stretcher object and stretch() method is hidden from internet explorer
	function parseNodes(targetChild, event) {
		if ((targetChild.tagName == "UL")) {
			
			if(targetChild.style.display == "block") {
				
				if ((!event.srcElement) || (navigator.userAgent.indexOf("Safari") > 0)) {
					if (targetChild.stretcher != null) {
						targetChild.stretcher;
					} else {
						targetChild.stretcher = new Stretcher(targetChild);
					}
					targetChild.stretcher.stretch();
				} else {
					targetChild.style.display = "none";
				}
				targetChild.parentNode.firstChild.style.backgroundImage = "url('images/back-plus.gif')";
				
			} else {
				
				if ((!event.srcElement) || (navigator.userAgent.indexOf("Safari") > 0)) {
					if (targetChild.stretcher != null) {
						targetChild.stretcher;
					} else {
						targetChild.stretcher = new Stretcher(targetChild);
					}					
					targetChild.stretcher.stretch();
				} else {
					targetChild.style.width = "240px";
					targetChild.style.display = "block";
				}
				targetChild.parentNode.firstChild.style.backgroundImage = "url('images/back-minus.gif')";

				// append the show map button and display the map for the given menu
				//displayMap(targetChild, targetChild.parentNode.firstChild.nextSibling.className);
			}
		}
	}
	
	// the stretcher code is based upon tutorials at the Apple Development Center (ADC)
	// it has been modified to operate on multiple nodes
	// and also resize on the horizontal axis
	function Stretcher(element, isLoadingFromCookie) {
		this.element = element;
		
		this.element.style.display = "block";
		this.element.style.position = "relative";
	
		this.startTime = 0;
		this.timer = null;
		
		// Assign the cookie variable locally (if applicable)
		this.isLoadingFromCookie = isLoadingFromCookie;
		
		this.multiplier = 1;
		this.stretchTime = 0;
		
		this.minPosition = 0;
		this.maxPositionH = parseInt(document.defaultView.getComputedStyle(this.element, "").getPropertyValue("height"));
		this.maxPositionW = 320; //this value sets the width of the element
		
		// Set variables to what they'd be in the beginning "shrunk" state
		this.positionFromH = this.minPosition;
		this.positionFromW = this.minPosition;
		
		this.positionNowH = this.minPosition;
		this.positionNowW = this.minPosition;
		
		this.positionToH = this.minPosition;
		this.positionToW = this.minPosition;
	}
	
	Stretcher.prototype.stretch = function(event) {
		
		this.element.style.display = "block";
		
		if (this.isLoadingFromCookie == "true") {
			this.duration = 0;
			this.isLoadingFromCookie = "false";
		} else {
			this.duration = 200; //this value sets the speed of the animation - must be the same as the above value
		}
	
		var timeNow = (new Date).getTime();
		
		// We're already stretching in some direction; change the destination position and restart the timer
		if (this.timer != null) {
			clearInterval(this.timer);
			this.timer = null;
			
			this.stretchTime -= (timeNow - this.startTime);
			this.positionFromH = this.positionNowH;
			this.positionFromW = this.positionNowW;
		} else {
			this.stretchTime = this.duration * this.multiplier;
			this.positionFromH = this.positionNowH;
			this.positionFromW = this.positionNowW;
		}

		// Change from our previous direction
		if ((this.positionToH == this.minPosition) && (this.positionToW == this.minPosition)) {
			this.element.style.overflow = "hidden";
			this.positionToH = this.maxPositionH;
			this.positionToW = this.maxPositionW;
		} else {
			this.element.style.overflow = "hidden";
			this.positionToH = this.minPosition;
			this.positionToW = this.minPosition;
		}
		
		this.startTime = timeNow - 13; // set it back one frame.
			
		// We need to store this in a local variable so the timer does not lose scope when invoking tick	  
		var localThis = this;
		this.tick();
		this.timer = setInterval (function() { localThis.tick(); }, 13);
	}
	
	Stretcher.prototype.tick = function(event) {
		var T;
		var ease;
		var time  = (new Date).getTime();
		var frame;
			
		T = limit_3(time-this.startTime, 0, this.stretchTime);
		ease = 0.5 - (0.5 * Math.cos(Math.PI * T / this.stretchTime));
	
		if (T >= this.stretchTime) {
			// go to the finished position when the timer is up
			this.positionNowH = this.positionToH;
			this.positionNowW = this.positionToW;
			
			clearInterval (this.timer);
			this.timer = null;
		} else {
			this.positionNowH = parseInt(computeNextFloat(this.positionFromH, this.positionToH, ease));
			this.positionNowW = parseInt(computeNextFloat(this.positionFromW, this.positionToW, ease));
		}
	
		this.element.style.minHeight = "0px";
		this.element.style.height = this.positionNowH + "px";
		
		this.element.style.minWidth = "0px";
		this.element.style.width = this.positionNowW + "px";
		
		if ((this.positionNowH == this.maxPositionH) && (this.positionNowW == this.maxPositionW)) {
			
			if (this.positionToH != this.minPosition) {
				this.element.style.overflow = "visible";
				this.element.style.height = "auto";
				this.element.style.minHeight = this.positionNowH + "px";
			}
		}			
		
		if ((this.element.style.height == "0px") && (this.element.style.width == "0px")) {
			this.element.style.display = "none";
		}
	}

	function limit_3 (a, b, c) {
	    return a < b ? b : (a > c ? c : a);
	}
	
	function computeNextFloat (from, to, ease) {
	    return from + (to - from) * ease;
	}
	
	function appendSpaces(depth) {
		var strSpace = "";
		
		for (i = 0; i < depth; i++) {
			strSpace = strSpace + "&nbsp;&nbsp;";	
		}
		
		return strSpace;
	}
	
	var cnt = 0;
	var stretcher = null;
	var i; var j; var k;
	var node;
	var funct;
	
	window.onload = function() {
		initializeMenu(document.getElementById("blockNav"));
		initializeDeliverables(document.getElementById("blockNav"));
		document.getElementById("siteLoader").style.display = "none";
		document.getElementById("container").style.display = "block";

}