
  // create new arrays. 
  var imagesArray = new Array(); 
  var textArray   = new Array(); 

  // initialize counter. 
  var imageCount  = 0; 

  // ###################################### 
  // ######## START EDITING SCRIPT ########

     // set the amount of time (in milliseconds) each image 
     // should be displayed before the next one is shown. 
     var speed = 5000; 

     // input the path to each image, as well 
     // as text describing the image itself. 

     imageCount++; // increment the counter. 
     imagesArray[imageCount] = "/resource/histpres/images/slideshow/fp-02.gif"; 
       textArray[imageCount] = "Akron First National Bank Building, Akron"; 

     imageCount++; // increment the counter. 
     imagesArray[imageCount] = "/resource/histpres/images/slideshow/fp-03.jpg"; 
       textArray[imageCount] = "Ohio Historic National Road Design Handbook"; 

     imageCount++; // increment the counter. 
     imagesArray[imageCount] = "/resource/histpres/images/slideshow/fp-04.jpg"; 
       textArray[imageCount] = "Pennsylvania Railroad Depot and Baggage Room, Dennison"; 

     imageCount++; // increment the counter. 
     imagesArray[imageCount] = "/resource/histpres/images/slideshow/fp-05.gif"; 
       textArray[imageCount] = "Blue Rock Bridge, New Baltimore"; 

     imageCount++; // increment the counter. 
     imagesArray[imageCount] = "/resource/histpres/images/slideshow/fp-08.jpg"; 
       textArray[imageCount] = "Vistula Heritage Village"; 

     imageCount++; // increment the counter. 
     imagesArray[imageCount] = "/resource/histpres/images/slideshow/fp-14.jpg"; 
       textArray[imageCount] = "Emery Hall, Wilberforce"; 

     imageCount++; // increment the counter. 
     imagesArray[imageCount] = "/resource/histpres/images/slideshow/fp-16.jpg"; 
       textArray[imageCount] = "Emery Theatre/OMI College of Applied Science, Cincinnati"; 

     imageCount++; // increment the counter. 
     imagesArray[imageCount] = "/resource/histpres/images/slideshow/fp-17.jpg"; 
       textArray[imageCount] = "Fairborn Theatre, Fairborn"; 

  // ######## STOP EDITING SCRIPT ######### 
  // ###################################### 


  // determine which browser is being used 
  // based on the way it implements javascript. 
  ns4 = (document.layers)? true:false; 
  ie4 = (document.all)?    true:false; 
  ie5 = (document.all && document.getElementById)?  true:false; 
  ns6 = (!document.all && document.getElementById)? true:false; 

  // declare global variables. 
  var count = 0; 
  var repeatDriftLoop; 
  var maxImageCount = imagesArray.length; 

  // for each index in the array, make a loop. 
  for (var i = 0; i < maxImageCount; i++) { 

     // create an empty image object. 
     // ex. var imgObj1 = new Image(); 
     eval("var imgObj" + i + " = new Image();"); 

     // assign a source to each empty image object. 
     // the images will be preloaded into the cache. 
     // ex. imgObj1.src = "directory/image_name.jpg";
     eval("imgObj" + i + ".src = \"" + imagesArray[i] + "\";"); 

     // set the alternate text as a variable. 
     // ex. var alttag1 = "This is the alt text";  
     eval("var alttag" + i + " = \"" + textArray[i] + "\";"); 

  } // end-for loop


  // define dynamic variables that are required 
  // the moment the page finishes loading.  
  function init() { 

     // rather than coding several variations of the same script (to accomodate 
     // each browser) when trying to manipulate a CSS-layer with JavaScript, 
     // create a variable for each layer that automatically associates it with 
     // the correct browser-specific JavaScript syntax when the page is loaded.
     if (ns4) {
        imageText = document.imageTextDiv; 
     } // end-if statement 
     if (ie4) {
        imageText = imageTextDiv.style; 
     } // end-if statement
     if (ie5 || ns6) { 
        imageText = document.getElementById("imageTextDiv"); 
     } // end-if statement 

  } // end-init function 


 // this function swaps out an image embedded 
 // in a css-layer with a different one. 
 function swapImages() { 

    // only increment the counter if 
    // last image hasn't been reached yet. 
    if (count < eval(maxImageCount - 1)) { 
       // increment the counter. 
       count++; 
    // otherwise, the last image in 
    // the group has been reached. 
    } else {
       // reset the counter. 
       count = 1; 
    } // end-if statement 

    // using the counter, set attributes 
    // of the current image as variables. 
    var newImgSource = eval("imgObj" + count); 
    var newText      = eval("alttag" + count); 

    // assign a new image source. use the appropriate 
    // javascript syntax for this browser. 
    if (ns4) { 

       // change the image's source. 
       document.layers["splashImagesDiv"].document.images["splashImages"].src = newImgSource.src; 
       // change the image's alt tag. 
       document.layers["splashImagesDiv"].document.images["splashImages"].alt = newText; 

    } else if (ie4) { 

       // change the image's source. 
       document.all["splashImages"].src = newImgSource.src; 
       // change the image's alt tag. 
       document.all["splashImages"].alt = newText; 

    } else if (ns6) { 

       // create an object for this image. 
       var imageObj = document.getElementById("splashImages"); 
       imageObj.getAttribute("src"); 
       // change the image's source. 
       imageObj.setAttribute("src",newImgSource.src); 
       // change the alt tag to reflect the new graphic's text. 
       imageObj.setAttribute("alt",newText); 

    } // end-if statement 


    // change the text below the image 
    // to match the new alternate text. 
    updateLayerContent(newText); 


    // clear the loop (to make sure it doesn't overlap 
    // with the next one and needlessly eat up memory). 
    clearTimeout(repeatDriftLoop); 

    // swap out the image again by repeating this function. 
    repeatDriftLoop = setTimeout("swapImages()",speed); 

 } // end-swapImages function 


 // update an existing css-layer with the new content. 
 function updateLayerContent(divText) { 

    // update the 'imageTextDiv' layer with new content, doing it 
    // in a way most appropriate for the browser being used. 
    if (ns4) { 
       imageText.document.write(divText); 
       imageText.document.close(); 
    } else if (ie4) { 
      document.all['imageTextDiv'].innerHTML = divText; 
    } else if (ns6) { 
       imageText.innerHTML = divText;
    } // end-if statement 

 } // end-updateLayerContent function 
