// ===============================================================
// scroller (c) www.eHelp24.com
// ===============================================================

posx=0;
posy=0;
kartebreit=3603;
Anzeigebreit=200;
running=1;
pause_pushed=0;

function rollenpause()
{
  window.clearTimeout(aktiv);
  play_l.src="img/playl.gif";
  play_r.src="img/playr.gif";
  play_0.src="img/play0.jpg";
  pause_pushed=1;
}

function rollenl()
{
  // autostart=1
  if(running==1)      { running=2; }
  else if(running==3)
  {
    window.clearTimeout(aktiv);
    running=2;
  }

  if(pause_pushed==1)
  {
    play_l.src="img/play0.jpg";
    play_r.src="img/play0.jpg";
    play_0.src="img/pause.gif";
    pause_pushed=0;
  }

  if (posx < kartebreit-Anzeigebreit)
  {
    posx=posx+1;
    if (document.layers)
    {
      document.bild.document.bild1.left=-posx;
    }
    else if (document.all)
    {
      bild.scroll(posx,posy);
    }
    else if (document.getElementById)
    {
      bild.scroll(posx,posy);
    }
    aktiv=window.setTimeout("rollenl()",1);
  }
  else
  {
    window.clearTimeout(aktiv);
    running=3;
    aktiv=window.setTimeout("rollenr()",1);
  }
}

function rollenr()
{
  if(running==2)
  {
    window.clearTimeout(aktiv);
    running=3;
  }

  if(pause_pushed==1)
  {
    play_l.src="img/play0.jpg";
    play_r.src="img/play0.jpg";
    play_0.src="img/pause.gif";
    pause_pushed=0;
  }

  if (posx > 0)
  {
    posx=posx-1;
    if (document.layers)
    {
      document.bild.document.bild1.left=-posx;
    }
    else if (document.all)
    {
      bild.scroll(posx,posy);
    }
    else if (document.getElementById)
    {
      bild.scroll(posx,posy);
    }
    aktiv=window.setTimeout("rollenr()",1);
  }
  else
  {
    window.clearTimeout(aktiv);
    running=2;
    aktiv=window.setTimeout("rollenl()",1);
  }
}
