var theImages = new Array()
theImages[0] = 'HomePic32.jpg'
theImages[1] = 'HomePic33.jpg'
theImages[2] = 'HomePic34.jpg'
theImages[3] = 'HomePic35.jpg'
theImages[4] = 'HomePic36.jpg'
theImages[5] = 'HomePic37.jpg'
theImages[6] = 'HomePic38.jpg'
theImages[7] = 'HomePic39.jpg'
theImages[8] = 'HomePic40.jpg'


var j = 0
var howMany = theImages.length;
var preBuffer = new Array()
for (i = 0; i < howMany; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = "images/"+theImages[i]
}
var whichImage = Math.round(Math.random()*(howMany-1));
var timeDelay = 10;
timeDelay *= 500;
var PicCurrentNum = whichImage;

function startPix() {
	setInterval("slideshow()", timeDelay);
}
function slideshow() {
	PicCurrentNum++;
	if (PicCurrentNum == howMany) {
		PicCurrentNum = 0;
	}
	if (document.all){
		document.images.homepicture.style.filter="blendTrans(duration=2)";
		document.images.homepicture.filters.blendTrans.Apply();
	}
	document["homepicture"].src = "images/"+theImages[PicCurrentNum];
	if (document.all) document.images.homepicture.filters.blendTrans.Play();
}

function showImage(){
	document["homepicture"].src = "images/"+theImages[whichImage];
	startPix();
}

function printWindow() {
bV = parseInt(navigator.appVersion);
if (bV >= 4) window.print();
}
