// JavaScript Document

	var currindex = 1;
	function go(index) {

		switch (index) {
			case "-1":
				index = currindex - 1;
				if (index==0) index = loopsize;
				break;
			case "+1":
				index = currindex + 1;
				if (index>loopsize) index = 1;
				break;
		}
		
		var i = 1;
		var elem;
		var imglink;
		var divcaption;
		for (i;i<=loopsize;i++) {
			elem = document.getElementById("img" + i);
//			imglink = document.getElementById("imglink" + i);
			divcaption = document.getElementById("caption" + i);
			if (elem) {
				if (i==index) {
					elem.style.display = "block";
//					imglink.src = "images/box_selected.gif";
					divcaption.style.display = "block";
				} else {
					elem.style.display = "none";
//					imglink.src = "images/box.gif";
					divcaption.style.display = "none";
				}
			}
		}
		currindex = index;
	}