
///////////////////////////////////////////
// Content swapping script
// Rotates 'In The Spotlight' Items
///////////////////////////////////////////

function swapContent(showItem,totalDivs) {
	// swap spotlight divs
	for(i=0; i<totalDivs; i++){ 
		showDiv = 'spotlight_' + i;
		activeNumber = 'spotlight_number_' + i;
		
		if(i==showItem){
			document.getElementById(showDiv).className="show";
			document.getElementById(activeNumber).className="active";
		}else{
			document.getElementById(showDiv).className="hide";
			document.getElementById(activeNumber).className=" ";
		} 
	}
}


///////////////////////////////////////////
// Site search validator
// Checks for required items in site search
///////////////////////////////////////////

function validateSiteSearchForm(){
	// Set the default error message
	errmsg = "What do you want to search for?";
	if (document.sSearchForm.searchWords.value=="" || document.sSearchForm.searchWords.value=="Search"){
		errmsg += "\n\nEnter your keyword(s) in the search box\nat the top of the page.\n\n";
	}
	//Check to see if we added anything to the default error message
	if (errmsg != "What do you want to search for?"){
		alert(errmsg);
		return false;
	}

return true;
}


