

function get_breite() 
{
 var breite = 0;
 // var hoehe = 0;
 if (window.innerWidth) 
 {
   breite = window.innerWidth;
   // hoehe = window.innerHeight;
 }
 else 
 {
   breite = window.document.documentElement.clientWidth;
   //   hoehe = window.document.documentElement.clientHeight;
 };

 return breite;
};


var bgX=0;
var left=true;
var bgW = 2400;

function bgMove ()
{
  if (left)
  {
    var minX = get_breite() - 2400;
    if (minX>0)
    {
      alert("minX: "+minX);
      style.backgroundPosition = "0px 0px";
      return;
    }

    bgX--;
    if (bgX<minX)  left=false;
  }
  else 
  {
    bgX++;
    if (bgX>=0)  left=true;
  }

  style = document.body.style;
  pos = bgX + "px 0px"
  style.backgroundPosition = pos;


  window.setTimeout('bgMove()', 100);
}


function bgStart ()
{
  style = document.body.style;
  if (!style) return;

  bgMove();
}

window.onload=bgStart;

