// JavaScript Document

<!--
window.onload = initImageLinks;

var thisImg=0;

var Pics = new Array ("assets/slides3/slide1.jpg", "assets/slides3/slide2.jpg","assets/slides3/slide3.jpg","assets/slides3/slide4.jpg");

var Butts = new Array ("Butt1.jpg", "Butt2.jpg", "Butt3.jpg", "Butt4.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");
	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;
}
//-->
	
	