// this function loops through all anchors and hilites if href matches url
function markCurrentHyperlink() {
	var allHREFs = document.getElementsByTagName("A");
	var filename = window.location.pathname.split("/").pop();
	if (filename.length == 0) {
		filename = "index.shtml";
	}
	
	for (var x = 0; x < allHREFs.length; x++){
		if (allHREFs[x].className == "nav") {
			var thisHREF = allHREFs[x].getAttribute("href");
			if (thisHREF.split("/").pop() == filename) {
				allHREFs[x].className = "navCurrent";
			}
		}
	}
}

// this function highlights the navigation like when mouseover occurs
function activeHyperlink(obj, cls, on) {
	if (on) {
		obj.className = cls + "Active";
	}
	else {
		obj.className = cls;
		// this resets link if link is on the same page as
		if (cls == "nav") {
			markCurrentHyperlink();
		}
	}
}

// big media launcher
function launchBigMedia(mediaFileName) {
		window.open (mediaFileName, "bigMediaWindow", "resizable=1, width=770, height=530");
}

// small media launcher
function launchSmallMedia(mediaFileName) {
	window.open (mediaFileName, "smallMediaWindow", "resizable=1, width=410, height=290");
}
