
  function setRight() {
if (document.getElementById("innerdiv")){
    var n = parseInt(document.getElementById("innerdiv").style.right);

    // First time through innerdiv's right attribute hasn't been set so set it
    // to minus the document width (e.g. -1024)
    if (isNaN(n)) {
/*      document.getElementById("innerdiv").style.right = 0-(document.width || document.body.clientWidth); */
      document.getElementById("innerdiv").style.right = (0 - document.body.offsetWidth) + "px";

    // Not then first time through
    } else {

      // If we've scrolled further than the width of what we're displaying go
      // back to the beginning
      if (n > document.getElementById("timelinetable").offsetWidth) {
/*        document.getElementById("innerdiv").style.right = 0-(document.width || document.body.clientWidth); */
        document.getElementById("innerdiv").style.right = (0 - document.body.offsetWidth) + "px";
      // Usually we just need to add one pixel to the right offset
      } else {
        n += 1;
        document.getElementById("innerdiv").style.right = n + "px";
      }
    }
}
  }


