/* global variables */var section;/* just a bit of browser sniffing is necessary. */var ie = (document.all) ? true: false; var isWin = (navigator.platform.indexOf("Win") != -1) ? true : false;var ieWin = (ie && isWin) ? true : false;var ieWin50 = (isWin && navigator.appVersion.indexOf('MSIE 5.0') != -1) ? true : false;/* the menu open/close function. */function togglemenu(num) { 	/* only execute in 5+ browsers. */	if (!document.getElementById) return false;	x = 1	while(document.getElementById("sub" + x)) {		document.getElementById("sub" + x).style.display = "none"		x++	}	/* set local variables. */	var submenu = "sub"+num;	var square = "sq"+num;	/* Set the display style to "none" if the value is null */	if (document.getElementById(submenu).style.display == null) {		document.getElementById(submenu).style.display = "none";	} 	/* The toggle section. 	If the value of the submenu element's display is "none", then it's set to "block"; if the value is "block", it's set to "none".	The plus/minus GIF is also reset accordingly.	*/	if (document.getElementById(submenu).style.display == "none") {		document.getElementById(submenu).style.display = "block";		//document.getElementById(square).src = "images/minus.gif";	} else {		document.getElementById(submenu).style.display = "none";		//document.getElementById(square).src = "images/plus.gif";	}	this_display = ""	x = 1	while(document.getElementById("sub" + x)) {		this_display += (document.getElementById("sub" + x).style.display != "none") ? "block" : "none" ;		this_display += ":"		x++	}	document.cookie = "save_menu=" + this_display}/* Get all the elements with a given class name */function getElementsByClassName(tagname, classname) {/* only execute in 5+ browsers. */if (!document.getElementById) return false;/* get all elements with the tag name tagname. */var TagElements = document.getElementsByTagName(tagname);/* define an array which will hold the elements with the class name classname. */var elementsByClassName = new Array();/* Look at all the elements in TagElements, and find the ones with the class name classname. */for (i=0; i<TagElements.length; i++) {  if (TagElements[i].className == classname) {    elementsByClassName[elementsByClassName.length] = TagElements[i];    } }  return elementsByClassName;}/* show or hide all elements on a page with a given tag name and class name. */function showhideclass(tagname,classname,displaystate) { var toshowhide = getElementsByClassName(tagname,classname);  for (k=0; k < toshowhide.length; k++) {    toshowhide[k].style.display = displaystate; }}/* change the background color on a page with a given tag name and class name. */ function changeclassbgcolor(tagname,classname,colorname) { var tochange = getElementsByClassName(tagname,classname); for (j=0; j <tochange.length; j++) {   tochange[j].style.backgroundColor = colorname;   }} /* change the cursor */function changecursor(num) {if (!document.getElementById || ieWin50) {return false; }else {var square = "sq" + 1;document.getElementById(square).style.cursor = 'pointer';}}function init() {showhideclass('p','sublevel','none');showhideclass('td','pic','none');if (section > 0) {togglemenu(section);}}