var imagePath = "http://www.morfab.com/images/";
var pictures = new Array("1.jpg","2.jpg","3.jpg","4.jpg","5.jpg","6.jpg","7.jpg","8.jpg","9.jpg");
var captions = new Array("Petrochemical Storage Tank",
							"Shell & tube heat exchangers with accumulator tanks",
							"Pump skid for dam project in China",
							"Bayonet type steam shell & tube vaporizers",
							"Shell & tube chillers",
							"Steam separator tank for geothermal installation",
							"Skid mounted refrigeration tank/piping assembly",
							"Stainless steel wine processing tanks",
							"Deaerators with internal stainless trays");
var currentPic = 0;

function advance()
{
	if (currentPic == pictures.length)
	{
		currentPic = 0;
		document.images["SlideShow"].src = imagePath + pictures[currentPic];
		document.captionform.captionfield.value = captions[currentPic];
	}
	else
	{
		document.images["SlideShow"].src = imagePath + pictures[currentPic];
		document.captionform.captionfield.value = captions[currentPic];
		currentPic++;
	}
}

function previous()
{
	if (currentPic == 0)
	{
		currentPic = pictures.length - 1;
		document.images["SlideShow"].src = imagePath + pictures[currentPic];
		document.captionform.captionfield.value = captions[currentPic];
	}
	else
	{
		currentPic--;
		document.images["SlideShow"].src = imagePath + pictures[currentPic];
		document.captionform.captionfield.value = captions[currentPic];
	}
}
