// Autorem skryptu jest: S?AWOMIR KOK?OWSKI
// www.kurshtml.boo.pl
// Je?li chcesz wykorzysta? ten skrypt na swojej stronie, nie usuwaj tego komentarza!


function tree(id)
{
  this.id = id;

  this.click = function ()
  {
    for (var i = 0, el_node; i < this.parentNode.childNodes.length; i++)
    {
      el_node = this.parentNode.childNodes.item(i)
      if (el_node.nodeName.toLowerCase() == 'ul')
      {
        el_node.style.display = el_node.style.display == 'none' ? 'block' : 'none';
        this.parentNode.style.backgroundImage = 'url("' + (el_node.style.display == 'none' ? 'closed' : 'opened') + '.gif")';
        return;
      }
    }
  }

  this.start = function (el)
  {
    for (var i = 0, el_node; i < el.childNodes.length; i++)
    {
      el_node = el.childNodes.item(i);
      if (el_node.nodeName.toLowerCase() == 'a')
      {
        el_node.onclick = this.click;
        for (var j = 0; j < el_node.parentNode.childNodes.length; j++)
        {
          if (el_node.parentNode.childNodes.item(j).nodeName.toLowerCase() == 'ul')
          {
            el_node.parentNode.style.backgroundImage = 'url("closed.gif")';
            el_node.className = (el_node.className ? el_node.className + ' ' : '') + 'folder';
            break;
          }
          if (el_node.parentNode.childNodes.item(j).nodeName.toLowerCase() == 'li') break;
        }
        if (el_node.href && unescape(el_node.href) == unescape(window.location.href))
        {
          el_node.className = 'active';
          var el_parentNode = el_node;
          do
          {
            el_parentNode = el_parentNode.parentNode;
            if (el_parentNode.nodeName.toLowerCase() == 'ul')
            {
              el_parentNode.style.display = 'block';
              if (document.getElementById(this.id) != el_parentNode) el_parentNode.parentNode.style.backgroundImage = 'url("opened.gif")';
            }
          }
          while (document.getElementById(this.id) != el_parentNode)
        }
      }
      else if (el_node.nodeName.toLowerCase() == 'ul') el_node.style.display = 'none';
      this.start(el_node);
    }
  }

  if (document.getElementById && document.childNodes)
  {
    if (document.images)
    {
      new Image().src = 'opened.gif';
      new Image().src = 'document.gif';
    }
    this.start(document.getElementById(this.id));
  }
}
<!--
// Autorem skryptu jest: SŁAWOMIR KOKŁOWSKI
// www.kurshtml.boo.pl
// Jeśli chcesz wykorzystać ten skrypt na swojej stronie, nie usuwaj tego komentarza!


function przycisk(podstawowy, wskazany, klikniety, tekst)
{
  if (document.images)
  {
    this.name = "img" + przyciski.length;
    if (podstawowy) { this.normal = new Image(); this.normal.src = podstawowy }
    if (wskazany) { this.over = new Image(); this.over.src = wskazany }
    if (klikniety) { this.down = new Image(); this.down.src = klikniety }
  }
  if (tekst) this.opis = tekst;

  this.normalizuj = normalizuj;
  this.podswietl = podswietl;
  this.kliknij = kliknij;

  return this;
     
  function normalizuj() { if (document.images) document.images[this.name].src = this.normal.src; window.status = "" }
  function podswietl() { if (document.images && this.over) document.images[this.name].src = this.over.src; if (this.opis) window.status = this.opis }
  function kliknij() { if (document.images) document.images[this.name].src = this.down.src }
}

przyciski = new Array("");
if (document.images)
{
// Dodawanie kolejnych przycisków:
przyciski[1] = new przycisk("img/menu_slub.jpg", "img/menu_slub_over.jpg", "", "Śluby / Weddings");
przyciski[2] = new przycisk("img/menu_portret.jpg", "img/menu_portret_over.jpg", "", "Portret / Portrait");
przyciski[3] = new przycisk("img/menu_reklama.jpg", "img/menu_reklama_over.jpg", "", "Reklama / Advertising");
przyciski[4] = new przycisk("img/menu_sport.jpg", "img/menu_sport_over.jpg", "", "Sport / Sport");
przyciski[5] = new przycisk("img/menu_wydarzenia.jpg", "img/menu_wydarzenia_over.jpg", "", "Wydarzenia / Events");
przyciski[6] = new przycisk("img/menu_slub_plener.jpg", "img/menu_slub_plener_over.jpg", "", "Plener / Weddig Portrait");
przyciski[7] = new przycisk("img/menu_slub_ceremonia.jpg", "img/menu_slub_ceremonia_over.jpg", "", "Ceremonia / Ceremony");
przyciski[8] = new przycisk("img/informacja.jpg", "img/informacja_over.jpg", "", "Informacja / Information");
przyciski[9] = new przycisk("img/navigacja_glowna.jpg", "img/navigacja_glowna_over.jpg", "", "Główna / Home");
przyciski[10] = new przycisk("img/navigacja_cofnij.jpg", "img/navigacja_cofnij_over.jpg", "", "Cofnij / Back");
}
//-->

