<!-- This function creates a catalog search string from the users text input and submits it to the catalog -->


function CatalogSearch(frmSearch)
{
	if ((frmSearch.elements["txtKeyword"].value != "")&&(frmSearch.elements["txtKeyword"].value != "search for?"))
	{
	var searchString = "http://fcplcat.fairfaxcounty.gov/uhtbin/cgisirsi/x/0/0/5?searchdata1=";

		if (frmSearch.elements["title"].checked == true)
		{
			var searchTerm = (frmSearch.elements["txtKeyword"].value);
			searchString = searchString + searchTerm + "{245}&library=ALL&user_id=GUEST&password=1111";
			window.location = searchString;
			return false;
		  
		}
		else if (frmSearch.elements["author"].checked == true)
		{
			var searchTerm = (frmSearch.elements["txtKeyword"].value);
			searchString = searchString + searchTerm + "{100}&library=ALL&user_id=GUEST&password=1111";
			window.location = searchString;
			return false;
		}
	}
	else
	{
	window.alert("Please enter a search term.");
	return false;
	}
}
