     // the cse class encapsulates a left and right search control
      // both controls are driven by a shared search form
      function cse() {
        var sFormDiv = document.getElementById("searchForm");
        var leftScDiv = document.getElementById("leftSearchControl");
        var rightScDiv = document.getElementById("rightSearchControl");

        // create a left, right search control
        // create a custom search form
        this.leftControl = new GSearchControl();
       this.rightControl = new GSearchControl();
        this.searchForm = new GSearchForm(true, sFormDiv);

        // bind clear and submit functions
        this.searchForm.setOnSubmitCallback(this, cse.prototype.onSubmit);
        this.searchForm.setOnClearCallback(this, cse.prototype.onClear);

        // set up for small result sets
        this.leftControl.setResultSetSize(GSearch.LARGE_RESULTSET);
        this.rightControl.setResultSetSize(GSearch.LARGE_RESULTSET);

        var searcher;
        var options;

        // configure left control
        // Site Restrict to CSE ID for reviews
        searcher = new GwebSearch();
        options = new GsearcherOptions();
        searcher.setUserDefinedLabel("Sur le Web");
        options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);
        this.leftControl.addSearcher(searcher, options);
 
	      // configure right control for
 
            searcher = new GnewsSearch();
        this.rightControl.addSearcher(searcher);
	searcher = new GlocalSearch();
        this.rightControl.addSearcher(searcher);
   searcher = new GblogSearch();
        this.rightControl.addSearcher(searcher);
		 searcher = new GimageSearch()
		     this.rightControl.addSearcher(searcher);
	
	
		    searcher = new GbookSearch();
        this.rightControl.addSearcher(searcher);
		
		
		 searcher = new GwebSearch();
        options = new GsearcherOptions();
        searcher.setSiteRestriction("http://fr.wikipedia.org");
        searcher.setUserDefinedLabel("dico");
        this.rightControl.addSearcher(searcher, options);
  		
		searcher = new GwebSearch();
        options = new GsearcherOptions();
        searcher.setSiteRestriction("000455696194071821846:community");
       searcher.setUserDefinedLabel("Forums");
        this.rightControl.addSearcher(searcher, options);

		

        // draw the left and right controls
        // the right control is drawn in tabbed mode
        var drawOptions = new GdrawOptions();
        drawOptions.setDrawMode(GSearchControl.DRAW_MODE_TABBED);

        this.leftControl.draw(leftScDiv);
        this.rightControl.draw(rightScDiv, drawOptions);

        // bind in a videobar
        var videoBarDiv = document.getElementById("videoBar");
        var videoPlayerDiv = document.getElementById("videoPlayer")
        var vboptions = {
         largeResultSet : true,
          horizontal : true
        }

        this.videoBar = new GSvideoBar(videoBarDiv, videoPlayerDiv, vboptions);

        // execute a starter search
        this.searchForm.execute("");

      }

      // when the form fires a submit, grab its
      // value and call the left and right control
      cse.prototype.onSubmit = function(form) {
        var q = form.input.value;
        if (q && q!= "") {
          this.leftControl.execute(q);
          this.rightControl.execute(q);
          this.videoBar.execute(q);
       }
        return false;
      }

      cse.prototype.onClear = function(form) {
        this.leftControl.clearAllResults();
        this.rightControl.clearAllResults();

       this.videoBar.clearAllResults();
        form.input.value = "";
       return false;
      }

      function OnLoad() {
        new cse();
      }
      GSearch.setOnLoadCallback(OnLoad);
      
      App.prototype.onSubmit = function(form) {
  if (form.input.value) {
    this.localSearcher.execute(form.input.value);
  }
  return false;
}

