  var step = 2;

  function getHeigth() {
    var div=document.getElementById('miejsce');
    return div.clientHeight;
  }

  var allowMove = true;
  
  function move() {
    if(allowMove) {
      var div = document.getElementById('zawartosc');
      var top = div.style.top;
      var pos = top=="" ? 0 :parseInt(top.substring(0, top.length-2), 10);
      pos -= step;
      if(pos < -div.clientHeight) {
        pos = getHeigth();
      }
      div.style.top = pos+"px";
    }
  }

  var scrollClock = 0;

  function startMove() {
    if(enableShow && scrollClock == 0) {
      scrollClock = setInterval('move();', 60);
    }
    allowMove = true;
  }

  function stopMove() {
    allowMove = false;
  }

  function init() {
    if(enableShow) {
      var div = document.getElementById('zawartosc');
      div.style.top = getHeigth() +"px";
      div.style.visibility='visible';
      window.top.startShow();
    }
  }

