// Google Control JS handling functions
function LoadVideoBar($searchstring) {
var $videoBar;
var options = {
	largeResultSet : !true,
	horizontal : true,
	autoExecuteList : {
		cycleTime : GSvideoBar.CYCLE_TIME_MEDIUM,
		cycleMode : GSvideoBar.CYCLE_MODE_LINEAR,
		//executeList : ["bowie"]
		executeList : [$searchstring]
	}
}

$videoBar = new GSvideoBar(document.getElementById("videoBar-bar"),
			GSvideoBar.PLAYER_ROOT_FLOATING,
			options);
}
    
function LoadSearchBar($searchstring) {
	var $searchControl = new GSearchControl();
	$options = new GsearcherOptions();
	$options.setExpandMode(GSearchControl.EXPAND_MODE_PARTIAL);
	$options.setRoot(document.getElementById("searchResults"));
	// Add in a WebSearch
	var $webSearch = new GwebSearch();
	// Restrict our search to applications from the Cartoon Newtowrk
	$webSearch.setSiteRestriction('http://en.wikipedia.org');
	
	$webSearch.setUserDefinedLabel("Wikipedia");
	$webSearch.setUserDefinedClassSuffix("siteSearch");
	// Add the searcher to the SearchControl
	//$searchControl.addSearcher(webSearch);
	$searchControl.addSearcher($webSearch,$options);
	//$searchControl.addSearcher(new GwebSearch(),options);
	//options = new GsearcherOptions();
	//options.setExpandMode(GSearchControl.EXPAND_MODE_CLOSED);
	//$searchControl.addSearcher(new GblogSearch(),options);
	//$searchControl.addSearcher(new GnewsSearch(),options);
	//$searchControl.addSearcher(new GbookSearch(),options);
	
	//Set the Local Search center point
	//localSearch.setCenterPoint("New York, NY");
	
	//Tell the searcher to draw itself and tell it where to attach
	//Simply draw the control in default linear mode
	$searchControl.draw(document.getElementById("searchControl"));
	
	//Execute an inital search
	$searchControl.execute($searchstring); 
}

