var changing_thumbs = new Array();
function changeThumb(index, i, num_thumbs, thumb, attempt)
{
if (changing_thumbs[index])
{
if ( i > num_thumbs )
{
i = 1;
}	lthumb = new Image();
lthumb.src = pic_url + "thumbs/" + thumb + "-" + i + ".jpg";
//	--- .complete property not supported in IE9, replaced with .onload function --- // if ( lthumb.complete )
lthumb.onload = function()
{
document.getElementById(index).src = pic_url + "thumbs/" + thumb + "-" + i + ".jpg";
i++;
setTimeout("changeThumb('" + index + "'," + i + ", " + num_thumbs + ", '" + thumb + "', 1)", 600);
}
// --- replaced with lthumb.onerror function --- // else
lthumb.onerror = function()
{
setTimeout("changeThumb('" + index + "'," + i + ", " + num_thumbs + ", '" + thumb + "', 1)", 20);
}
}
}	function startThumbChange(index, num_thumbs, thumb)
{	
	if(thumb != "no_image.gif"){
		changing_thumbs[index] = true;
		num_thumbs = num_thumbs - 1;	changeThumb(index, 1, num_thumbs, thumb, 1);
	}
}
function endThumbChange(index, thumb)
{
changing_thumbs[index] = false;
document.getElementById(index).src = pic_url + "thumbs/" + thumb;
}
