


// JavaScript for Lake Champlain Ecosystem Team, U.S. Fish and Wildlife Service
// Author: Susan L. Bolander, Webworks7, except where otherwise noted

// Prevent this site from being framed

if (self != top)
{
  top.location = self.location
}


// This function is called when the pages have completely loaded, which prevents the MouseOver event from triggering before the groups have been defined (this had been a problem when using Netscape)

var ready = "no";

function done()
{
  ready = "yes";
}



var isNav4, isIE4, isNav5, active, activediv, activegroup, ImageNum

if (navigator.appVersion.charAt(0) == "4")
{
	if (navigator.appName == "Netscape")
	{
		isNav4 = true
		styleObj = ""
	}
	else if (navigator.appVersion.indexOf("MSIE") != -1)
	{
		isIE4 = true
		range = "all"
		styleObj = "style"
	}
}



//This function receives parameters for the bar number, the bar division id, the image name, and the group divison id, then changes the bar color and makes a group visible.

function Change(n,DivID,Group,Image)
{
  if (ready == "yes")
  {
    if ((activediv != DivID) && (ImageNum))
      {
        range2=(isNav4)?activediv + '.document':range
        eval ('document.' + range3 + styleObj + '.visibility = "hidden"')
      }
    range=(isNav4)?'Logo.document':range
    range2=(isNav4)?DivID + '.document':range
    range3=(isNav4)?Group:range + '.' + Group + '.'
    eval ('document.' + range3 + styleObj + '.visibility = "visible"')
    eval ('document.' + range3 + styleObj + '.zIndex = "5"')
    active = Image
    activediv = DivID
    ImageNum = n
    activegroup = Group
  }     
}
	
<!-------------Slide Show---------------------->

<!-- Original:  CodeLifter.com (support@codelifter.com) -->
<!-- Web Site:  http://www.codelifter.com -->
<!-- Modified by Susan L. Bolander, Webworks7, to run two slide shows simultaneously -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

// Slide show #1 is the left position, #2 is the right position

// Set slideShowSpeed (milliseconds)

var slideShowSpeed1 = 4000;
var slideShowSpeed2 = 5000;

// Duration of crossfade (seconds) This does not work in Netscape, slides just switch without a fade

var crossFadeDuration1 = 3;
var crossFadeDuration2 = 2;

var Pic1 = new Array();
var Pic2 = new Array();

var t1;
var t2;

var j1 = 0;
var j2 = 0;

var preLoad1 = new Array();
var preLoad2 = new Array();

Pic1[0] = 'slideshow1a.jpg'
Pic1[1] = 'slideshow2a.jpg'
Pic1[2] = 'slideshow5a.jpg'
Pic1[3] = 'slideshow3a.jpg'
Pic1[4] = 'slideshow4a.jpg'

Pic2[0] = 'slideshow1b.jpg'
Pic2[1] = 'slideshow4b.jpg'
Pic2[2] = 'slideshow3b.jpg'
Pic2[3] = 'slideshow2b.jpg'
Pic2[4] = 'slideshow5b.jpg'

var p1 = Pic1.length;
var p2 = Pic2.length;

function slideShow()
{
  for (i1 = 0; i1 < p1; i1++)
  {
    preLoad1[i1] = new Image();
    preLoad1[i1].src = Pic1[i1];
  }

  for (i2 = 0; i2 < p2; i2++)
  {
    preLoad2[i2] = new Image();
    preLoad2[i2].src = Pic2[i2];
  }

  runSlideShow1();
  runSlideShow2();
}

function runSlideShow1()
{
  if (document.all)
  {
    document.images.SlideShow1.style.filter="blendTrans(duration=2)";
    document.images.SlideShow1.style.filter="blendTrans(duration=crossFadeDuration1)";
    document.images.SlideShow1.filters.blendTrans.Apply();
  }
  document.images.SlideShow1.src = preLoad1[j1].src;
  if (document.all)
  {
    document.images.SlideShow1.filters.blendTrans.Play();
  }
  j1 = j1 + 1;
  if (j1 > (p1 - 1)) j1 = 0;
  t1 = setTimeout('runSlideShow1()', slideShowSpeed1);
}

function runSlideShow2()
{
  if (document.all)
  {
    document.images.SlideShow2.style.filter="blendTrans(duration=2)";
    document.images.SlideShow2.style.filter="blendTrans(duration=crossFadeDuration2)";
    document.images.SlideShow2.filters.blendTrans.Apply();
  }
  document.images.SlideShow2.src = preLoad2[j2].src;
  if (document.all)
  {
    document.images.SlideShow2.filters.blendTrans.Play();
  }
  j2 = j2 + 1;
  if (j2 > (p2 - 1)) j2 = 0;
  t2 = setTimeout('runSlideShow2()', slideShowSpeed2);
}
























