// rewritten by James Maskus 03/28/2002
// last edited 12-24-2003 by Frank Maskus
// edited method of text and image displays 10-12-06


// Global variables
// Set the number of images and size here
var numImages = 6;   
var width = 440;
var height = 330;
var index = 1;
var count = numImages;
var slide = new Array();

// Create the image data structures
for(var i=1; i<=count; i++) 
{
   slide[i] = new Image(width, height);
}

// Cache these images
   slide[1].src = "http://bimedia.ftp.clickability.com/fishwebftp/KATU/ABANK.JPG"
   slide[2].src = "http://bimedia.ftp.clickability.com/fishwebftp/KATU/ARAFTER.JPG"
   slide[3].src = "http://bimedia.ftp.clickability.com/fishwebftp/KATU/APDX.JPG"
   slide[4].src = "http://bimedia.ftp.clickability.com/fishwebftp/KATU/AVAN.JPG" 
   slide[5].src = "http://bimedia.ftp.clickability.com/fishwebftp/KATU/ALINCOLN.JPG"
   slide[6].src = "http://bimedia.ftp.clickability.com/fishwebftp/KATU/AHOOD.JPG"

       // Display image description and count in Form boxes
      var caption = [
      '',
      ' Downtown Portland From The U S Bank Tower.',
      ' Downtown Portland From Across The Willamette River.',
      ' Portland International Airport Web Camera.',
      ' Columbia River From Camera at Vancouver WA.',
      ' Pacific Ocean From Camera In Lincoln City Oregon.',
      ' View From Washington State of Hood River Oregon.'
       ];
      
   
    function loadHandler()
   {
             // Get a reference to our text container
             var textNode = document.getElementById('text');
  
             // Set the text containers value to Temp
             textNode.firstChild.nodeValue = caption[index];	
   }


    function newslide(direction)
      {
            if(document.images)
           {
                  index = index + direction;

                  // Check index range
                  if(index < 1) index = 1;
                  if(index > count) index = count;
 
                  // Swap the image
                  document.slider.src = slide[index].src;
  
                  // Fetch the next image
                  if(direction > 0 && index < count)
                  {
                   next = index + 1;
                  }
  
                  // Get a reference to our text container
                  var textNode = document.getElementById('text');
  
                  // Set the text containers value to Temp
                  textNode.firstChild.nodeValue = caption[index];
   
                  // Set the count button values
                  document.frm2.left.value = "Image "+ index +" of "+ numImages; 
            }
         }   
