   
    function getObj(namevar)
    {
        if (document.getElementById)
        {
            var objekt = document.getElementById(namevar);
        }
        else if (document.all)
        {
            var objekt = document.all[namevar];
        }
        else if (document.layers)
        {
            var objekt = document.layers[namevar];
        }
        return objekt;
    }
    
    function submit_formularza( klawisz )
    {
        if( window.event )
        {
            keynum = klawisz.keyCode; 
        }
        else 
            if( klawisz.which )
            {
                keynum = klawisz.which;
            }
           
        return keynum;
    }
    
    function zmien_styl ( id, klasa )
    {
        this.id = id;
        this.klasa = klasa;
            
        id.className = klasa;
    }
    
    function otworz_okno( adres, szerokosc, wysokosc ) 
    {
        var od_left = window.screen.width/2-szerokosc/2;
        var od_top = window.screen.height/2-wysokosc/2;
        
        noweOkno = window.open(adres, 'okienko', 'menubar=no, toolbar=no, location=no, scrollbars=yes, resizable=yes, status=no, width=' + szerokosc + ', height=' + wysokosc + ', left=' + od_left + ', top=' + od_top )
    }
    
    function printwindow( strona )
    {
        this.strona = strona;
        w = 570;
        h = 640;
        x=(window.screen.width-w)/2;
        y=(window.screen.height-h)/3;
        var url=document.location + "";

        server='http://www.cms.help.wroc.pl/';
        noweOkno = window.open(server+strona,'druk','menubar=no,toolbar=no,location=no,scrollbars=yes,resizable=no,status=no,width='+w+',height='+h+',left='+x+',top='+y);
        noweOkno.focus();
    };

    
    
    
    
    
    
    
    
    
    
    
    
    
   function doHighlight( bodyText, searchTerm, highlightStartTag, highlightEndTag ) 
   {
      if ( (!highlightStartTag) || (!highlightEndTag) ) 
      {
         highlightStartTag = "<span style='color: #ffffff; background-color: #be8b06; font-weight: bold;'>";
         highlightEndTag = "</span>";
      }
      
      var newText = "";
      var i = -1;
      var lcSearchTerm = searchTerm.toLowerCase();
      var lcBodyText = bodyText.toLowerCase();
      
      while ( bodyText.length > 0 ) 
      {
         i = lcBodyText.indexOf( lcSearchTerm, i+1 );
         if ( i < 0 ) 
         {
            newText += bodyText;
            bodyText = "";
         }
         
         else 
         {
            if ( bodyText.lastIndexOf(">", i) >= bodyText.lastIndexOf("<", i) ) 
            {
               if ( lcBodyText.lastIndexOf("/script>", i) >= lcBodyText.lastIndexOf("<script", i) ) 
               {
                  newText += bodyText.substring(0, i) + highlightStartTag + bodyText.substr(i, searchTerm.length) + highlightEndTag;
                  bodyText = bodyText.substr(i + searchTerm.length);
                  lcBodyText = bodyText.toLowerCase();
                  i = -1;
               }
            }
         }
      }
      
      return newText;
   }

   function highlightSearchTerms(searchText, treatAsPhrase, warnOnFailure, highlightStartTag, highlightEndTag, id) 
   {
      if (treatAsPhrase) 
      {
         searchArray = [searchText];
      } else 
      {
         searchArray = searchText.split(" ");
      }
      
      if (!document.getElementById(id) || typeof(document.getElementById(id).innerHTML) == "undefined") 
      {
         if (warnOnFailure) 
         {
            alert("Sorry, for some reason the text of this page is unavailable. Searching will not work.");
         }
         
         return false;
      }
      
      var bodyText = document.getElementById(id).innerHTML;
      for (var i = 0; i < searchArray.length; i++) 
      {
         bodyText = doHighlight(bodyText, searchArray[i], highlightStartTag, highlightEndTag);
      }
      
      document.getElementById(id).innerHTML = bodyText;
      return true;
   }
    
