/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: Lee Underwood :: http://javascript.internet.com/ */

var leftImg = new Array();
  // Enter the names of the images below
  leftImg[0]="pictures/small/kitten01_small.jpg";
  leftImg[1]="pictures/small/kitten02_small.jpg";
  leftImg[2]="pictures/small/kitten03_small.jpg";
  leftImg[3]="pictures/small/kitten04_small.jpg";

var newLeft = 0;
var totalLeft = leftImg.length;

var rightImg = new Array();
  // Enter the names of the images below
  rightImg[0]="pictures/small/puppy01_small.jpg";
  rightImg[1]="pictures/small/puppy02_small.jpg";
  rightImg[2]="pictures/small/puppy03_small.jpg";

var newRight = 0;
var totalRight = rightImg.length;

function cycle1() {
  newLeft++;
  if (newLeft == totalLeft) {
    newLeft = 0;
  }
  newRight++;
  if (newRight == totalRight) {
    newRight = 0;
  }
  document.left.src=leftImg[newLeft];
  document.right.src=rightImg[newRight];
  // set the time below for length of image display
  // i.e., "4*1000" is 4 seconds
  setTimeout("cycle1()", 7*1000);
}
window.onload=cycle1;
