// JavaScript Document

<!--
window.onload = initImageLinks;

var thisImg=0;

var Pics = new Array ("assets/slides2/1-1084.jpg", "assets/slides2/slide2.jpg","assets/slides2/slide3.jpg","assets/slides2/slide4.jpg","assets/slides2/slide5.jpg","assets/slides2/slide6.jpg","assets/slides2/slide7.jpg");

var Butts = new Array ("Butt1.jpg", "Butt2.jpg", "Butt3.jpg", "Butt4.jpg", "Butt5.jpg", "Butt6.jpg", "Butt7.jpg","Butt8.jpg");

function initImageLinks()
{
	if(document.getElementById("button").parentNode.tagName == "A")
	{
		document.getElementById("button").parentNode.onclick = newLocation;
	}
	if(document.getElementById("prevLink").tagName == "A")
	{
		document.getElementById("prevLink").onclick = processPrevious;
	}
	if(document.getElementById("nextLink").tagName == "A")
	{
		document.getElementById("nextLink").onclick = processNext;
	}
}

function newLocation()
{
	var addURL = new Array("page1.html","page2.html","page3.html", "page4.html", "page5.html", "page6.html", "page7.html","page8.html");
	document.location.href = addURL[thisImg];
	return false;
}

function processPrevious()
{
	if(thisImg == 0)
	{
		thisImg = Pics.length;
	}
	thisImg--;
	document.getElementById("image").src = Pics[thisImg];
	document.getElementById("button").src = Butts[thisImg];
	
	return false;
}

function processNext()
{
	thisImg++
	if(thisImg == Pics.length)
	{
		thisImg=0
	}
	document.getElementById("image").src = Pics[thisImg];
	document.getElementById("button").src = Butts[thisImg];
	
	return false;
}
//-->
	
	