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.margin);
              
              height = parseInt(document.getElementById(scrollDiv).style.height);
              
              scrollHeight = parseInt(document.getElementById(scrollText).scrollHeight);
              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.margin = cislo + 'px 0 0 0';
              
              setTimeout("scrolling('" + scrollDiv + "','" + scrollText + "','" + smer + "'," + rychlost + ")",rychlost);
              }
       }

function zastav()
       {
       scroll = false;
       }
