	PicList = new Array();

	function getobject(obj)
	{
		if (document.getElementById)
		return document.getElementById(obj)
		else if (document.all)
		return document.all[obj]
	}

	function ShowPic(picIndex)
	{
		getobject("PicFilename").src = PicList[picIndex][0];
		getobject("PicText").innerHTML = PicList[picIndex][2];

		var PrevPic = picIndex - 1;
		if (PrevPic == 0) { // if at first pic, stay on first pic
			getobject("Prev").href = "javascript:ShowPic(1)";
		}
		else {
			getobject("Prev").href = "javascript:ShowPic(" + PrevPic + ")";
		}; 

		var NextPic = picIndex + 1;
		if (NextPic == PicList.length) { // if at last pic, stay on last pic
			getobject("Next").href = "javascript:ShowPic(" + (PicList.length - 1) + ")";
		}
		else {
			getobject("Next").href = "javascript:ShowPic(" + NextPic + ")";
		};

		for (i=1; i<PicList.length; i++) {
			getobject("PicThumbName" + i).border = "1";
		}
		getobject("PicThumbName" + picIndex).border = "3";
	}

	function ShowThumbs()
	{
		getobject("First").href = "javascript:ShowPic(1)";
		getobject("Last").href = "javascript:ShowPic(" + (PicList.length - 1) + ")";

		for (i=1; i<PicList.length; i++) {
			getobject("PicThumbName" + i).src = PicList[i][1];
			getobject("PicThumb" + i).href = "javascript:ShowPic(" + i + ")";
		}
	}

