// JavaScript Document

// ==============================================
// Copyright 2003 by jsCode.com
// Source: jsCode.com
// Author: etLux
// Free for all; but please leave in the header.
// ==============================================

var theImages = new Array() 

// add your randome images, be sure the path is correct. Add or remove to the array as needed.
theImages[0] = 'http://www.villageofhoosickfalls.com/Media/TemplateImages/Header_downtown.jpg'
theImages[1] = 'http://www.villageofhoosickfalls.com/Media/TemplateImages/Header_library.jpg'
theImages[2] = 'http://www.villageofhoosickfalls.com/Media/TemplateImages/Header_octagon.jpg'
theImages[3] = 'http://www.villageofhoosickfalls.com/Media/TemplateImages/Header_mural.jpg'

var j = 0
var p = theImages.length;

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

// Be sure to update the alt tag to something generic enough to work with all the random images
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'" alt="Hoosick Falls, NY &mdash; Grandma Moses Discovery Village" />');
}

