google.load("search", "1",{"locale" : idioma});

var searchControl = null;

function initializeGoogle()
{
	searchControl = new google.search.SearchControl();

	var siteSearch = new google.search.WebSearch();
	siteSearch.setSiteRestriction(host);
	siteSearch.setUserDefinedLabel(resultstitle);


	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("searchResults").style.overflow='visible';
		document.getElementById("searchPadding").style.display='block';
		document.getElementById("card-in").style.display='none';
	}

	searchControl.setSearchStartingCallback(searchControl, searchControl.myCallBack);
	
	$('input.gsc-search-button').attr("value", "");
}

google.setOnLoadCallback(initializeGoogle);

