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));
  }
}



var display_timer_id = new Array();
function display(id, wartosc)
{
  clearTimeout(display_timer_id[id]);
  if (document.getElementById) display_timer_id[id] = setTimeout('document.getElementById("' + id + '").style.display = "' + wartosc + '"', 1);
  else if (document.all) display_timer_id[id] = setTimeout('document.all["' + id + '"].style.display = "' + wartosc + '"', 1);
}



function tooltip(d,E,b,i,a){
  d=document;E=d.documentElement;b=d.body;if(!E)return;
  for(i=0;a=b.getElementsByTagName("a")[i];i++){
    if(a.title){
      with(a.t=d.createElement("div")){
        id="tooltip"
        innerHTML=a.title.replace(/\|/g,"<br />")
      }
      a.onmouseover=function(e){
        with(this){title="";onmousemove(e)}
        b.appendChild(this.t)
      }
      a.onmouseout=function(x){
        with(this){title=t.innerHTML.replace(/<br \/>/g,"\|")}
        if(x=d.getElementById("tooltip"))b.removeChild(x)
      }
      a.onmousemove=function(e){
        e=e||event;with(this.t.style){
         left=e.clientX+(E.scrollLeft||b.scrollLeft)+"px"
         top=e.clientY+(E.scrollTop||b.scrollTop)+"px"
        }
      }
    }
  }
for(i=0;a=b.getElementsByTagName("input")[i];i++){
    if(a.alt){
      with(a.t=d.createElement("div")){
        id="tooltip"
        innerHTML=a.alt.replace(/\|/g,"<br />")
      }
      a.onmouseover=function(e){
        with(this){alt="";onmousemove(e)}
        b.appendChild(this.t)
      }
      a.onmouseout=function(x){
        with(this){alt=t.innerHTML.replace(/<br \/>/g,"\|")}
        if(x=d.getElementById("tooltip"))b.removeChild(x)
      }
      a.onmousemove=function(e){
        e=e||event;with(this.t.style){
         left=e.clientX+(E.scrollLeft||b.scrollLeft)+"px"
         top=e.clientY+(E.scrollTop||b.scrollTop)+"px"
        }
      }
    }
  }

}
function addEvent(O,E,F,x){
  return(x=O.addEventListener)?x(E,F,1):(x=O.attachEvent)?x('on'+E,F):!1
}
addEvent(window,'load',tooltip);

