<!--
var velocidad = 5000;
var duracionFader = 3;
var Imagenes = new Array();
var ImagenesPreLoad = new Array();
var cargado = false;
var fotoActual = -1;

var t;
var j = 0;


function rotar(pImagenes){
    if (pImagenes != undefined)
    {
        Imagenes = pImagenes;
        var p = Imagenes.length;
        for (i = 0; i < p; i++)
        {
           ImagenesPreLoad[i] = new Image();
           ImagenesPreLoad[i].src = Imagenes[i];
        }
    }
    
	if (cargado != true)
		cargado = true;
	else
		{    
	   if (document.all){
	      document.images.fotoSuc1.style.filter="blendTrans(duration=2)";
		  document.images.fotoSuc2.style.filter="blendTrans(duration=2)";
	      document.images.fotoSuc1.style.filter="blendTrans(duration=duracionFader)";
		  document.images.fotoSuc2.style.filter="blendTrans(duration=duracionFader)";
	      document.images.fotoSuc1.filters.blendTrans.Apply();
		  document.images.fotoSuc2.filters.blendTrans.Apply();
	   }
	   if(fotoActual == -1)
	   {
	       if (Imagenes.length == 1)
	        document.images.fotoSuc2.src = ImagenesPreLoad[0].src;
	       else
	        document.images.fotoSuc2.src = ImagenesPreLoad[1].src;
	       document.images.fotoSuc1.src = ImagenesPreLoad[0].src;
	       fotoActual = 0;
	   }
	   else
	   {
	       document.images.fotoSuc2.src = document.images.fotoSuc1.src;
	       
	       fotoActual++;
	       if (fotoActual > Imagenes.length -1)
	        fotoActual = 0;
	       document.images.fotoSuc1.src = ImagenesPreLoad[fotoActual].src;
	   }
	   
	   if (document.all){
	      document.images.fotoSuc1.filters.blendTrans.Play();
		  document.images.fotoSuc2.filters.blendTrans.Play();
	   	}
   	}
   if (Imagenes.length > 1)
    t = setTimeout('rotar()', velocidad);
}

//-->
