// Gallery script.
// With image cross fade effect for those browsers that support it.
// Script copyright (C) 2004 www.cryer.co.uk.
// Script is free to use provided this copyright header is included.
function LoadGallery(pictureName,imageFile,titleCaption,captionText)
{
 	if (document.all)
	{
    	document.getElementById(pictureName).style.filter="blendTrans(duration=1)";
	    document.getElementById(pictureName).filters.blendTrans.Apply();
	}

	document.getElementById(pictureName).src = imageFile;
	var imageLink = imageFile.replace("/uploads/products/","/uploads/products/full/");
	document.getElementById('lb').href = imageLink;

	if (document.all)
	{
		document.getElementById(pictureName).filters.blendTrans.Play();
	}
}

function blendimage(divid, imageid, imagefile, millisec) { 
    var speed = Math.round(millisec / 100); 
    var timer = 0; 
     
    //set the current image as background 
	document.getElementById(pictureName).style.filter = "url(" + document.getElementById(imageid).src + ")"; 
     
    //make image transparent 
    changeOpac(0, imageid); 
     
    //make new image 
    document.getElementById(imageid).src = imagefile; 

    //fade in image 
    for(i = 0; i <= 100; i++) { 
        setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed)); 
        timer++; 
    } 
} 