// JavaScript Document

var ccpg

function m_sfcon (u) 
{
pre = "mail";
url = pre + "to:" + u;
document.location.href = url + "@plainfieldnh.org";
}

function switchImage(imgName, imgSrc) 

{

  if (document.images)

  {

    if (imgSrc != "none")

    {

      document.images[imgName].src = imgSrc;

    }

  }

}

// Example:

// simplePreload( '01.gif', '02.gif' ); 

/*function simplePreload()

{ 

  var args = simplePreload.arguments;

  document.imageArray = new Array(args.length);

  for(var i=0; i<args.length; i++)

  {

    document.imageArray[i] = new Image;

    document.imageArray[i].src = args[i];

  }

}

*/

// Script:   JavaScript SlideShow Script
// Function: Display images continuously in a slideshow
// =======================================
// Set speed (milliseconds)

var speed = 4000

// Specify the photo files

var Photo = new Array() 

// to add more images, continue the pattern, adding to the array below

Photo[0] = 'images/show/newsign.JPG'
Photo[1] = 'images/show/farming.JPG'
Photo[2] = 'images/show/xcbridge.jpg'
Photo[3] = 'images/show/July4.JPG'
Photo[4] = 'images/show/cong_church.JPG'
Photo[5] = 'images/show/scenic_road.JPG'
Photo[6] = 'images/show/BMDGrange_web.JPG'
Photo[7] = 'images/show/dawnFL.JPG'
//  

var t
var j = 0
var p = Photo.length

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

function runSlideShow(){
   document.images.SlideShow.src = preLoad[j].src
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', speed)
}


