// Java Document
// (C) 1997-2006 www.4yourwebsite.com
// http://www.4yourwebsite.com
// Feel free to use this script anywhere, anytime as
// long as you leave this copyright header in place
// If you use it, a link back to our site would be appreciated but is not required
// See: http://www.4yourwebsite.com/_pages/linkman/addform.html for linking info
// Works with Firefox 1+, Netscape 4+ and Internet Explorer 4+
// Crossfade only works in Internet Explorer.
// Should degrade gracefully down to any browser
// Lowest level just shows main picture
//
// init Pix Array (don't change this)
Pix = new Array();
// To use place the following between the head tags:
// <script src='/includes/banner-swapper.js' language='JavaScript' type='text/javascript'></script>
//
// In the body tag:
// <body onload="doBanners()">
// Then add something like:
// <img src="/images/photo-43.jpg" name='SlideShow' width="760" height="185"><script language="JavaScript">
//		document.images.SlideShow.src = preLoad[1].src;</script>
// to wherever you want the swapping banner to appear in your page
// (be sure that you include the name='SlideShow' in your img tag)
// Then set the timePerSlide and specify your image files for your banner sets
//
// timePerSlide in milliseconds
timePerSlide = 7500;
// Specify the image files. To add more images, just continue
// the pattern, adding to the arrays below
// Set 1 and set 2 will appear more often than the rest
Pix[1] = new Array();
Pix[1][1] = '/images/MtnLandbanner.jpg';
Pix[1][2] = '/images/MtnLandbanner02.jpg';
Pix[1][3] = '/images/MtnLandbanner03.jpg';
Pix[1][4] = '/images/MtnLandbanner04.jpg';
Pix[1][5] = '/images/MtnLandbanner05.jpg';

Pix[2] = new Array();
Pix[2][1] = '/images/MtnLandbanner.jpg';
Pix[2][2] = '/images/MtnLandbanner02.jpg';
Pix[2][3] = '/images/MtnLandbanner03.jpg';
Pix[2][4] = '/images/MtnLandbanner04.jpg';
Pix[2][5] = '/images/MtnLandbanner05.jpg';





// ================================================
// You shouldn't need to touch anything below here.
// If you do, be careful, and send me a copy of your
// final work. You can reach me from the contact us
// page of: http://www.4yourwebsite.com
// ================================================
var j = 1
var p = Pix[1].length
var r = Math.floor(Math.random() * (Pix.length + 1));
  if (r <= 0) {
    r = 1
  }
  if (r >= Pix.length) {
    r = 2
  }

var preLoad = new Array()
for (i = 1; i <= p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pix[r][i]
}

function doBanners(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=3)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j++
   if (j >= (p)) j=1
   show = setTimeout('doBanners()', timePerSlide)
}
