var cMenuItems = 8;
var cImageItems = 4;
var secs;
var timerID = null;
var timerRunning = false;
var delay = 1000;

function display(menuNum) {
	for(var i = 1; i <= cMenuItems; i++ ) {
		var menu = 'menu_'+i;
		
		if( i == menuNum )
			document.getElementById(menu).style.display = "block";
		else
			document.getElementById(menu).style.display = "none";
	}
}

function textSize(imgName, imgID, txtSize) {
	if( txtSize == 0 ) {
		if( imgName.id == 'font_'+imgID+'_norm' ) {
			imgName.id = 'font_'+imgID+'_over';
			imgName.src = 'http://www.ferris.edu/tac/images/font_'+imgID+'_over.gif'; 
		} else if( imgName.id != 'font_'+imgID+'_clicked' ) {
			imgName.id = 'font_'+imgID+'_norm';
			imgName.src = 'http://www.ferris.edu/tac/images/font_'+imgID+'_norm.gif';
		}
	} else {
		for(var i = 1; i <= cImageItems; i++ ) {
			if( document.getElementById('font_'+i+'_clicked') != null ) {
				document.getElementById('font_'+i+'_clicked').src = 'http://www.ferris.edu/tac/images/font_'+i+'_norm.gif';
				document.getElementById('font_'+i+'_clicked').id = 'font_'+i+'_norm';
			}
		}
		
		imgName.id = 'font_'+imgID+'_clicked';
		imgName.src = 'http://www.ferris.edu/tac/images/font_'+imgID+'_over.gif';
		document.getElementById('textSpan').style.fontSize = txtSize+'px';
	}
}

function InitializeTimer() {
	// Set the length of the timer, in seconds
	secs = 2;
	StopTheClock();
	StartTheTimer();
}

function StopTheClock() {
	if(timerRunning)
		clearTimeout(timerID);
	timerRunning = false;
}

function StartTheTimer() {
	if (secs==0) {
		StopTheClock();
		// Here's where you put something useful that's
		// supposed to happen after the allotted time.
		// For example, you could display a message:
		for(var i = 1; i <= cMenuItems; i++ ) {
			var menu = 'menu_'+i;
			document.getElementById(menu).style.display = "none";
		}
	} else {
		self.status = secs;
		secs = secs - 1;
		timerRunning = true;
		timerID = self.setTimeout("StartTheTimer()", delay);
	}
}

function bookmark(url,title) {
	if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
		window.external.AddFavorite(url,title);
	} else if (navigator.appName == "Netscape") {
		window.sidebar.addPanel(title,url,"");
	} else {
		alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
	}
}

function sitesearch() {
	var oForm = document.frmHome;
	
	if(oForm.search1.checked) {
		oForm.q.value = "site:www.ferris.edu/techsupport "+oForm.q.value;
	}
}

<!-- Idea by:  Nic Wolfe -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=850,height=650,left=(screen.width-width)/2,top=(screen.height-height)/2');");
}