// JavaScript Document


function selectHomeImage() {
	var randNum = Math.round(Math.random()*14)+1
	document.write("<img src='http://www.csuchico.edu/vpaa/FA/images/homePhotos/" + randNum + ".jpg' alt='' name='photo' width='436' height='256' />")
	//alert(randNum)
}

function selectInteriorImage() {
	var randNum = Math.round(Math.random()*31)+1
	document.write("<img src='http://www.csuchico.edu/vpaa/FA/images/interiorPhotos/" + randNum + ".jpg' alt='' name='photo' width='161' height='266' />")
	//alert(randNum)
}

function validateAndSubmitSearch(form) {
	if(form.search.value == "Search Chico State" || form.search.value == "") {
		// no search submitted on "Search Chico State" 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/dss/" //search only usrv site
		return true
	}
}