function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function showMenu(which) {
	offset = document.getElementById("navtable").offsetLeft + document.getElementById("menubox").offsetLeft;
	hideMenus();
	var dropObj = document.getElementById(which.id + "drop");
	dropObj.style.left = (offset + which.offsetLeft) + "px"; 	dropObj.style.top = which.offsetTop + 44 + "px";
	dropObj.style.visibility = "visible";
}

function hideMenus() {
	document.getElementById("electromechanicaldrop").style.visibility = "hidden";
	document.getElementById("regulatorydrop").style.visibility = "hidden";
	document.getElementById("surgicaldrop").style.visibility = "hidden";
	document.getElementById("companydrop").style.visibility = "hidden";
}

function highlight(which,direction) {
	if (direction == "show") {
		eval("document." + which.id + "line.src = \"http://www.medicept.com/graphics/lightpurpleline.gif\"");
		which.style.color = "#000000";
	} else 	if (direction == "show2") {
		which.style.color = "#333333";
		which.style.background = "#CCCCCC";
	} else 	if (direction == "hide" && which.id != whichpage) {
		eval("document." + which.id + "line.src = \"http://www.medicept.com/graphics/grayline.gif\"");
		which.style.color = "#666666";
	} else 	if (direction == "hide2") {
		which.style.color = "#CCCCCC";
		which.style.background = "#333333";
	} else {
		eval("document." + which.id + "line.src = \"http://www.medicept.com/graphics/purpleline.gif\"");
	}
}

document.onmouseup = function () {
	hideMenus();
};

window.onload = function () {
	document.getElementById("electromechanicaldrop").style.top = "-1000px";
	document.getElementById("regulatorydrop").style.top = "-1000px";
	document.getElementById("surgicaldrop").style.top = "-1000px";
	document.getElementById("companydrop").style.top = "-1000px";
	eval("document." + whichpage + "line.src = \"http://www.medicept.com/graphics/purpleline.gif\"");
	document.getElementById(whichpage).style.color = "#000000";
};

window.onresize = function () {
	hideMenus();
	return true;
};