// submit search in header
// CSU Libraries: Garst Wildlife Photos
// Greg Vogl 12/13/2005
function submitSearch() {
	querystring = document.getElementById('q').value;
	// search the Garst Wildlife Photos site using Google
	if (document.getElementById('searchsite').checked) {
		window.location.href = "http://www.google.com/u/csulibraries" 
		+ "?sitesearch=lib.colostate.edu&hq=inurl:lib.colostate.edu/wildlife/&q=" + querystring + "";
	// search animals using the CONTENTdm Garst digital collection
	} else if (document.getElementById('searchanimals').checked) {
		window.location.href = "http://digital.library.colostate.edu/cgi-bin/pquery.exe" 
		+ "?CISOROOT1=/garst" 
		+ "&CISORESTMP=/garst/html/garst_template1.html" 
		+ "&CISOVIEWTMP=/garst/html/garst_template2.html" 
		+ "&CISOOP=all&CISOFIELD1=CISOSEARCHALL&CISOMODE=thumbnails&CISOROWS=2&CISOCOLS=4&x=13&y=8" 
		+ "&CISOBOX1=" + querystring;
	} else {
		alert("error");
	}
	return true;
}
