<!-- //start JS hide
var slideopen = new Array();  // array of first slide objects
var g_slidesArray = new Array();  // array of slideshow's slide objects
var g_currSlideIndex = 0;         // index of current g_slidesArray[] slide
var g_isPlaying = false;          // boolean specifying if slideshow is running
var g_isPaused  = false;          // boolean specifying if slideshow is paused
var g_duration = 4;               // num seconds each slide is displayed
var g_loop = true;                // boolean specifying if slideshow is looping
var g_HTMLstring = "";            // HTML string to write in slideFrame
var g_justStarted = true;         // boolean specifying if slideshow just started
var sslide = 57;		  //last slide for stop feature


function initSlideShow()  // initialize the slideshow
  {
  makeSlideShow();  // populate g_slidesArray[] with slide objects
                    // display first slide title and slide URL in slideFrame frame

  g_HTMLstring  = "<H1>" + g_slidesArray[g_currSlideIndex].title + "</H1>";
  g_HTMLstring += "<TABLE BORDER='5'><TR><TD>";
  g_HTMLstring += "<IMG SRC='" + slideopen.URL +"' ";
  g_HTMLstring += "NAME='slideImage'></TD></TR></TABLE>";
  top.slideFrame.location.href = "slide.htm";

  // display first slide text in textFrame frame

  top.textFrame.location.href = "blank3.htm";
  }

