function startup() {
	// highlight the current mainNav button
	var loc = window.location.toString();
	var aid;
	if (loc.indexOf(".index.") != -1 || loc.charAt(loc.length-1) == "/") {
		aid = "home";
	} else if (loc.indexOf(".browse.") != -1 || loc.indexOf(".details.") != -1 || loc.indexOf(".gallery.") != -1) {
		aid = "browse";
	} else if (loc.indexOf(".search.") != -1 || loc.indexOf(".terms.") != -1) {
		aid = "search";
	} else if (loc.indexOf(".help.") != -1) {
		aid = "help";
	} else if (loc.indexOf(".whatsnew.") != -1) {
		aid = "whatsnew";
	} else {
		aid = "home";
	}
	document.getElementById(aid).style.background = "#1B325E";
	
	// if browsing authors, include dropdown script
	if (loc.indexOf(".browse.authors.") != -1 || loc.indexOf(".search.advanced.results.") != -1) {
		AutoLoadDropDowns();
	}
}
// menu dropdown
var menuids = ["first"];
function buildsubmenus_horizontal() {
for (var i = 0 ; i < menuids.length ; i++) {
  var ultags = document.getElementById(menuids[i]).getElementsByTagName("ul");
    for (var t = 0 ; t < ultags.length ; t++) {
			if (ultags[t].parentNode.parentNode.id == menuids[i]) {
				ultags[t].style.top = ultags[t].parentNode.offsetHeight + "px";
			} else {
		  	ultags[t].style.left = ultags[t - 1].getElementsByTagName("a")[0].offsetWidth + "px";
			}
    	ultags[t].parentNode.onmouseover = function() {
    		this.getElementsByTagName("ul")[0].style.visibility = "visible";
    	}
    	ultags[t].parentNode.onmouseout = function() {
    		this.getElementsByTagName("ul")[0].style.visibility = "hidden";
    	}
    }
  }
}

if (window.addEventListener) {
	window.addEventListener("load", buildsubmenus_horizontal, false);
} else if (window.attachEvent) {
	window.attachEvent("onload", buildsubmenus_horizontal);
}