
function Desplegar(Id, Fotos, Tiempo, Efecto, Duracion, Transparencia)
{

  var oImg = document.getElementById(Id);

  FotoActual = 0;
  aFotos = Fotos;

  oImg.style.visibility = "visible";
  oImg.style.filter = "revealTrans(duration= " + Duracion + "); alpha(opacity=" + (100 - Transparencia) + ")";

  Alternar (Id, Tiempo, Efecto)

  
 }


 function Alternar(Id, TiempoImagen, idEfecto)

 {   

    var oImagen = document.getElementById(Id);

    oImagen.filters["revealTrans"].Apply();
   

	if (oImagen.style.visibility == "visible") 
	{ 
		////oImagen.style.visibility = "hidden";
 	        //// Si la imagen se hace invisible primero, hay un fondo blanco antes de cambiar  //

		oImagen.filters.revealTrans.transition= idEfecto; 


		if (FotoActual == aFotos.length -1)
		{
			FotoActual = 0; 
		}
		else 
		{
			FotoActual ++;
		}

		oImagen.src = Fotos[FotoActual];
	} 

	else 

	{  	
		oImagen.style.visibility = "visible"; 
		oImagen.filters["revealTrans"].transition=Efecto; 
	} 

	oImagen.filters["revealTrans"].Play(); 


    	setTimeout( "Alternar('" + Id + "', " + TiempoImagen + ", " +idEfecto + ")", TiempoImagen); 

 }


