
//thumbnail script

current_image=0
max=26
count=0

var delay = 3000;
var lock = false;
var run;

images= new Array()
images[0] =  "../images/gallery3/acorndance.jpg"
images[1] =  "../images/gallery3/backroadsgrandcounty.jpg"
images[2] =  "../images/gallery3/canyondrawing.jpg"
images[3] =  "../images/gallery3/catburglar.jpg"
images[4] =  "../images/gallery3/cherrysong.jpg"
images[5] =  "../images/gallery3/flowerette.jpg"
images[6] =  "../images/gallery3/foothillstream.jpg"
images[7] =  "../images/gallery3/frenchcurves.jpg"
images[8] =  "../images/gallery3/goldfish.jpg"
images[9] =  "../images/gallery3/gorillainmycloset.jpg"
images[10] = "../images/gallery3/handfulls.jpg"
images[11] = "../images/gallery3/heydiddlediddle.jpg"
images[12] = "../images/gallery3/lotion.jpg"
images[13] = "../images/gallery3/mesathreetreesstorm.jpg"
images[14] = "../images/gallery3/ophelia.jpg"
images[15] = "../images/gallery3/overwhelmed.jpg"
images[16] = "../images/gallery3/planter.jpg"
images[17] = "../images/gallery3/prospectingforchiselite.jpg"
images[18] = "../images/gallery3/reflectionsonfamily.jpg"
images[19] = "../images/gallery3/sorrow.jpg"
images[20] = "../images/gallery3/spooky.jpg"
images[21] = "../images/gallery3/springflowers.jpg"
images[22] = "../images/gallery3/stillinthesaddle.jpg"
images[23] = "../images/gallery3/tired.jpg"
images[24] = "../images/gallery3/treefarmerjudy.jpg"
images[25] = "../images/gallery3/wizard2wolf.jpg"
images[26] = "../images/gallery3/greategret.jpg"

imageName = new Array()
imageName[0] = "Acorn Dance"
imageName[1] = "Back Roads Grand County"
imageName[2] = "Canyon Drawing"
imageName[3] = "Cat Burglar"
imageName[4] = "Cherry Song"
imageName[5] = "Flower-ette"
imageName[6] = "Foothills Stream"
imageName[7] = "French Curves"
imageName[8] = "Goldfish"
imageName[9] = "Gorilla in my Closet"
imageName[10] = "Handfuls"
imageName[11] = "Hey Diddle Diddle"
imageName[12] = "Lotion"
imageName[13] = "Mesa and Three Trees in a Storm"
imageName[14] = "Ophelia"
imageName[15] = "Overwhelmed"
imageName[16] = "Planter"
imageName[17] = "Prospecting for Chisel-ite"
imageName[18] = "Reflections on Family"
imageName[19] = "Sorrow"
imageName[20] = "Spooky"
imageName[21] = "Spring Flowers"
imageName[22] = "Still in the Saddle"
imageName[23] = "Tired"
imageName[24] = "Tree Farmer of the Year"
imageName[25] = "Greatful Wolf"
imageName[26] = "Great Egret"

