var imageslen = image.length;
for (i=0;i<(imageslen);i++) {
  str = image[i];
  image[i] = new Image();
  image[i].src = str;
}
var stripebox1 = document.getElementById("stripebox1");
var stripebox2 = document.getElementById("stripebox2");
var box11 = document.getElementById("wbox11");
var box12 = document.getElementById("wbox12");
var box21 = document.getElementById("wbox21");
var box22 = document.getElementById("wbox22");
var stripeswidth = 0;
var offset1;
var offset2;
var boxoffset1 = 0;
var boxoffset2 = 1050;

saveonload2 = window.onload;
window.onload = function() {
  fill = 0;
  counter = 0;
  stripesinc = 0;
  var stripes = new Array;
  while (fill < rollwidth) {
    cfill = 0;
    while(counter <= (imageslen-1)) {
      if (typeof stripes[stripesinc] == "undefined") {
        var obj1 = document.createElement("div");
        obj1.id = "stripe1"+stripesinc;
        obj1.style.position = "absolute";
        obj1.style.display = "block";
        obj1.style.height = "100%";
        obj1.style.left = stripeswidth+"px";
        var obj2 = document.createElement("div");
        obj2.id = "stripe2"+stripesinc;
        obj2.style.position = "absolute";
        obj2.style.display = "block";
        obj2.style.height = "100%";
        obj2.style.left = stripeswidth+"px";

        stripebox1.appendChild(obj1);
        stripebox2.appendChild(obj2);
        stripes[stripesinc] = 1;
      }
      fill +=  image[counter].width + 20;
      cfill += image[counter].width + 20;
      obj1.innerHTML += '<img src="'+image[counter].src+'" style="float:left;border:none;margin-right:20px;" />';
      obj2.innerHTML += '<img src="'+image[counter].src+'" style="float:left;border:none;margin-right:20px;" />';
      counter++;
    }
    stripeswidth += cfill;
    obj1.style.width = cfill+"px";
    counter = 0; 
    stripesinc++;
  }
  stripebox1.style.width = stripeswidth+"px";
  stripebox2.style.width = stripeswidth+"px";
  stripebox2.style.left = stripeswidth+"px";
  offset1 = 0;
  offset2 = stripeswidth;
  setInterval(decstripe,70);

  if(saveonload2 != null && typeof(saveonload2) == 'function') {
    saveonload2();
  }
}

function decstripe() {
  offset1 += -4;
  offset2 += -4;
  if (offset1 < (0 - stripeswidth)) { offset1 = offset2 + stripeswidth; }
  if (offset2 < (0 - stripeswidth)) { offset2 = offset1 + stripeswidth; }
  stripebox1.style.left = offset1 + "px";
  stripebox2.style.left = offset2 + "px";

  boxoffset1 += -4;
  boxoffset2 += -4;
  if (boxoffset1 < (0 - 1050)) { boxoffset1 = boxoffset2 + 1050; }
  if (boxoffset2 < (0 - 1050)) { boxoffset2 = boxoffset1 + 1050; }
  box11.style.left = boxoffset1 + "px";
  box12.style.left = boxoffset2 + "px";
  box21.style.left = boxoffset1 + "px";
  box22.style.left = boxoffset2 + "px";
}
