// these variables write the proprietary tags for netscape or ie 
 
var whichInclude, whichTag, styley, pos, rel, absol, wid, hei, lef, topp, zInd, vis, hid, vsbl, dis, disblo, disnone, clo, closer 
if (isNav) { 
	whichTag = "<layer name=" 
	styley = ""	 
	pos = "" 
	absol = "" 
	rel = "" 
	wid = " width=" 
	hei = " height=" 
	lef = " left=" 
	topp = " top=" 
	zInd = " z-index=" 
	vis = " visibility=" 
	hid = "hide" 
	visbl = "show" 
	dis = "" 
	disnone = "" 
	disblo = "" 
	clo = ">" 
	closer = "</layer>" 
} else if(isNS6) { 
	whichTag = "<div id=" 
	styley = " style='" 
	pos = "position:" 
	rel = "relative; " 
	absol = "absolute; " 
	wid = "width:" 
	hei = "; height:" 
	lef = "; left:" 
	topp = "; top:" 
	zInd = "; z-index:" 
	vis = "; visibility:" 
	hid = "hidden" 
	visbl = "visible" 
	dis = "; display:" 
	disnone = "none" 
	disblo = "block" 
	clo = "'>" 
	closer = "</div>" 
}else { 
	whichTag = "<div id=" 
	styley = " style='" 
	pos = "position:" 
	rel = "relative; " 
	absol = "absolute; " 
	wid = "width:" 
	hei = "; height:" 
	lef = "; left:" 
	topp = "; top:" 
	zInd = "; z-index:" 
	vis = "; visibility:" 
	hid = "hidden" 
	visbl = "visible" 
	dis = "; display:" 
	disnone = "none" 
	disblo = "block" 
	clo = "'>" 
	closer = "</div>" 
} 
 
// preloads left navigation's tracking arrows 
arrow = new Image(); arrow.src="images/arrow.gif"; 
arrow2 = new Image(); arrow2.src="images/arrow2.gif"; 
cracker = new Image(); cracker.src="images/spacer.gif"; 
 
// creates arrays for netscape's layers 
document.nav = new Object(); 
document.nav.menu = new Object(); 
document.nav.menu.expand = new Array(); 
document.nav.menu.height = new Array(); 
 
var isInitialized = "un-initialized" 
var whichCollapsed = "none"; 
// this function opens and closes the navigation 
function collapse(ditem) { 
	if (isIE) { 
		var theChildLayer = eval("document.all.Links" + ditem + "Child.style"); 
		if (theChildLayer.display == "none") { 
			theChildLayer.display = "block"; 
		} else { 
			theChildLayer.display = "none"; 
		} 
	} else if (isNav) { 
	    if(document.nav.menu.expand[ditem + 1].clip.bottom == 0) { 
	       	document.nav.menu.expand[ditem + 1].clip.bottom = document.nav.menu.height[ditem + 1]; 
	           if(document.nav.menu.expand[ditem].document.images[0]) { 
	        } 
	    } else { 
	       	document.nav.menu.expand[ditem + 1].clip.bottom = 0; 
	           if(document.nav.menu.expand[ditem].document.images[0]) { 
	        } 
	    } 
	    align(); 
	} else if (isNS6) {  //Mozilla 5.0 implimentation goes here.
		var link1 = "Links"+ditem+"Child";
		var theChildLayer = document.getElementById(link1); 
		if (theChildLayer.style.display == "none") { 
			theChildLayer.style.display = "block"; 
		} else { 
			theChildLayer.style.display = "none"; 
		}	
	} 
	if (whichCollapsed != "none") {collapse2(whichCollapsed)} 
	if (isInitialized == "initialized") {whichCollapsed = ditem} 
} 


function collapse2(ditem) { 
	if (isIE) { 
		var theChildLayer = eval("document.all.Links" + ditem + "Child.style"); 
		if (theChildLayer.display == "none") { 
			theChildLayer.display = "block"; 
		} else { 
			theChildLayer.display = "none"; 
		} 
	} else if (isNav) { 
	    if(document.nav.menu.expand[ditem + 1].clip.bottom == 0) { 
	       	document.nav.menu.expand[ditem + 1].clip.bottom = document.nav.menu.height[ditem + 1]; 
	           if(document.nav.menu.expand[ditem].document.images[0]) { 
	        } 
	    } else { 
	       	document.nav.menu.expand[ditem + 1].clip.bottom = 0; 
	           if(document.nav.menu.expand[ditem].document.images[0]) { 
	        } 
	    } 
	    align(); 
	} else if (isNS6) {  //Mozilla 5.0 implimentation goes here.
		var link2 = "Links"+ditem+"Child";
		var theChildLayer = document.getElementById(link2);
		if (theChildLayer.style.display == "none") { 
			theChildLayer.style.display = "block"; 
		} else { 
			theChildLayer.style.display = "none"; 
		}	
	} 

} 
 
// this function takes the navigation layers from the array (loaded in InitializeToolbar and positions them 
function align() { 
	var i,j,stupid_netscape_array_infinate_loop_error; 
    stupid_netscape_array_infinate_loop_error = document.nav.menu.expand.length; 
    for(i=0; i<stupid_netscape_array_infinate_loop_error; i++) { 
    	j = i + 1; 
        if(document.nav.menu.expand[j]) { 
            document.nav.menu.expand[j].top = document.nav.menu.expand[i].top + document.nav.menu.expand[i].clip.bottom; 
        } 
    } 
} 
 
// this function loads all the layers within the "container" layer into an array to be used for positioning in the align function 
function initializeToolbar() { 
	if (isIE) { 
		document.all.container.style.visibility = "visible" 
	} else if (isNav) { 
		for(i=0; i<document.layers['container'].document.layers.length; i++) { 
	    	document.nav.menu.expand[i] = document.layers['container'].document.layers[i]; 
		    document.nav.menu.height[i] = document.nav.menu.expand[i].clip.bottom; 
	  	} 
	  	for (p=0;p<document.nav.menu.expand.length;p=p+2) { 
	    	collapse(p); 
	    } 
		document.layers['container'].visibility = 'visible'; 
	} else if (isNS6) {
		document.getElementById('container').style.visibility="visible";
	}
	isInitialized = "initialized" 
} 
 
// these variables track which arrow is highlighted 
var oldHead = "none" 
var oldSub = 0 
 
// this function tracks the mouseOvers on the navigation and highlights accordingly 
function arrowChange(whichHead,whichSub) { 
	if (oldHead != "none") { 
		var theOldImg = eval("fixImg2('Links" + oldHead + "Img','container','Links" + oldHead + "Parent')") 
		theOldImg.src=cracker.src 
	} 
	if (whichHead != "allOff") { 
		var theImg = eval("fixImg2('Links" + whichHead + "Img','container','Links" + whichHead + "Parent')") 
		theImg.src=arrow.src 
	} 
	if (oldSub != 0) { 
		var theOldImg2 = eval("fixImg2('Links" + oldHead + "Img" + oldSub + "','container','Links" + oldHead + "Child')") 
		theOldImg2.src=cracker.src 
	} 
	if (whichSub != 0 && whichHead != "allOff") { 
		var theImg2 = eval("fixImg2('Links" + whichHead + "Img" + whichSub + "','container','Links" + whichHead + "Child')") 
		theImg2.src=arrow2.src 
	}  
	if (whichHead != "allOff") { 
		oldHead = whichHead; 
		oldSub = whichSub; 
	} else { 
		oldHead = "none"; 
		oldSub = 0 
	} 
}

