<script type="text/javascript">
  var timerId = null;
  var activeImg = null;
  var timeout = 10;
  var stepX = 1;
  var stepY = 1;
  function startstop(img)
  {
    if(!img) return;
    if(activeImg){
      clearInterval(timerId);
      timerId = null;
      activeImg = null;
    }
    else{
      activeImg = img;
      timerId = setInterval("move()", timeout);
    }
  }
  //dalsza część skryptu