<!--
//Global variables
var t_w = 110;                  //thumbnail width
var t_h = 83;                   //thumbnail height
var h_s = 2;                    //horizontal space
var v_s = 5;                    //vertical space
var numP;                      //total number of photos
photos = new Array;            //photo array
var path;                     //path to our photos
var type = ".jpg";              //type of photos
var index;                    //track where we're at in the array
var loading = "<div align='center'><br><br><b style='color:#f6eb9b'>Loading Gallery...</b><br /><br /><img src='images/loading.gif' /></div>";   

function showGallery(numPhotos, absPath)
{
    index = 0;
    numP = numPhotos;
    path = absPath;
    
    for(var i=0; i < numP; i++)
        photos[i] = path + i + type;
    
    document.getElementById("myPhotos").innerHTML = loading;
    var frame = document.getElementById("hiddenFrame");
    frame.src = "photos.html?" + numP + "&" + absPath;    
}

function changePic(pic)
{
    for(var i=0; i < numP; i++)
        if(pic == photos[i]) break;
    index = i;
    document.getElementById("myPic").innerHTML = "<img src='" + pic + "' style='max-width:470px' />";
}

function nextPic(direction)
{
    if(direction == "prev")
    {
        if(index == (numP - 1))
            index = -1;
        index++;
    }
     
    if(direction == "next")
    {
        if(index == 0)
            index = numP;
        index--;
    }
    
    document.getElementById("myPic").innerHTML = "<img src='" + photos[index] + "' style='max-width:470px' />";
}

-->

