<!--
/* PRODUCT CARD */
function initImageChanging(str)
{
    document.productImages = str.split("|");
    if (document.productImages.length > 1)
	    changeProductImgBtnVisibility(false);
	else    
	    changeProductImgBtnVisibility(true);
	    
    if (document.productImages.length > 0)
    {
        document.productImageIndex = 0;
        document.getElementById("imgProduct").src = document.productImages[0];
    }    
    else
        document.getElementById("imgProduct").style.visibility = "hidden";       
}

function changeProductImage(next)
{
   if (next)
   {
       if (document.productImageIndex < document.productImages.length - 1) 
           document.productImageIndex++;
   }
   else
   {
       if (document.productImageIndex > 0) 
           document.productImageIndex--;
   }
   changeProductImgBtnVisibility(false);
   document.getElementById("imgProduct").src = document.productImages[document.productImageIndex];
   
   	//click on link call onbeforeunload but not reload page, 
   	//status bar have to be explicit cleared. See: showPageLoadingInStatusBar in commonfunction.js
	if (br_ie)	
	{
		status="";	
		
	}	
}

function changeProductImgBtnVisibility(hideAll)
{
   if (hideAll)
   {
		document.getElementById("btnPrevImg").style.visibility = "hidden";
		document.getElementById("btnNextImg").style.visibility = "hidden";
		document.getElementById("separatorImg").style.visibility = "hidden";
   }
   else
   {
		if (document.productImageIndex == 0)
			document.getElementById("btnPrevImg").style.visibility = "hidden";
		else    
			document.getElementById("btnPrevImg").style.visibility = "visible";
		       
		if (document.productImageIndex == document.productImages.length - 1)
			document.getElementById("btnNextImg").style.visibility = "hidden";
		else    
			document.getElementById("btnNextImg").style.visibility = "visible";
   }     
}

//-->
