       // the cse class encapsulates a left and right search control
      // both controls are driven by a shared search form
      
      google.load('search', '1');
      
      function cse() {
        var sFormDiv = document.getElementById('GoogleSearchForm');
        var leftScDiv = document.getElementById('GoogleSearchControl');

        // create a left, right search control
        // create a custom search form
        this.leftControl = 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 large result sets
        this.leftControl.setResultSetSize(GSearch.LARGE_RESULTSET);
        this.leftControl.setLinkTarget(GSearch.LINK_TARGET_SELF);

        var searcher;
        var options;

        // configure left control
        // Site Restrict to CSE ID
        var cseId = '012022975320337888434:anwklm8whjy';
        searcher = new GwebSearch();
        options = new GsearcherOptions();
        searcher.setSiteRestriction(cseId, null)
        searcher.setUserDefinedLabel('Rezultati pretrazivanja glasnika');
        options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);
        this.leftControl.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_LINEAR);
        drawOptions.setSearchFormRoot(sFormDiv);

        this.leftControl.draw(leftScDiv, drawOptions);

        // execute a starter search
        //this.searchForm.execute('Dozvola');

      }

      // 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);
        }
        return false;
      }

      // when the form fires a clear, call the left and right control
      cse.prototype.onClear = function(form) {
        this.leftControl.clearAllResults();
        //this.rightControl.clearAllResults();
        form.input.value = '';
        return false;
      }

      function OnLoad() {
        new cse();
      }
      //GSearch.setOnLoadCallback(OnLoad);
      google.setOnLoadCallback(OnLoad);
      
     // alert('tu sam');
