// Other javascripts used on State Library of Queensland pages.

// Function to allow choice of search engine options via dropdown list.
// Use for page header search boxes on CUE pages
// Developed 2008 02 by Web Manager, State Library of Queensland
// Last updated 2008 07 with Funnelback code Directory search option by Web Mgr, SLQ 


function searchit() {
var sform=document.searchform;
var sterm=escape(sform.queries_include_query.value);
if (sterm != "")
	{
	if (sform.engines.value == "site") 
		{
		var sstring = "http://pan.search.qld.gov.au/search/search.cgi?query=" + sterm + "&collection=qld-gov&form=simple&profile=slq";
		window.location.href = sstring;
		}
/*	if (sform.engines.value == "site") 
		{
		var sstring = "http://www.slq.qld.gov.au/home/search?mode=results&queries_include_query=" + sterm;
		window.location.href = sstring;
		} */
	else if (sform.engines.value == "cat")
		{
		var sstring = "http://srlopac.slq.qld.gov.au/cgi-bin/Pwebrecon.cgi?DB=local&SL=none&Search_Arg=" + sterm + "&Search_Code=GKEY%5E*&CNT=20";
		window.location.href = sstring;
		}
	else if (sform.engines.value == "dir")
		{
		var sstring = "http://pan.search.qld.gov.au/search/search.cgi?query=" + sterm + "&collection=qld-gov&form=simple&profile=libraries";
		window.location.href = sstring;
		}
		/*
	else if (sform.engines.value == "dir")
		{
		var sstring = "http://www.libraries.slq.qld.gov.au/home/search?queries_include_query=" + sterm + "&current_result_page=0&results_per_page=20&submitted_search_category=&mode=";
		window.location.href = sstring;
		} */
	}
	return false;
}