    var p24search;

    function OnLoad() {
      p24search = new RawSearchControl();
    }

    function RawSearchControl() {
     
      this.searcherform = document.getElementById("searcher");
      this.results = document.getElementById("search_results");
      this.searchform = document.getElementById("searchform");

    
      this.activeSearcher = "web";
      this.searchers = new Array();

      var searcher = new GwebSearch();

      searcher.setNoHtmlGeneration();
      searcher.setSiteRestriction("points24.com");
      searcher.setResultSetSize(GSearch.LARGE_RESULTSET)
      searcher.setSearchCompleteCallback(this,
                                         RawSearchControl.prototype.searchComplete,
                                         [searcher]
                                         );
      this.searchers = searcher;

      
      this.str_id = "";
     
      this.searchForm = new GSearchForm(true, this.searchform);
      this.searchForm.setOnSubmitCallback(this,
                                          RawSearchControl.prototype.onSubmit);
      this.searchForm.setOnClearCallback(this,
                                          RawSearchControl.prototype.onClear);
    }

    
    RawSearchControl.prototype.onSubmit = function(form) 
    {
        if (form.input.value) 
        {
            this.searchers.setQueryAddition("inurl:"+this.str_id);
            this.searchers.execute(form.input.value);
        }
        return false;
    }

    RawSearchControl.prototype.onClear = function(form) 
    {
        this.clearResults();
    }


    RawSearchControl.prototype.searchComplete = function(searcher) 
    {
         // die alten Suchergebnisse werden gelöscht:
         this.clearResults();

         if (searcher.results && searcher.results.length >= 0) 
         {
             this.clearResults();
             if (searcher.results && searcher.results.length >= 0)
             {
                 var php_search = "";
                 for(var i=0;i<searcher.results.length;i++)
                 {
                     /*
                     php_search += searcher.results[i].title;
                     php_search += "|||";
                     php_search += searcher.results[i].content;
                     php_search += "|||";
                     */
                     php_search += searcher.results[i].url;
                     php_search += "{|}";
                 }
                 
		 G_request_neu("result", php_search, this.str_id);
	     }
         }
    }

    /**
     * Funktion clearResults: zum Löschen der alten Suchergebnisse
     */

    RawSearchControl.prototype.clearResults = function() 
    {
        removeChildren(this.results);
    }

    /**
     * Funktion removeChildren(): zum Löschen der Kindelemente eines Elements
     */

    function removeChildren(parent) 
    {
        while (parent.firstChild) {
        parent.removeChild(parent.firstChild);
        }
    }

    // register to be called at OnLoad when the page loads
    GSearch.setOnLoadCallback(OnLoad);

    function fixHeight_2() 
    {
	var h = document.getElementById("search_results").offsetHeight;
	if (h > 5000) { document.getElementById("content").style.height = "4978px"; h = 5000; }
        h = h +70;
        if(h < 540){h = 582};
	document.getElementById("navLeft").style.height = (h-23)+"px";
	document.getElementById("navRight").style.height = h+"px";
        document.getElementById("content").style.height =(h-23)+"px";
    }
