var productImage;
var nImage=0;

function addProductImage(src,title)
{
	productImage[productImage.length] = new Array(2);
	productImage[productImage.length-1][0] = new Image();
	productImage[productImage.length-1][0].src = src;
	productImage[productImage.length-1][1] = title;
}

function initProductImages()
{
	productImage = new Array();
}

function nextProductImage(n)
{
	if (nImage + n == productImage.length)
	{
		nImage = 0;
	}
	else
	{
		if (nImage + n < 0)
		{
			nImage =  productImage.length - 1;
		}
		else
		{
			nImage += n;
		}
	}

	document['bigProductImage'].src = productImage[nImage][0].src;
	document.getElementById('bigProductTitle').innerHTML = productImage[nImage][1];
	return;
}