var imageArray = new Array();
var captionArray = new Array();
var imageCount;



function PutMainImage(fNo)
{
var imgSRC = "img src=~" + imageArray[fNo] + "~ id=~imgPreview~ ";
imgSRC = imgSRC + "style=~width:261px; height:348px;margin:0 0 3px 0;";
imgSRC = imgSRC + "border:1px solid #006600;float:left;~ ";
imgSRC = imgSRC + "alt=~Jam Jar Shop product images~  /" ;

var imgText = imgSRC.replace(/~/g, "'");

imgText = encodeURI(imgText);

document.write(decodeURI("%3C" + imgText + "%3E"));
}





function PutThumbs(fCount)
{	
var imgSRC;
var imgText;
for (intL = 0; intL < fCount; intL++)
	{
	imgSRC = "img src=~" + imageArray[intL] + "~ class=~imagethumb~ ";
	imgSRC = imgSRC + " style=~width:60px;height:80px;border:1px solid #006600;";
	imgSRC = imgSRC + "margin:0 5px 2px 0;float:left;cursor:pointer~ ";
	imgSRC = imgSRC + " alt=~Jam Jar Shop product image~ ";
	imgSRC = imgSRC + " onclick=~PreviewImage(" + intL + ");~ /";
	imgText = imgSRC.replace(/~/g, "'");
	imgText = encodeURI(imgText);
	document.write(decodeURI("%3C" + imgText + "%3E"));
	}
}






function PreviewImage(fID)
{
document.getElementById("imgPreview").src = imageArray[fID];
}
