function loadImages()
{
  images    = new Array();
  numImages = 9;
  for (frame = 1; frame < numImages+1; frame++)
  {
    images[frame]     = new Image();
    images[frame].src = "war/Slides/Slide" + frame + ".JPG";
  }
}


function displayImage()
{
  document.slideshow.src = images[i].src        // display image 
}

// Function: next
// Purpose:  Handles a request to view the next image.  If the next image
//           doesn't exist, it wraps around to the beginning of the array.

function next()
{
  i++;                                          // increment
  if (i == numImages+1)
    i = 1;                                      // restart at first image
  displayImage();                               // display the image
}

// Function: previous
// Purpose:  Same as next() but it wraps backward.

function previous()
{
  i--;                                          // decrement
  if (i == 0)
    i = images.length-1;                        // restart at last image
  displayImage();                               // display the image
}