function loadFunction(){
	checkSafari();
	initDD();
	startList();
}


//Builds the menus
//Scans the array of navs, pulls lis, looks for LI that has an ID.
//If true, adds the appropriate defined list string to the innerHTML.
var dropNavs = new Array("nav");


function initDD(){
	for (var i = 0; i < dropNavs.length; i++){
		var dropLIs = document.getElementById(dropNavs[i]).getElementsByTagName('li');
		for (var a = 0; a < dropLIs.length; a++){
			if(dropLIs[a].id){
				var currentValue = dropLIs[a].innerHTML;
				dropLIs[a].innerHTML = currentValue + (eval(dropLIs[a].id + "List"));
			}
		}
	}
}


//Builds mouse fly out functions
//Checks to see if its IE, if true, adds mouseover function that changes class name.
//Class name has the styles to for the dropdown to work. CSS based flyouts.
startList = function() {
	if ((document.all&&document.getElementById) || safStatus) {
		var sfEls = document.getElementById("nav").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {

			sfEls[i].onmouseover=function() {
				if(!safStatus)	this.className+=" sfhover";
				else if(document.getElementById("flashObj")) document.getElementById("flashObj").style.visibility = "hidden";
			}
			sfEls[i].onmouseout=function() {
				if(!safStatus)	this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
				else if(document.getElementById("flashObj")) document.getElementById("flashObj").style.visibility = "visible";
			}
		}
	}
}
//Checks to see if safari is on, boolean
var detect = navigator.userAgent.toLowerCase();
var safStatus,thestring;
function checkSafari(){	
	if (checkIt('safari')) safStatus = true;
	else safStatus = false;
	function checkIt(string){
		place = detect.indexOf(string) + 1;
		return place;
	}

}
