window.onload = startScroll;

var scroll = true;

var obj = document.getElementById("thescroller");

function startScroll(){
  obj.left = 0;
  obj.timer = setInterval("doTehScroll()", 20);
  blink1();
}

function doTehScroll(){
  if(scroll == true){
    document.getElementById("thescroller").style.marginLeft = obj.left + "px";
    if(obj.left > -998){
      obj.left = obj.left - 2;
    } else {
      obj.left = 0;
    }
  }
}

function scrollTrue(){
  scroll = true;
}

function scrollFalse(){
  scroll = false;
}

function fadeIn(id){
  document.getElementById(id).style.backgroundColor = "#ffdcb9";
}

function fadeOut(id){
  document.getElementById(id).style.backgroundColor = "";
}



var blinkz = document.getElementById("blink");

function blink1(){
  blinkz.style.backgroundColor = "#ffdcb9";
  setTimeout( "blink2()", 2000 );
}

function blink2(){
  blinkz.style.backgroundColor = "#ffc58d";
  setTimeout( "blink1()", 200 );
}

