var dynimages = new Array()
var preloadimg = "yes"
var optlinktarget = ""
var imgborderwidth = 0

if (preloadimg=="yes")
{
	for (x=0; x<dynimages.length; x++)
	{
		var myimage=new Image()
		myimage.src=dynimages[x][0]
	}
}

function returnimgcode(theimg)
{
	var imghtml=""
	if (theimg[1]!="")
		imghtml='<A HREF="'+theimg[1]+'" TARGET="'+optlinktarget+'">'
		imghtml+='<IMG SRC="'+theimg[0]+'" BORDER="'+imgborderwidth+'">'
	if (theimg[1]!="")
		imghtml+='</A>'
	return imghtml
}

function modifyimage(loadarea, imgindex)
{
	if (document.getElementById)
	{
		var imgobj=document.getElementById(loadarea)
		imgobj.innerHTML=returnimgcode(dynimages[imgindex])
	}
}

