//init vars
var base_SlideShowSpeed = 8000; //8000
var SlideShowSpeed = 8000; //8000

setcolorsubpage(0)

/*
NO LONGER USED...this was the original list of EYES images for the home page [AGL]
1 - side-view of Yann(?)	2 - Gilbert Kombe	3 - Ruth Berg	4 - John Walsh
5 - Elizabeth Axelrod	6 - Svetlana Semenova	7 - Marty Makinen	8 - Mary Joel Holin
9 - Nancy Pielemeier	10 - Chris Pashos	11 - Cabot West	12 - Alice Tome
13 - David Kiklis	14 - Sheila ODougherty	15 - Grace Chee	16 - Gayle Epp
17 - Francois Diop	18 - Carlos Cuellar	19 - Mariam Mokuena	20 - Theodore Hammett
21 - Alan White	22 - Rhan Dorsey	23 - Cindy Creps	24 - Pallavi Kumar
25 - Doug McDonald	26 - Abdul Alkohlani	27 - Natia Baratelia
28XXX	29XXX	30 - Inés Gnigla	31 - Patricio Murgueytio
32XXX	33 - Susan Windham-Bannester	34 - Carlos Carrazana	35 - Andrew Stoeckle
36 - Yvonne Abel	37 - Judy Alamprese	38XXX	39 - Geoff Besse
40 - Manjiri Bhalwalkir	41 - Maria Sena DaSilva	43 - Christopher Herbert
44 - M.J. Jense	45 - Jill Khadduri	46XXX	47xxx
48 - Grace On	49 - Nicholas Piccirillo	50 - Tessie San Martin	51 - Jim Setzer
52 - Bonald Somerwell
*/

/*
NO LONGER USED...this was the original list of EYES images for the home page; now it's defined on index.cfm. [AGL]
var myimages = new Array("","main_image01.jpg","main_image02.jpg","main_image03.jpg","main_image04.jpg","main_image05.jpg","main_image06.jpg","main_image07.jpg","main_image08.jpg","main_image09c.jpg","main_image10.jpg","main_image11.jpg","main_image12.jpg","main_image13.jpg","main_image14.jpg","main_image15.jpg","main_image16.jpg","main_image17.jpg","main_image18.jpg","main_image19.jpg","main_image20.jpg","main_image21.jpg","main_image22.jpg","main_image23.jpg","main_image24.jpg","main_image25.jpg","main_image26c.jpg","main_image27c.jpg","main_image30c.jpg","main_image31c.jpg","main_image33c.jpg","main_image34c.jpg","main_image35c.jpg","main_image36c.jpg","main_image37c.jpg","main_image39c.jpg","main_image40c.jpg","main_image41c.jpg","main_image43c.jpg","main_image44.jpg","main_image45c.jpg","main_image48c.jpg","main_image49c.jpg","main_image50c.jpg","main_image51c.jpg","main_image52c.jpg");
*/

var itrigger = 0;
var iss;
var jss = 1;
var pss = myimages.length-1; // how many images there are -- does not change

var nss; // used in runSlideShow, holds the current image selection number
var preLoad = new Array();
var imglogger = new Array(); // array of possible image selection numbers
var imgselect; // used to point to slot in the "imglogger" array, randomly chosen
var endpoint = pss; // decrementing counter.  Any image between imglogger[endpoint] and imglogger[pss] has already been shown this cycle
for (iss = 1; iss < pss+1; iss++){ // this loop loads all the images into the "preLoad" array sequentially
imglogger[iss] = iss;
preLoad[iss] = new Image();
// preLoad[iss].src = myimages[iss]; 
}


// This is to get that first image randomly up there
imgselect = Math.round(Math.abs(Math.random())*(endpoint-1)) + 1;  // randomly select from 1 to endpoint
nss = imglogger[imgselect]; // grab the number stored in that slot, put it in nss
preLoad[nss].src = "h-images/eyes2/"+myimages[nss];

function runSlideShow(){
imglogger[imgselect] = imglogger[endpoint]; // These next two lines essentially switch the chosen number...
imglogger[endpoint] = nss; // ...with the one at the endpoint.
endpoint--; // now the endpoint is decremented, so that image isn't shown again.
if (endpoint < 1) endpoint = pss; // if we're out of images, then start the cycle all over again

if (document.all){
  if (itrigger == 0) {document.images.PictureBox.style.filter="blendTrans(duration=0)";
                      SlideShowSpeed = 1500;}
  if (itrigger == 1) {document.images.PictureBox.style.filter="blendTrans(duration=2)";
                      SlideShowSpeed = base_SlideShowSpeed;}
  itrigger=1;
  document.images.PictureBox.filters.blendTrans.Apply();
 }
document.images.PictureBox.src = preLoad[nss].src;
if (document.all) document.images.PictureBox.filters.blendTrans.Play();

imgselect = Math.round(Math.abs(Math.random())*(endpoint-1)) + 1;  // randomly select from 1 to endpoint
nss = imglogger[imgselect]; // grab the number stored in that slot, put it in nss
preLoad[nss].src = "h-images/eyes2/"+myimages[nss];
setTimeout('runSlideShow()', SlideShowSpeed);
}