//Define global variables
var activeSub=0;
var SubNum=0;

var timerID = null;
var timerOn = false;
var timecount = 600;
var what = null;
var newbrowser = true;
var check = false;


//initLayers();


function initNav() {
// example of image rollovers
//	if (thisPage.toString().indexOf("downloads") > 0) { document.downloads_but.src = "http://media.monster.com/a/m/monscar/nav/downloads_nav_on.gif"; }
//	else {document.downloads_but.src = "http://media.monster.com/a/m/monscar/nav/downloads_nav_off.gif"; }
//	if (thisPage.toString().indexOf("fame") > 0) { document.fame_but.src = "http://media.monster.com/a/m/monscar/nav/FAME_nav_on.gif"; }
//	else {document.fame_but.src = "http://media.monster.com/a/m/monscar/nav/FAME_nav_off.gif"; }
//	if (thisPage.toString().indexOf("assessment") > 0) { document.assess_but.src = "http://media.monster.com/a/m/monscar/nav/assesscntr_nav_on.gif"; }
//	else {document.assess_but.src = "http://media.monster.com/a/m/monscar/nav/assesscntr_nav_off.gif"; }
//	if (thisPage.toString().indexOf("bonus") > 0) { document.bonusfeat_but.src = "http://media.monster.com/a/m/monscar/nav/bonusfeat_nav_on.gif"; }
//	else {document.bonusfeat_but.src = "http://media.monster.com/a/m/monscar/nav/bonusfeat_nav_off.gif"; }
}

function reDo(){ window.location.reload() }

window.onresize = reDo;

function initLayers(){
	if (document.layers) {
		//  alert ("Running Netscape 4");
		layerRef="document.layers";
		styleSwitch="";
		visibleVar="show";
		screenSize = window.innerWidth;
		what ="ns4";
	}
	else if(document.all && !document.getElementById) {
		// alert ("Running IE");
		layerRef="document.all";
		styleSwitch=".style";
		visibleVar="visible";
		screenSize = document.body.clientWidth + 18;
		what ="ie";
	}
	else if(document.getElementById) {
		// alert ("Running Netscape 6 or updated IE");
		layerRef="document.getElementByID";
		styleSwitch=".style";
		visibleVar="visible";
		what="moz";
		screenSize = document.documentElement.clientWidth + 18;
	}
	else {
		//alert("Older than 4.0 browser.");
		what="none";
		newbrowser = false;
	}
	// window.status='status bar text to go here';
	check = true;
}

// Turns the layers on and off
function showLayer(layerName){
	if (layerName != "deptsMenu" ) { return; } // shut off unused layers
	if(check){
		if (what =="none"){
			return;
			}
		else if (what == "moz"){
			document.getElementById(layerName).style.visibility="visible";
			}
		else{
			eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
		}
	}
	else { //alert ("Please wait for the page to finish loading.");
		return;}
	}

function hideLayer(layerName){
	if(check){
		if (what =="none"){
			return;
			}
		else if (what == "moz"){
			document.getElementById(layerName).style.visibility="hidden";
			}
		else{
			  eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
		}

	}
	else {// alert ("Please wait for the page to finish loading.");
		return;}
}

function hideAll(){
	hideLayer('deptsMenu');
}


function startTime() {
	if (timerOn == false) {
		timerID=setTimeout( "hideAll()" , timecount);
		timerOn = true;
	}
}

function stopTime() {
	if (timerOn) {
		clearTimeout(timerID);
		timerID = null;
		timerOn = false;
	}
}

function onLoad(){
	init();
}

