/* FUNZIONE CAMBIA FOTO COLLEZIONI */
function cangePhoto (foto, img, widthFoto, heightFoto)
{
	document.getElementById("fotoBig").src = foto;
	document.getElementById("fotoBig").width = widthFoto;
	document.getElementById("fotoBig").height = heightFoto;
}			
/* FINE FUNZIONE CAMBIA FOTO COLLEZIONI */


  
/* FUNZIONE X MUOVERE COLLEZIONI PIC */
  var intervalRight;
  var intervalLeft;

  function scrollFoto_Right()
  {
			var objDiv = document.getElementById("thumbPic");
			var larghezzaClip = objDiv.scrollWidth-219;
			
			objDiv.scrollLeft += 4;
			
			document.getElementById("imgLeft").src="img/back.png";
			
			if (objDiv.scrollLeft >= larghezzaClip)
			{
			document.getElementById("imgRight").src="img/nextRoll.png";
			}
  }

  function scrollFoto_Left()
  {
			var objDiv = document.getElementById("thumbPic");
			var larghezzaClip = objDiv.scrollWidth-219;
			
			objDiv.scrollLeft -= 4;

			document.getElementById("imgLeft").src="img/back.png";
			
			if (objDiv.scrollLeft == 0)
			{
			document.getElementById("imgLeft").src="img/backRoll.png";
			}
			
			if (objDiv.scrollLeft <= larghezzaClip)
			{
			document.getElementById("imgRight").src="img/next.png";
			}
  }

  function CreaMovimentoRight(velocita)
  {
  intervalRight=window.setInterval('scrollFoto_Right()',velocita);
  }

  function CreaMovimentoLeft(velocita)
  {
  intervalLeft=window.setInterval('scrollFoto_Left()',velocita);
  }
  
/* FINE FUNZIONE X MUOVERE COLLEZIONI PIC */  
