﻿function searchGoogle(sText) {
  // Create a search control
  var searchControl = new GSearchControl();
  var options = new GsearcherOptions();
  var allWebSearch = new GwebSearch();
  var allBlogSearch = new GblogSearch();

　options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);
  allWebSearch.setUserDefinedLabel("Web 全体");
  allBlogSearch.setUserDefinedLabel("Google Blog 検索");
  
  searchControl.setResultSetSize(GSearch.SMALL_RESULTSET);
  searchControl.addSearcher(allBlogSearch, options);
  searchControl.addSearcher(allWebSearch, options);

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

  // Execute an inital search
  searchControl.execute(sText);
}

function searchGoogle2(sText) {
  // Create a search control
  var searchControl = new GSearchControl();
  var options = new GsearcherOptions();
  var allWebSearch = new GwebSearch();
  var allBlogSearch = new GblogSearch();

　options.setExpandMode(GSearchControl.EXPAND_MODE_CLOSED);
  allWebSearch.setUserDefinedLabel("Web 全体");
  allBlogSearch.setUserDefinedLabel("Google Blog 検索");
  
  searchControl.setResultSetSize(GSearch.LARGE_RESULTSET);
  searchControl.addSearcher(allBlogSearch, options);
  searchControl.addSearcher(allWebSearch, options);

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

  // Execute an inital search
  searchControl.execute(sText);
}
