function scrollGallery(increment) 
{
	var imgIndex = parseInt(document.getElementById('imgIndex').value);
	//alert("CurrentIndex " + imgIndex);

	//Increment the index of the images to show	
	if ( increment == 'left' )
	{
		imgIndex = imgIndex - 1;
	}
	if ( increment == 'right' )
	{
		imgIndex = imgIndex + 1;
	}
	//alert("After Increment " + imgIndex);
	//Check to see if we will be able to display 3 images
	var getLi = document.getElementById('scrollport').getElementsByTagName("li");

	if ( imgIndex + 2 > getLi.length )
	{
		imgIndex = 1;
	}
	else if ( imgIndex <= 0 )
	{
		imgIndex = getLi.length - 2;
	}
	//alert("DisplayIndex " + imgIndex);

	for (var i = 0; i<getLi.length; i++) {
		
		getLi[i].className=getLi[i].className.replace("hide", "");
		if ( !(i+1 >= imgIndex && i+1 <= imgIndex + 2) )
		{
			//alert("hiding " + getLi[i].className);
			getLi[i].className+=" hide";
		}
	}
	document.getElementById('imgIndex').value = imgIndex;
}