// JavaScript Document
var links;
var mark;
function prepareSlideshow() {
	//Make sure the browser understands the DOM methods
	if (!document.getElementsByTagName) 	return false;
	if (!document.getElementById)	return false;
	
	//Make sure the elements exist
	if(!document.getElementById("linklist"))return false;
	if(!document.getElementById("preview"))return false;
	
	//Apply styles to the preview image
	var preview = document.getElementById("preview");
	preview.style.position = "absolute";
	preview.style.left = "0px";
	preview.style.top = "0px";
	
	//Get all the links in the list
	var list = document.getElementById("linklist");
	list.style.position = "absolute";
	list.style.left = "0px";
	list.style.top = "200px";
	
	links = list.getElementsByTagName("a");
	var xCord = 0;
	var yCord = 0;
	
	links[0].onclick = function() {
		moveElement("preview", 0, 0, 0);
		return false;
	}
	links[1].onclick = function() {
		moveElement("preview", -212, 0, 0);
		return false;
	}
	links[2].onclick = function() {
		moveElement("preview", -424, 0, 0);
		return false;
	}
	links[3].onclick = function() {
		moveElement("preview", -636, 0, 0);
		return false;
	}
	links[4].onclick = function() {
		moveElement("preview", -848, 0, 0);
		return false;
	}
}
function hideLinks(list, index) {
	for (var i=0; i<list.length; i++) {
		list[i].style.display = "none";
	}
	list[index].style.display = "inline";
}
addLoadEvent(prepareSlideshow);