
//Show a random image

		var slideshow_width='500px' //SET IMAGE WIDTH
		var slideshow_height='350px' //SET IMAGE HEIGHT
		var pause=8000 //SET PAUSE BETWEEN SLIDE (1000=1 seconds) was 12000
		var preloadbites=3 // preloads this many images before starting the rotation, then 2x this many images on each
		                   // rotation until they're all downloaded (since images are preloaded, this makes the show
																					// start much quicker
																					// I guess the logic should be something like 2 x preloadbites should download within pause time

		var randomimages=new Array();
		//SET IMAGE PATHS. Extend or contract array as needed
		//CSY Temporarily switched images for symposium 1.28.08
		//use fadeimages.length in brackets to make auto-incrementing, don't have to adjust when adding/deleting images
		randomimages[randomimages.length]="/ArchiveSite2008/images/People/R01.jpg";
		randomimages[randomimages.length]="/ArchiveSite2008/images/People/R02.jpg";
		randomimages[randomimages.length]="/ArchiveSite2008/images/People/R03.jpg";
		randomimages[randomimages.length]="/ArchiveSite2008/images/People/R04.jpg";
		randomimages[randomimages.length]="/ArchiveSite2008/images/People/R05.jpg";
		randomimages[randomimages.length]="/ArchiveSite2008/images/People/R06.jpg";
		randomimages[randomimages.length]="/ArchiveSite2008/images/People/R07.jpg";
		randomimages[randomimages.length]="/ArchiveSite2008/images/People/R08.jpg";
		randomimages[randomimages.length]="/ArchiveSite2008/images/People/R09.jpg";
		randomimages[randomimages.length]="/ArchiveSite2008/images/People/R10.jpg";
		randomimages[randomimages.length]="/ArchiveSite2008/images/People/R11.jpg";
		randomimages[randomimages.length]="/ArchiveSite2008/images/People/R12.jpg";
		randomimages[randomimages.length]="/ArchiveSite2008/images/People/R13.jpg";
		////NO need to edit beyond here/////////////

  ///CSY - dont always want to start with the same image.  This randomizes the start point
		var curimageindex=Math.floor(Math.random()*randomimages.length);
  document.write("<img src='../"+randomimages[curimageindex]+"' />");


		
  ///Preload the rest of the images so that they load faster next time
		var startviewingat=curimageindex;
		var nextimageindex=curimageindex;
		nextimageindex=(nextimageindex<randomimages.length-1)? nextimageindex+1 : 0;
	 var disp='Started with '+curimageindex+'\nThen preloaded ';

  //
  var preloadCount=0;
		var preloadedimages=new Array();

		//The straightforward version of this preloads starting with
		//image 0.  Not helpful when we're randomizing the starting
		//point.  

		for(i=preloadCount; i<randomimages.length; i++) {
						if(i<(preloadCount+preloadbites)) {
										var j = (startviewingat+i)%(randomimages.length);
										preloadedimages[j] = new Image();
										preloadedimages[j].src = randomimages[j];
										disp=disp+j+', ';
						} else {
										break ;
						}
		}


