// JavaScript Document

google.load("search", "1");

function OnLoad()
{
	// Create a search control
	var searchControl = new google.search.SearchControl();
	
	// create a draw options object so that we
	// can position the search form root
	var options = new google.search.DrawOptions();
	options.setSearchFormRoot(document.getElementById("searchForm"));
	
	// Add in a full set of searchers
	var localSearch = new google.search.LocalSearch();
	searchControl.addSearcher(localSearch);
	searchControl.addSearcher(new google.search.WebSearch());
	searchControl.addSearcher(new google.search.VideoSearch());
	searchControl.addSearcher(new google.search.BlogSearch());
	
	// Set the Local Search center point
	localSearch.setCenterPoint("Toronto, ON");
	
	// Tell the searcher to draw itself and tell it where to attach
	searchControl.draw(document.getElementById("searchcontrol"));
	
	searchControl.draw(document.getElementById("searchResults"), options);
	
	// Execute an inital search
	searchControl.execute("Google");
}

google.setOnLoadCallback(OnLoad);
