var position = 0,      // momentalni pozice vyhledu
    slow = 2,          // pomala rychlost
    fast = 4 * slow,   // rychla rychlost
    speed = 0,         // momentalni rychlost
    panoramaWidth = 0, // sirka panoramaticke fotografie
    windowWidth = 0;   // sirka okna

function Step()
{
  if (document.getElementById)
  {
    position += speed; 
    t = panoramaWidth - windowWidth;
    if ((position < -t) && (speed < 0)) position += t;
    if ((position > 0) && (speed > 0)) position -= t;
    elem = document.getElementById("panorama"); 
    elem.style.left = position + "px"; 
  }  
}    
    
function Load()
{
  elem = document.getElementById("panorama"); 
  panoramaWidth = elem.width; 
  windowWidth = 600;

  speed = -slow;
  window.setInterval("Step()", 50); 
}

function FastLeft()
{
  speed = fast;
}

function FastRight()
{
  speed = -fast;
}

function SlowDown()
{
  if (speed > 0) speed = slow; else speed = -slow;
}
