function validateAndSubmitSearch(form) {
	if(form.search.value == "Search Music" || form.search.value == "") {
		// no search submitted on "Search Music" or empty searches
		form.search.focus() // places cursor back in the search field
		return false //stops the form from being submitted
	} else {
		form.search.value = form.search.value + " site:www.csuchico.edu/mus/" //search only mus/ site
		return true
	}
}

startList = function() {
if (document.all&&document.getElementById) {
	topnavRoot = document.getElementById("navBar");
	leftnavRoot = document.getElementById("navList");
	
	for (i=0; i<topnavRoot.childNodes.length; i++) {
		node = topnavRoot.childNodes[i];
		if (node.nodeName=="LI") {
			node.onmouseover=function() {
				this.className+=" over";
			}
			node.onmouseout=function() {
				this.className=this.className.replace(" over", "");
			}
		}
	}
	
	for (i=0; i<leftnavRoot.childNodes.length; i++) {
		node = leftnavRoot.childNodes[i];
		if (node.nodeName=="LI") {
			node.onmouseover=function() {
				this.className+=" over";
			}
			node.onmouseout=function() {
				this.className=this.className.replace(" over", "");
			}
		}
	}
 }
}
window.onload=startList;


function selectInteriorImage() {
	var randNum = Math.round(Math.random()*16)+1
	document.write("<img src='http://www.csuchico.edu/mus/images/interior_rotating/" + randNum + ".jpg' alt='Interior page rotating photo' name='interior_rotating_photo' border='0' id='interio_rotatingr_photo' />")
	//alert(randNum)
}