function makeSlideShow()  // populate g_slidesArray[] with slide objects
  {
  // this is where you specify the slides for your show; use the syntax:
  //new slide ("slideURL", "slideTitle", "slideText")

slideopen = new slide("opening.jpg", "test", "Show is ready");

g_slidesArray[0] = new slide("photos/00.jpg", "",
"Town Sign");
g_slidesArray[1] = new slide("photos/00b.jpg", "",
"Map of Cass Meadow ");
g_slidesArray[2] = new slide("photos/00c.jpg", "",
"Map of Cass Meadow ");
g_slidesArray[3] = new slide("photos/01.jpg", "",
"Alder to be Saved from Cut ");
g_slidesArray[4] = new slide("photos/02.jpg", "",
"Birch Stand Closeup ");

g_slidesArray[5] = new slide("photos/03.jpg", "",
"Birch Trees Bordering River ");
g_slidesArray[6] = new slide("photos/04.jpg", "",
"Birch Edge from North Side of Millers River");
g_slidesArray[7] = new slide("photos/05.jpg", "",
" Birch from Shore Drive Bend ");
g_slidesArray[8] = new slide("photos/06.jpg", "",
"Birch from Shore Drive Closer to Bridge ");
g_slidesArray[9] = new slide("photos/07.jpg", "",
"Day 2 Cut by West Border Looking South");
g_slidesArray[10] = new slide("photos/08.jpg", "",
"Day 2 Cut Looking South by Street ");
g_slidesArray[11] = new slide("photos/09.jpg", "",
"Day 2 Cut Looking West ");
g_slidesArray[12] = new slide("photos/10.jpg", "",
"Dec 8 Day 9 Border of Cut and Uncut Area 2 ");
g_slidesArray[13] = new slide("photos/11.jpg", "",
"Dec 8 Day 9 Border of Cut and Uncut Area ");
g_slidesArray[14] = new slide("photos/12.jpg", "",
"Dec 8 Day 9 Boundary of Area to Be Cut by River");

g_slidesArray[15] = new slide("photos/13.jpg", "",
"Dec 8 Day 9 Facing Birch to Be Cut 2 ");
g_slidesArray[16] = new slide("photos/14.jpg", "",
"Dec 8 Day 9 Facing Birch to Be Cut");
g_slidesArray[17] = new slide("photos/15.jpg", "",
"Dec 8 Day 9 Facing North Forest to Be Saved");

g_slidesArray[18] = new slide("photos/16.jpg", "",
"Dec 8 Day 9 Facing North Pequoig Ave on Right");

g_slidesArray[19] = new slide("photos/17.jpg", "",
"Dec 8 Day 9 Facing Peqouig Ave 2");
g_slidesArray[20] = new slide("photos/18.jpg", "",
"Dec 8 Day 9 Facing Pequoig Ave 3");
g_slidesArray[21] = new slide("photos/19.jpg", "",
"Dec 8 Day 9 Facing Pequoig Ave 4");
g_slidesArray[22] = new slide("photos/20.jpg", "",
"Dec 8 Day 9 Facing Pequoig Ave 1");
g_slidesArray[23] = new slide("photos/21.jpg", "",
"Dec 8 Day 9 Facing Pequoig Ave 5.jpg");
g_slidesArray[24] = new slide("photos/24.jpg", "",
"Dec 8 Day 9 Facing Pequoig Ave 6.jpg");

g_slidesArray[25] = new slide("photos/22.jpg", "",
"Dec 8 Day 9 Facing Shore Drive");
g_slidesArray[26] = new slide("photos/23.jpg", "",
"Dec 8 Day 9 Facing South from Peqoig Ave");
g_slidesArray[27] = new slide("photos/25.jpg", "",
"Dec 8 Day 9 From Pequiog Drive Entrance");

g_slidesArray[28] = new slide("photos/26.jpg", "",
"Dec 14 Day 15  Cleared and Uncleared");
g_slidesArray[29] = new slide("photos/27.jpg", "",
"Dec 14 Day 15 Cleared and Uncleared 2");

g_slidesArray[30] = new slide("photos/28.jpg", "",
"Dec 14 Day 15 Facing Pequoig Ave");
g_slidesArray[31] = new slide("photos/29.jpg", "",
"Dec 14 Day 15 Facing SE with Starrett Smokestack on");
g_slidesArray[32] = new slide("photos/30.jpg", "",
"Dec 14 Day 15 Facing Shore Drive");
g_slidesArray[33] = new slide("photos/31.jpg", "",
"Dec 14 Day 15 From Shore Drive Facing North Across 1");
g_slidesArray[34] = new slide("photos/32.jpg", "",
"Dec 14 DAy 15 From Shore Drive Facing North Across 2");

g_slidesArray[35] = new slide("photos/33.jpg", "",
"Dec 14 Day 15 From Shore Drive Facing North Across 3");
g_slidesArray[36] = new slide("photos/34.jpg", "",
"From Pequoig St Uncut Birch");
g_slidesArray[37] = new slide("photos/35.jpg", "",
"Grey Birch Closeup.jpg");
g_slidesArray[38] = new slide("photos/36.jpg", "",
"Ground Debris after Brush Hog");
g_slidesArray[39] = new slide("photos/37.jpg", "",
"Native Dogwood");

g_slidesArray[40] = new slide("photos/38.jpg", "",
"North Bank of River Close");
g_slidesArray[41] = new slide("photos/39.jpg", "",
"North Bank of River");
g_slidesArray[42] = new slide("photos/40.jpg", "",
"Southern Meadow");
g_slidesArray[43] = new slide("photos/41.jpg", "",
"Uncut Meadow Looking South");
g_slidesArray[44] = new slide("photos/42.jpg", "",
"Viburnam Saved from Cut");


g_slidesArray[45] = new slide("photos/43.jpg", "",
"30 Dec Brontosaurus clears trees north of main trail 1");
g_slidesArray[46] = new slide("photos/44.jpg", "",
"30 Dec Brontosaurus clears more trees north of main trail 2");
g_slidesArray[47] = new slide("photos/45.jpg", "",
"30 Dec Brontosaurus clears more trees north of main trail 3");
g_slidesArray[48] = new slide("photos/46.jpg", "",
"30 Dec Brontosaurus clears more trees north of main trail 4");
g_slidesArray[49] = new slide("photos/47.jpg", "",
"30 Dec Brontosaurus clears trees north of main trail 5");
g_slidesArray[50] = new slide("photos/48.jpg", "",
"30 Dec Brontosaurus eats one last stump");
g_slidesArray[51] = new slide("photos/49.jpg", "",
"30 Dec Brush Brush-hog _ Brontosaurus near Pequoig Ave");
g_slidesArray[52] = new slide("photos/50.jpg", "",
"30 Dec Brush-hog heads for home");
g_slidesArray[53] = new slide("photos/51.jpg", "",
"30 Dec Brontosaurus heading for home");
g_slidesArray[54] = new slide("photos/52.jpg", "",
"30 Dec Cleared Area Facing East");
g_slidesArray[55] = new slide("photos/53.jpg", "",
"30 Dec Cleared Area Facing North");
g_slidesArray[56] = new slide("photos/54.jpg", "",
"30 Dec Cut Area Facing Shore Drive");
g_slidesArray[57] = new slide("photos/55.jpg", "",
"30 Dec Facing SE with Exchange St. Bridge on Left");
g_slidesArray[58] = new slide("photos/56.jpg", "",
"30 Dec Facing South to Shore Drive");
g_slidesArray[59] = new slide("photos/57.jpg", "",
"30 Dec Former Birch stand cleared along Rive");
g_slidesArray[60] = new slide("opening.jpg", "", 
"Show is ready");




  }

function slide(URL, title, text)  // slide object constructor function
  {
  this.URL   = URL;    // slide URL property
  this.title = title;  // slide title property
  this.text  = text;   // slide text property
  }

