function SlideShow(dest, im, c, t)
{
	var currentIndex = 0;
	var maxIndex;
	
	var destination = dest;
	var image = im;
	var total = t;
	var current = c;
	
	this.init = function()
	{
 		maxIndex = image.length-1;
 		document.getElementById(destination).src = image[0];
 		total = getElementsByClass(total)[0];
 		current = getElementsByClass(current)[0];
 		total.innerHTML = maxIndex;
 		current.innerHTML = 0;
	}

	this.next = function()
	{
		if(currentIndex + 1 > maxIndex)
		{
			currentIndex = 0;
		}
		else
		{
			currentIndex += 1;
		}
		
		document.getElementById(destination).src = image[currentIndex];
		current.innerHTML = currentIndex;
	}

	this.previous = function()
	{
		if(currentIndex - 1 <= 0)
		{
			currentIndex = maxIndex;
		}
		else
		{
			currentIndex -= 1;
		}
		
		document.getElementById(destination).src = image[currentIndex];
		current.innerHTML = currentIndex;
	}

}
