// Java Document
var searchControl;
function OnLoad() {
	// Create a search control
	searchControl = new GSearchControl();
	
	// site restricted web search with custom label
	// and class suffix
	var siteSearch = new GwebSearch();
	siteSearch.setUserDefinedLabel("Clarus Systems");
	//siteSearch.setUserDefinedClassSuffix("siteSearch");
	siteSearch.setSiteRestriction("clarussystems.com");
	
	
	// web search, open, alternate root
	// Allows the results to be expanded
	// Tells the searcher where to bind the results
	var options = new GsearcherOptions();
	options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);
	options.setRoot(document.getElementById("results"));
	
	// Add our customer seacher to the search control object
	searchControl.addSearcher(siteSearch, options);
	
	// Establish a keep callback
	searchControl.setOnKeepCallback(null, DummyClipSearchResult);
	
	// tell the searcher to draw itself and tell it where to attach
	searchControl.draw(document.getElementById("searchcontrol"));	  
	
	// execute an inital search
	searchControl.setResultSetSize(GSearch.LARGE_RESULTSET);
	//searchControl.execute("voip");	
	executeSearch();
}

function DummyClipSearchResult(result) {}

GSearch.setOnLoadCallback(OnLoad);

