   // file: slideshow.js
   //
   //  sIMPLE sLIDE sHOW with Description sCRIPT by
   //  Chetan M Soni(csoni@email.com), 8/1999.
   //
   //  NOTICE: To my knowledge this script works with
   //  Netscape 3.0+ and Internet Explorer 4.0+.  By 
   //  using this script you agree that I am not     
   //  responsible for any type of damage it causes. 
   //  To use this script freely, you must leave this
   //  comment intact. This applies to all such generations.
   //
   //  If you need help using the script, email me at 
   //  csoni@email.com, and I'll be happy to help.
   //
   // modified to be more modular and non-specific as to filenames
   // David Warman 7/3/06 dwarman@nospam_davidwarman.net
   // include this file in <head>, include slideshow.html.inc in <body>.
   // call set_slides() in your onLoad, then call firstslide().
   // You can redirect at any time by call set_slides().
   
   //  Browser checker

   Browser_Name = navigator.appName;
   Browser_Ver  = parseInt(navigator.appVersion);
   if((Browser_Name == "Netscape" && Browser_Ver >= 3) || (Browser_Name == "Microsoft Internet Explorer" && Browser_Ver >= 4)) Browser_Gen = ">=3rd";
   else Browser_Gen = "<3rd";

   num_of_slides = 0;    // Declare the number of slides in your show
   slide_num = 1;        // Which slide loads ups first
   slides_path = '';
   names = [];
   descr = [];

   // establiosh the slideshow context
   function set_slides(path, DescrArray, NamesArray){
	   if (Browser_Gen == '>=3rd') {
			 descr = DescrArray;
			 names = NamesArray;
			 num_of_slides = descr.length;
			 slides_path = path;
   			 slide_num = 1;        // Which slide loads ups first
	   }
   }

   //  These functions alter the slide_num accordingly
   function firstslide(){
     slide_num = 1;
     changeslide();
   }
   function prevslide(){
     slide_num = slide_num - 1;
     if(slide_num < 1){
       slide_num = num_of_slides;
     }
     changeslide();
   }
   function nextslide(){
     slide_num = slide_num + 1;
     if(slide_num > num_of_slides){
       slide_num = 1
     }
     changeslide();
   }
   function lastslide(){
     slide_num = num_of_slides;
     changeslide();
   }
   function showslide(){
     eval('location.href = "http:' + slides_path + names[slide_num-1] + '"');
   }


   //  This function changes the slide and the description box according to the slide_num
   function changeslide(){        

     //  Changes the slide
     eval('document.picbox.src = "' + slides_path + names[slide_num-1] + '"');

     //  Changes the description box
     eval('document.descform.descbox.value = "Slide ' + slide_num + ': ' + descr[slide_num-1] + '"');
   }

