// JavaScript Document

	function nextImage(group)
		{
			found = false;

			for (i = 0; i < myImages[group].length; i++)
				{
					pos = document.getElementById('image'+group).src.indexOf(myImages[group][i]);
					if ((pos != -1) && (!found))
						{
							found = true;
							if (i + 1 >= myImages[group].length)
								{
									document.getElementById('image'+group).src = document.getElementById('image'+group).src.substr(0, pos) + myImages[group][0];
									found = true;
								}
							else
								{
									document.getElementById('image'+group).src = document.getElementById('image'+group).src.substr(0, pos) + myImages[group][i+1];
								}
						}
				}
		}

	function prevImage(group)
		{
			found = false;
			for (i = 0; i < myImages[group].length; i++)
				{
					pos = document.getElementById('image'+group).src.indexOf(myImages[group][i]);
					if ((pos != -1) && (!found))
						{
							found = true;
							if (i - 1 < 0)
								{
									document.getElementById('image'+group).src = document.getElementById('image'+group).src.substr(0, pos) + myImages[group][myImages[group].length - 1];
									found = true;
								}
							else
								{
									document.getElementById('image'+group).src = document.getElementById('image'+group).src.substr(0, pos) + myImages[group][i-1];
								}
						}
				}
		}