var scroll = false;
       
function scrolluj(scrollDiv,scrollText,smer,rychlost)
       {
       scroll = true;
       
       scrolling(scrollDiv,scrollText,smer,rychlost);
       }

function scrolling(scrollDiv,scrollText,smer,rychlost)
       {
       if (scroll == true)
              {
              cislo = parseInt(document.getElementById(scrollText).style.marginLeft);
              
              height = parseInt(document.getElementById(scrollDiv).style.width);
              
              scrollHeight = parseInt(document.getElementById(scrollText).scrollWidth);
              scrollHeightA = scrollHeight + height - 2 * scrollHeight;
              
              
              if (smer == 'dolu' && cislo > scrollHeightA)
                     cislo = cislo - 1;
              
              else if (smer == 'nahoru' && cislo < 0)
                     cislo = cislo + 1;
              
              document.getElementById(scrollText).style.marginLeft = cislo + 'px';
              
              setTimeout("scrolling('" + scrollDiv + "','" + scrollText + "','" + smer + "'," + rychlost + ")",rychlost);
              }
       }

function zastav()
       {
       scroll = false;
       }

function initLista()
       {
       /*var r = document.getElementById('scroll_obsah');
       var rodic = r ? r.parentNode : null;
       var d = r ? r.childNodes : null
       var sirka = 0;
       
       if (rodic && d)
              {
              nodes = r.childNodes;
              
              for (var i = 0; i < nodes.length; i++)
                     {
                     if (nodes[i].nodeName == "A")
                            {
                            sirka = sirka + parseInt(nodes[i].style.width) + 20;
                            //document.write(nodes[i].width + "<br>");
                            }
                     }
              }
       
       sirka = sirka + 50;
       r.style.width = sirka + "px";   */
       //document.write(document.getElementById('scroll_obsah').style.width);
       //document.write(sirka);
       }
