/***********************************************
* Parts of this script come from © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicdrive.com/ for full source code 
***********************************************/

var photos = new Array();
var captions = new Array();
var which = 0;

photos[0] = "images/id_falls.jpg";
photos[1] = "images/mesa_falls.jpg";
photos[2] = "images/ynp_canyon.jpg";
photos[3] = "images/gtnp_colterbay.jpg";
photos[4] = "images/gtnp_signalmtn.jpg";
photos[5] = "images/tetons.jpg";
photos[6] = "images/snake_river.jpg";

captions[0] = "Downtown Idaho Falls";
captions[1] = "Upper Mesa Falls";
captions[2] = "Yellowstone National Park, Grand Canyon of the Yellowstone";
captions[3] = "Grand Teton National Park, Colter Bay";
captions[4] = "Grand Teton National Park, Signal Mountain";
captions[5] = "The Tetons in the winter";
captions[6] = "The falls on Snake River";

function backward()
{
    if (which == 0)
        which = photos.length - 1;
    else
        which--;

    document.images.photoslider.src = photos[which];

    document.getElementById("photocaption").innerHTML = captions[which];
}

function forward()
{
    if (which == photos.length - 1)
        which = 0;
    else
        which++;

    document.images.photoslider.src = photos[which];

    document.getElementById("photocaption").innerHTML = captions[which];
}