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

var searchControl = null;

function initializeGoogle()
{
	searchControl = new google.search.SearchControl();

	var siteSearch = new google.search.WebSearch();
	siteSearch.setSiteRestriction(host);

	var modeoptions = new google.search.SearcherOptions();
	modeoptions.setExpandMode(google.search.SearchControl.EXPAND_MODE_OPEN);

	var options = new google.search.DrawOptions();
  options.setSearchFormRoot(document.getElementById("googlesearch"));

	searchControl.addSearcher(siteSearch, modeoptions);

	searchControl.setResultSetSize(google.search.Search.LARGE_RESULTSET);

	searchControl.draw(document.getElementById("searchResults"), options);

	searchControl.myCallBack = function() {
		document.getElementById("mostInnerDiv").style.display='none';
	}

	searchControl.setSearchStartingCallback(searchControl, searchControl.myCallBack);
}

google.setOnLoadCallback(initializeGoogle);
