// JavaScript Document

var menuItems = new Array("home", "services", "portfolio", "aboutus", "contactus", "sitemap");

startList = function() { 
	for(var i = 0; i < menuItems.length; i++) {
		if ((document.all&&document.getElementById)  && (navigator.platform.indexOf("Mac") == -1)) { 
		  node = document.getElementById(menuItems[i]); 
				node.onmouseover=function() { 
				  this.className+=" over"; 
				} 
				node.onmouseout=function() { 
					this.className=this.className.replace (" over", "");
				}
		}
	}
}
window.onload=startList;

function emailTo(address, suffix) {
	alert(unescape('destillman@yahoo.com'));
}

function rightImg() {
	var randNum1 = Math.round(Math.random()*11)+1;
	document.write('<div class="rightimg"><img src="/images/'+randNum1+'.jpg" alt="" /></div>');
}

function validateAndSubmitSearch(form) {
	if(form.q.value == form.q.value == "") {
		// no search submitted on "Search Chico State" or empty searches
		form.q.focus() // places cursor back in the search field
		return false //stops the form from being submitted
	} else {
		form.q.value = form.q.value + " site:imcproductions.csuchico.edu" //search only imc productions site
		return true
	}
}