imageDescrip = new Array()
imageDescrip[0] = "bacchanal celebration of the fluid of life and bounty of Late summer"
imageDescrip[1] = "High country thrills and some of those fast spirited bikers who delight in the spontaneous"
imageDescrip[2] = "Surreal image of the canyons that are abundant in eastern Utah. Near Moab"
imageDescrip[3] = "A cat broke into my son\'s house I started thinking how funny an actual cat burglar. Also call it Cat burglar held at claw-point..."
imageDescrip[4] = "We have a family of Robbins that wait by our cherry tree through all seasons, watching and hoping and finally eating until they are too punch drunk to waddle away."
imageDescrip[5] = "a kind of free form flower that is not any specific type just the form and design...Rochester NY"
imageDescrip[6] = "The cool water flows from the mountains into the picturesque calm of valleys below"
imageDescrip[7] = "A tool that my father taught me could help to create anything...a simple tool that had power to decipher rocket science. It unlocked a lot of my own imagination. In it\'s shape I imagined magic carpet rides beyond ....open sesame"
imageDescrip[8] = "Goldfish stories are found in many cultures...two inspired me here Grimms\' about a fisherman and another Afghan movie called White Balloon...A gold fish is part of the celebration of new year and a darling tiny girl in the tale struggles to accomplish a little dream of childhood."
imageDescrip[9] = "My sister thought a gorilla might be living in our closet and each night I had to make sure it was not there before she could sleep...it was a Cheyenne Mountain Gorilla...."
imageDescrip[10] = "A friend was described by his wife...he sits on the couch eating handfuls of god knows what...My imagination made the hands severed from their owner and took the visual pun to a graphic end...I painted it just after his death..."
imageDescrip[11] = "the nursery rhyme has always had a lot of openings for a run away imagination."
imageDescrip[12] = "Capturing the fluidity and sensuality of a lotion and surrealist perspective"
imageDescrip[13] = "where the foothills meet the prairie we often have \'gully washers\' fast thunderstorms that blaze by with rain and sometimes a little hail and are gone in a minute."
imageDescrip[14] = "a floaty dreamy submerged water maiden. Simplicity"
imageDescrip[15] = "Some time emotions are evoked from something as simple as the curtain touching your cheek"
imageDescrip[16] = "Cultivation, from tiny seedlings,with caring hands"
imageDescrip[17] = "Creative license brings \'New Stones\' found at the Gem Show"
imageDescrip[18] = "A view of family from a reminiscent perspective"
imageDescrip[19] = "After my father died the sadness followed...I allowed the sorrow a visual voice. Usually I have used my work to take me beyond these spaces but feel there is a powerful __expression and glossing over just ignores its impact"
imageDescrip[20] = "The things that stir in the light of a Jack-o-Lantern"
imageDescrip[21] = "early spring flower have a lovely crisp clean feeling to them. Brightness"
imageDescrip[22] = "A look at the old west Tucson style"
imageDescrip[23] = "Coming home from work Dad would be dragging. Wrung out."
imageDescrip[24] = "Judy was honored as a forrester, and as my Sister"
imageDescrip[25] = "Warren Zevon played before the Dead at a show years ago at Folsom Field"
imageDescrip[26] = "Pawleys Island of South Carolinas has a pristine beach, I captured this elegant bird on Black and White film"

// not using this array or the mymenu function which is just a simple test
// intended for multiple gallery pulldown menu
menuitems = new Array()
menuitems[0] = "2006 pics"
menuitems[1] = "butterflys and mosquitos"
menuitems[2] = "2005 pics"
menuitems[3] = "turtles and frogs"

function mymenu() {
  alert("ToDo you selected " + menuitems[document.mytoolbar.picgroups.selectedIndex]);
}

function auto() {
  if (lock == true) {
    lock = false;
    clearInterval(run);
    document.mytoolbar.automatic.value="Auto";
  }
  else if (lock == false) {
    lock = true;
    run = setInterval("nextimage()", delay);
    document.mytoolbar.automatic.value="Stop";
  }
}

function select_image(picnum)
{
  if (!document.mytoolbar.picnum.value.match(/^\d+$/)) {
    document.mytoolbar.picnum.value="";
    alert("invalid value - enter an number from 1 to 27");
    return; 
  }
  if ((document.mytoolbar.picnum.value<1) || (document.mytoolbar.picnum.value>(max+1))){
    document.mytoolbar.picnum.value="";
    alert("invalid value - enter an number from 1 to 27");
    return;
  }
  current_image=parseFloat(picnum.value)-1;
  selected_image= current_image + 1;
  document.images['large'].src=images[current_image];
  document.getElementById('bozo').innerHTML = imageName[current_image];
  document.getElementById('bozo2').innerHTML = (selected_image) + " of " + (max + 1);
  document.getElementById('descrip').innerHTML = imageDescrip[current_image];
  document.mytoolbar.picnum.value="";
}


function nextimage()
{
if (current_image<max) {
  current_image=current_image+1
} 
else {
  current_image=0
}
document.images['large'].src=images[current_image];
document.getElementById('bozo').innerHTML = imageName[current_image];
document.getElementById('bozo2').innerHTML = (current_image+1) + " of " + (max + 1);
document.getElementById('descrip').innerHTML = imageDescrip[current_image];
}

function previousimage()
{
if (current_image>0) {
  current_image=current_image-1
} 
else {
  current_image=max
}
document.images['large'].src=images[current_image];
document.getElementById('bozo').innerHTML = imageName[current_image];
document.getElementById('bozo2').innerHTML = (current_image+1) + " of " + (max + 1);
document.getElementById('descrip').innerHTML = imageDescrip[current_image];
}

// This is intended for a page with thumbnails - not using in slideshow so may be busted - remove parens
// This defines what to do when an image is clicked on 
function image_click(clicks)
{
current_image=clicks
document.images['large'].src=images[clicks];
document.getElementById('bozo').innerHTML = imageName[clicks] + " (" + (clicks +1) + " of " + (max + 1) +")";
}