function slideshowStart()  // start/run slideshow
  {
  if (top.slideFrame.document.images[0].complete)  // wait until slide is loaded!
    {
    if (g_justStarted)  // show just starting
      {
      dispSlide(0);
      g_justStarted = false;
      document.slideshowForm.slideshowPlayBtn.value = "Stop";
      }
    else                // show already running
      {
      slideNext();
      }
    if (document.slideshowForm.slideshowPauseBtn.value == "Resume")
      {
      document.slideshowForm.slideshowPauseBtn.value = "Pause"
      g_isPaused = false;
      }
    }
  g_isPlaying = true;
  timeoutID = setTimeout("slideshowStart();", g_duration * 1000);
  }

function slideshowStop()  // stop slideshow
  {
  clearTimeout(timeoutID);
  g_isPlaying = false;
  g_justStarted = true;
  document.slideshowForm.slideshowPlayBtn.value = "Play";
  dispSlide(sslide);
  }

function slideshowPause()  // pause slideshow
  {
  clearTimeout(timeoutID);
  document.slideshowForm.slideshowPauseBtn.value = "Resume"
  g_isPaused = true;
  }

function slideshowResume()  // resume slideshow (after pausing)
  {
  document.slideshowForm.slideshowPauseBtn.value = "Pause"
  g_isPaused = false;
  slideshowStart();
  }

function doPauseClick()  // process Pause/Resume button click
  {
  if (! g_isPlaying)     // don't toggle to "Resume" if show not playing
    return;
  if (! g_isPaused)
    slideshowPause()
  else
    slideshowResume();
  }

function doPlayClick()  // process Play/Stop button click
  {
  if (! g_isPlaying)
    slideshowStart();
  else
    slideshowStop();
  if (g_isPaused)       // if Resume showing, clicking Stop toggles to Pause
    {
    document.slideshowForm.slideshowPauseBtn.value = "Pause"
    g_isPaused = false;
    }
  }

function dispSlide(slideIndex)  // display current slide
  {
  if (top.slideFrame.document.images[0].complete)  // wait until slide is loaded
    {

    // display slide title and URL in slideFrame frame

    g_HTMLstring  = "<H1>" + g_slidesArray[slideIndex].title + "</H1>";
    g_HTMLstring += "<TABLE BORDER='5'><TR><TD>";
    g_HTMLstring += "<IMG SRC='" + g_slidesArray[slideIndex].URL +"' ";
    g_HTMLstring += "NAME='slideImage'></TD></TR></TABLE>";
    top.slideFrame.location.href = "slide.htm";
  
    // display slide text in textFrame frame
    top.textFrame.location.href = "text.htm";
  
    g_currSlideIndex = slideIndex;  // update slide index
    }
  }

// ********** disSing added by Bruce for single display
function dispSing(slideIndex)  // display current slide
  {
  if (top.slideFrame.document.images[0].complete)  // wait until slide is loaded
    {

    // display slide title and URL in slideFrame frame

    g_HTMLstring  = "<H1>" + g_slidesArray[slideIndex].title + "</H1>";
    g_HTMLstring += "<TABLE BORDER='5'><TR><TD>";
    g_HTMLstring += "<IMG SRC='" + g_slidesArray[slideIndex].URL +"' ";
    g_HTMLstring += "NAME='slideImage'></TD></TR></TABLE>";
    top.slideFrame.location.href = "sing.htm";
  
    // display slide text in textFrame frame
    top.textFrame.location.href = "textsing.htm";
  
    g_currSlideIndex = slideIndex;  // update slide index
    }
  }
// *********end added function

function slidePrev()  // display previous slide
  {
  if (--g_currSlideIndex < 0)   // first slide is displayed
    {
    if (g_loop)                 // Loop is checked, go to last slide
      {
      g_currSlideIndex = g_slidesArray.length - 1;
      }
    else                        // Loop is unchecked, do nothing
      {
      g_currSlideIndex = 0;
      return;
      }
    }
  dispSlide(g_currSlideIndex);  // display slide
  }

function slideNext()  // display next slide
  {
  if (++g_currSlideIndex > g_slidesArray.length - 1)  // last slide displayed
    {
    if (g_loop)                 // Loop is checked, go to first slide
      {
      g_currSlideIndex = 0;
      }
    else                        // Loop is unchecked, do nothing
      {
      g_currSlideIndex = g_slidesArray.length - 1
      return;
      }
    }
  dispSlide(g_currSlideIndex);  // display slide
  }

function slideshowSpeed()  // set show speed on the fly
  {
  var index = document.slideshowForm.speedSelect.selectedIndex;
  g_duration  = document.slideshowForm.speedSelect.options[index].text;
  }

function doLoop()  // process Loop checkbox clicks
  {
  if (document.slideshowForm.loopCheckbox.checked)   // user checked Loop
    g_loop = true;
  else                                               // user unchecked Loop
    g_loop = false;
  }

function dummyref() {
        //used to allow the image to have an href property,
        //though no link is desired.
        }


// end JS hide --> 
