// JavaScript Document//<![CDATA[
	
	function MyKeepHandler(result) {
	  // clone the result html node
	  var node = result.html.cloneNode(true);
	
	  // attach it
	  var savedResults = document.getElementById("saved_results");
	  savedResults.appendChild(node);
	}

    function OnLoad() {

	  // Create a search control
      var searchControl = new GSearchControl();
	  var mode = GSearchControl.DRAW_MODE_TABBED;
	  
	  // establish a keep callback
	  //////////////////searchControl.setOnKeepCallback(this, MyKeepHandler);
 	  // create a searcher options object
	  // set up for open expansion mode
	  // load a searcher with these options
	  var options = new GsearcherOptions();
	  options.setExpandMode(GSearchControl.EXPAND_MODE_CLOSED);//EXPAND_MODE_PARTIAL , EXPAND_MODE_CLOSED, EXPAND_MODE_OPEN
  
      // Add in a full set of searchers
      
  	  searchControl.addSearcher(new GwebSearch, options);
      searchControl.addSearcher(new GvideoSearch(), options);
      searchControl.addSearcher(new GblogSearch(), options);
      searchControl.addSearcher(new GnewsSearch(), options);
      searchControl.addSearcher(new GbookSearch(), options);
	  //site search-forums
	  var searcher = new GwebSearch();
  	  options = new GsearcherOptions();
	  searcher.setSiteRestriction("000455696194071821846:community");
	  searcher.setUserDefinedLabel("Forums");
	  searchControl.addSearcher(searcher, options);
	  //site search-prices comparisons
	  var searcher = new GwebSearch();
      options = new GsearcherOptions();
      searcher.setSiteRestriction("000455696194071821846:comparisons");
      searcher.setUserDefinedLabel("Prices");
      searchControl.addSearcher(searcher, options);
      
	  //site search-prices shop
	  var searcher = new GwebSearch();
      options = new GsearcherOptions();
      searcher.setSiteRestriction("000455696194071821846:shopping");
      searcher.setUserDefinedLabel("Shopping");
      searchControl.addSearcher(searcher, options);
      // site restricted web search using a custom search engine
		var siteSearch = new GwebSearch();
			siteSearch = new GwebSearch();
			siteSearch.setUserDefinedLabel("Product Reviews");
			siteSearch.setSiteRestriction("000455696194071821846:reviews");
			searchControl.addSearcher(siteSearch);
	  //site search-wiki
	  var searcher = new GwebSearch();
  	  options = new GsearcherOptions();
	  searcher.setSiteRestriction("wikipedia.org");
	  searcher.setUserDefinedLabel("WikiPedia");
	  searchControl.addSearcher(searcher, options);
	  //site search-answers
	  var searcher = new GwebSearch();
  	  options = new GsearcherOptions();
	  searcher.setSiteRestriction("answers.com");
	  searcher.setUserDefinedLabel("Answers");
	  searchControl.addSearcher(searcher, options);
	  //site search-eBay
	  var searcher = new GwebSearch();
  	  options = new GsearcherOptions();
	  searcher.setSiteRestriction("ebay.com");
	  searcher.setUserDefinedLabel("eBay");
	  searchControl.addSearcher(searcher, options);
	  //site search-Amazon
	  var searcher = new GwebSearch();
  	  options = new GsearcherOptions();
	  searcher.setSiteRestriction("Amazon.com");
	  searcher.setUserDefinedLabel("Amazon");
	  searchControl.addSearcher(searcher, options);
	  //search Local
	  var localSearch = new GlocalSearch();
      searchControl.addSearcher(localSearch, options);
	  options = new GsearcherOptions();
	  options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);//EXPAND_MODE_PARTIAL , EXPAND_MODE_CLOSED, EXPAND_MODE_OPEN
	
      // create a drawOptions object
	  var drawOptions = new GdrawOptions();

	  // tell the searcher to draw itself in linear mode
	  drawOptions.setDrawMode(mode);//DRAW_MODE_LINEAR , DRAW_MODE_TABBED
	  var element = document.getElementById("searchcontrol");
	  // Tell the searcher to draw itself and tell it where to attach
	  searchControl.draw(element, drawOptions);

	  GSearch.getBranding(document.getElementById("branding"));

      // Execute an inital search
      searchControl.execute("");
    }
    GSearch.setOnLoadCallback(OnLoad);
    //]]>