startMenu = function() {
	if (document.all && document.getElementById) {
		traverse(document.getElementById("navigation"));
	}
}

function traverse(tree) {
	if(tree.hasChildNodes()) {	//has children?
		if (tree.nodeName=="LI") {	//current node is li?
			tree.onmouseover=function() {	//set mouseover function
				this.className+=" over";	//set class to .over
				this.firstChild.className += " hovertrail";		//a hack to fix ie's lack of child selectors in css
			}//end function
			tree.onmouseout=function() {	//set mouseout function
				this.className=this.className.replace(" over", "");		//reset class
				this.firstChild.className=this.firstChild.className.replace(" hovertrail", "");		//reset class
			}//end function
		}//end if

		for(var i=0; i<tree.childNodes.length; i++){	//loop on this node's kids
			traverse(tree.childNodes(i));	//run this function on childnode
		}//end for
	}//end if
}//end function

window.onload=startMenu


function GeneratePassword(fObj) {
	var length=8;
	var sPassword = "";
	var noPunction = 1;

	for (i=0; i < length; i++) {
		numI = getRandomNum();
		if (noPunction) { while (checkPunc(numI)) { numI = getRandomNum(); } }
		sPassword = sPassword + String.fromCharCode(numI);
	}

	fObj.value = sPassword
	return true;
}

function getRandomNum() {
	// between 0 - 1
	var rndNum = Math.random()
	// rndNum from 0 - 1000
	rndNum = parseInt(rndNum * 1000);
	// rndNum from 33 - 127
	rndNum = (rndNum % 94) + 33;
	return rndNum;
}

function checkPunc(num) {
	if ((num >=33) && (num <=47)) { return true; }
	if ((num >=58) && (num <=64)) { return true; }
	if ((num >=91) && (num <=96)) { return true; }
	if ((num >=123) && (num <=126)) { return true; }
	return false;
}

 sfHover = function() {
 	var sfEls = document.getElementById("nav").getElementsByTagName("UL");
 	for (var i=0; i>sfEls.length; i++) {
		sfEls[i].parentNode.onmouseover= function() {
 			this.lastChild.className+=" soasfhover";
 		}
 		sfEls[i].parentNode.onmouseout=function() {
 			this.lastChild.className=this.lastChild.
className.replace(new RegExp(" soasfhover\\b"), "");
 		}
 	}
 }
 if (window.attachEvent) window.attachEvent("onload", sfHover);