﻿// javascript slideshow daniel bech 2007

var numSlides = 7;
var currentSlide = numSlides;
// captions:
var captionTxt = new Array(numSlides);
captionTxt[1] = "Tortoise Shell"
captionTxt[2] = "Meadow Brown"
captionTxt[3] = "Hover Fly"
captionTxt[4] = "Cuckoo Bee"

captionTxt[5] = "Festoon Moth - An example of this uncommon moth, whose green sluglike caterpillars feed on oak and beech, was found during the moth trapping evening last year.   This year's mothtrapping findings are being fed into the National Moth Survey."

captionTxt[6] = "Leafminer - The winding larva trails of the tiny Stigmella Aurella moth are a common sight on bramble leaves.  So far 42 different varieties of leaf miner have been identified in the cemetery  They come in the two main types shown here - 'galleries' which zig zag through the leaf as they feed; and 'blotches' where the larva forms a delineated blotch on the top or underside of the leaf."

captionTxt[7] = "Stigmella Aurella"

function setUp() {
if (!document.all) {
	document.all = document;
	for (i=1;i<=numSlides;i++) document.all[("image"+i)].style=document.all[("image"+i)];
	}
switchSlide(1);
}

function switchSlide(sDir) {
newSlide = currentSlide + sDir;
if (!newSlide) newSlide=numSlides;
if (newSlide > numSlides) newSlide=1;
document.all[("image"+newSlide)].style.visibility="visible";
document.all[("image"+currentSlide)].style.visibility="hidden";

// cmd to execute captions:

document.all["captions"].document.forCaptions.captionsText.value=captionTxt[newSlide];
currentSlide = newSlide;
}


