
google.load('search', '1');
    
function OnLoad() 
{

/*
  // Dynamically load CSS to override defaults
  var css = document.createElement('link');
  css.href = '../../css/gsearch_green.css';
  css.type = 'text/css';
  css.rel = 'stylesheet';
  document.getElementsByTagName('head')[0].appendChild(css);
*/
                                                   
  // Create a search control
  var searchControl = new google.search.SearchControl();
  // site restricted web search with custom label
  // and class suffix
  var siteSearch = new google.search.WebSearch();
  siteSearch.setUserDefinedLabel("Sito UILT");
  siteSearch.setUserDefinedClassSuffix("siteSearch");
  siteSearch.setSiteRestriction("uilt.it");
  searchControl.addSearcher(siteSearch);

  // standard, unrestricted web search
  searchControl.addSearcher(new google.search.WebSearch());
  
  // draw in tabbed layout mode
  var drawOptions = new google.search.DrawOptions();
  drawOptions.setDrawMode(google.search.SearchControl.DRAW_MODE_TABBED);
  //drawOptions.setInput(document.getElementById('query'));
  //options.setExpandMode(google.searh.SearchControl.EXPAND_MODE_OPEN);
  //options.setRoot(document.getElementById("searchres"))

  // tell the searcher to draw itself and tell it where to attach
  searchControl.draw(document.getElementById("searchcontrol"),drawOptions);

}

google.setOnLoadCallback(OnLoad, true);
