// JavaScript Document

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);

//write NN4 stylesheet if not version5 browser
if(!document.getElementById){
document.write('<link href="/css/nonstandard.css" rel="stylesheet" type="text/css" />');
document.close();
}

// Popup Menus
// created by Jamin Hegeman, Web Specialist
// University of Pittsburgh Web Team
// 2004

document.onclick = hideAllMenus;

var numMenus = 10
var timeout = null

function closeMe()  {
	window.self.close()
}

function showSubMenu(subMenu) {
	if (!document.getElementById) return;
	hideAllMenus()
	timerOff()
	document.getElementById(subMenu).style.visibility="visible"
	document.getElementById('content-cover').style.visibility="visible"
	document.getElementById('nav' + subMenu.substr(4,6)).style.color="#CC0000"
	document.getElementById('nav' + subMenu.substr(4,6)).style.fontWeight="bold"			
}

function hideAllMenus() {
  for(counter = 1; counter <= numMenus; counter++) {
		if(document.getElementById('menu' + counter) != null) {
			document.getElementById('menu' + counter).style.visibility="hidden"
			document.getElementById('content-cover').style.visibility="hidden"
			document.getElementById('nav' + counter).style.color="#333333"
			document.getElementById('nav' + counter).style.fontWeight="normal"	
  	}
	}
}

function timerOn() {
	timeout = setTimeout("hideAllMenus()", 700)
}
function timerOff() {
	clearTimeout(timeout)
}
 
// function NewWindow(mypage, myname, w, h, scroll) {
// var winl = 0 +30;
// var wint = 0 +30;
// winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',toolbar=no,location=no, scrollbars='+scroll+',resizable'
// win = window.open(mypage, myname, winprops)
// if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
// }