 function myOnload()
    {
     x=document.getElementsByTagName('li');
     for (i=0;i<x.length;i++)
        {
        x[i].onmouseover=function() {
            this.style.borderBottomColor='Yellow';
            }
        x[i].onmouseout=function () {
            this.style.borderBottomColor='';
            }
        }
    }
 function toggleMenu(id)
    {
     x=document.getElementById(id);
     klasy=x.className;
     if(klasy.indexOf('opened') == -1)
        {
        b=klasy.replace("closed","opened");
        }
     else
        {
        b=klasy.replace("opened","closed");
        }
     //alert(b);
     x.className=b;
    }

 function add2lb()
    {
     x=document.getElementById('tresc');
     imglst=x.getElementsByTagName('img');
     for(i=0;i<eval(imglst.length);i++)
        {
         imgattr=imglst[i].attributes;
         tr=0
         for(j=0;j<imgattr.length;j++)
            {
             if((imgattr[j].name=='alt') && (imgattr[j].value=='lightbox'))
                {
                  imglst[i].onclick= function () {
                                              firelb(this);
                                              };
                  imglst[i].style.cursor='pointer';
                  break;
                }
            }
        }
    }
 function firelb(obraz)
    {
     dd=new Image();
     dd.src=obraz.src;
     dd.title=obraz.title;
     anode=document.createElement('a');
     anode.setAttribute('href',dd.src);
     anode.setAttribute('title',dd.title);
     anode.href=dd.src;
     //alert(anode.href);
     //anode.setAttribute('rel','lightbox');
     //anode.rel='lightbox';
     anode.appendChild(dd);
     showLightbox(anode);
    }

  function paintItem(label){
      x=document.getElementById(label);
      x.style.backgroundImage='url("../img/arrow_red.gif")';
      x.getElementsByTagName('a')[0].style.color='#f67f21';
      x.getElementsByTagName('a')[0].target='_blank';
      kw=document.createElement('div');
      kw.setAttribute('style','position:absolute;width:11px;height:11px;left:-12px;top:9px;');
      im=document.createElement('img');
      im.src='img/kwadrat.gif';
      kw.appendChild(im);
      x.appendChild(kw);

  }
