window.onload = initAll;
var currImg = 0;
var captionText = new Array(
	"Upwey wishing well. This is the source of the river Wey. The well is entered through the Wishing Well restaurant which serves excellent home cooked food either in the restaurant or outside in the beautiful gardens. The gardens are extensive and watered by offshoots of the Wey which fill the various ponds and waterfalls.",
	"This is the lovely sandy beach at Weymouth with a backdrop of the famous Georgian sea front terraces. Children love this beach and swimming is very safe, there are no strong tides and no large waves(except in the rare occurrence of an Easterly wind)",
	"Church street Upwey. This photo was taken on a dull day in January from outside Jasmine Cottage looking toward the Wishing Well . The Wishing Well is approximately 800 yards distant.",
	"A view of the Isle and Royal Manor of Portland taken from the Nothe Gardens in Weymouth. The breakwater, seen in the mid ground, encloses a large harbour three miles across which used to be a Naval port but is now used by commercial shipping and pleasure craft. This is a great place for water sports like sailboarding and will be home to the olympic sailing in 2012. ",
	"A view of the chesil beach from the very top of Portland. To the left of the beach is Lyme bay and to the right is the Fleet. The Fleet is a backwater stretching as far as the village of Abbotsbury and the Swannery some eight miles distant. The Chesil beach is eighteen miles long reaching from Portland to West Bay. The shingle is naturally graded from large stones at the Portland end down to half inch diameter stones at the West Bay end",
	"The Old Ship Inn located on the old roman road in Upwey, about 800 yards from Jasmin Cottage. A character pub with a cosy bar and extensive dining rooms",
	"The Riverhouse Village Inn and Restaurant. Located about 400 yards from Jasmine Cottage. The Riverhouse has a lovely beer garden, a bar serving real ales and an upmarket restaurant serving meals to relish and remember",
	"The river Wey from the Wishing Well gardens. At this point the river is only 50 yards from its source which rises under the Wishing Well. From here it runs four miles toward Weymouth where it empties into Radipole lake. The river is a clean, fast flowing, chalk stream well stocked with native brown trout. The heron is a frequent visitor together with seasonal appearances of white egrets. We have even seen kingfishers here on rare occassions",
	"This is the thirteenth century St. Lawrence village church.",
	"Weymouth harbour where you can catch the Condor seacat fast ferry to the channel Islands, Guernsey and Jersey, and onward to St Malo in Brittany. This fine harbour is a favourite with visiting yachtsmen, tourists and locals alike. The picturesque quays have a backdrop of character pubs, fine restaurants and lots of tourist attractions.",
	"A view of the thirteenth century St Lawrence Church taken from a hilltop above.The church is built of Upwey stone quarried from this hilltop and hewn by local masons. That was all a very long time ago and this lovely village church has mellowed beautifully with age."
)
function initAll() {
	document.getElementById("imgText").innerHTML = captionText[0];
	document.getElementById("prevLink").onclick = processPrevious;
	document.getElementById("nextLink").onclick = processNext;
}
function processPrevious() {
	newSlide(-1);
}
function processNext() {
	newSlide(1);
}
function newSlide(direction) {
	var imgCt = captionText.length;
	currImg = currImg + direction;
	if (currImg < 0) {
		currImg = imgCt-1;
	}
	if (currImg == imgCt) {
		currImg = 0;
	}
	document.getElementById("slideshow").src = "images03/slideImg" + currImg + ".jpg"
	document.getElementById("imgText").innerHTML = captionText[currImg]
}
