//<![CDATA[
function searchStart(searchControl, searcher, query)
{
	// alert('Searching for: ' + query);
	//con = document.getElementById('content');
	//con.style.display = none;
}

// Loading the Google AJAX Search API version 1.0 from Google using the API Key
google.load('search', '1');
var searchControl;

function OnLoad()
{
	// create a tabbed mode search control
	var tabbed = new google.search.SearchControl();
	tabbed.setResultSetSize(GSearch.LARGE_RESULTSET);
	
	var giodo = new google.search.WebSearch();;
	giodo.setUserDefinedLabel("Znaleziono w serwisach GIODO");
	giodo.setSiteRestriction("www.giodo.gov.pl");

  // Set a callback so that whenever a search is started we will call searchStart
  tabbed.setSearchStartingCallback(this, searchStart);

/*
	//tylko PDF
	//search.setQueryAddition("filetype:pdf");
	
	var edugiodo = new google.search.WebSearch();
	edugiodo.setUserDefinedLabel("Znaleziono w: edugiodo");
	edugiodo.setSiteRestriction("edugiodo.giodo.gov.pl");
	
	var egiodo = new google.search.WebSearch();
	egiodo.setUserDefinedLabel("Znaleziono w: egiodo");
	egiodo.setSiteRestriction("egiodo.giodo.gov.pl");
*/

//	largeresultset
	tabbed.addSearcher(giodo);
//	tabbed.addSearcher(edugiodo);
//	tabbed.addSearcher(egiodo);

	// draw in tabbed layout mode
	var drawOptions = new google.search.DrawOptions();
	drawOptions.setDrawMode(google.search.SearchControl.DRAW_MODE_TABBED);
	drawOptions.setSearchFormRoot(document.getElementById("searchForm"));

	tabbed.draw(document.getElementById("results"), drawOptions);

	tabbed.execute("");
}

google.setOnLoadCallback(OnLoad, true);

//]]>



