// how long an image is shown, any transition time for IE is added
var delay = 2000;
// IE transition duration, specify as floating point in seconds
var transDuration = 2.0;
var transType = 23; // random change as needed
var images = new Array();
preloadImages ('images/fotos/pand20.jpg');
preloadImages ('images/fotos/pand30.jpg');
preloadImages ('images/fotos/pand31.jpg');
preloadImages ('images/fotos/pand32.jpg');
preloadImages ('images/fotos/pand33.jpg');
preloadImages ('images/fotos/pand34.jpg');
preloadImages ('images/fotos/pand35.jpg');
preloadImages ('images/fotos/pand17.jpg');
preloadImages ('images/fotos/pand21.jpg');
preloadImages ('images/fotos/pand22.jpg');
preloadImages ('images/fotos/pand23.jpg');
preloadImages ('images/fotos/pand24.jpg');
preloadImages ('images/fotos/pand25.jpg');
preloadImages ('images/fotos/pand26.jpg');
preloadImages ('images/fotos/pand27.jpg');
preloadImages ('images/fotos/pand28.jpg');
preloadImages ('images/fotos/pand29.jpg');
preloadImages ('images/fotos/pand13.jpg');
preloadImages ('images/fotos/pand14.jpg');
preloadImages ('images/fotos/pand15.jpg');
preloadImages ('images/fotos/pand16.jpg');
preloadImages ('images/fotos/pand18.jpg');
preloadImages ('images/fotos/pand19.jpg');
preloadImages ('images/fotos/pand9.jpg');
preloadImages ('images/fotos/pand2.jpg');
preloadImages ('images/fotos/pand3.jpg');
preloadImages ('images/fotos/pand4.jpg');
preloadImages ('images/fotos/pand5.jpg');
preloadImages ('images/fotos/pand6.jpg');
preloadImages ('images/fotos/pand7.jpg');
preloadImages ('images/fotos/pand8.jpg');
preloadImages ('images/fotos/pand1.jpg');
preloadImages ('images/fotos/pand10.jpg');
preloadImages ('images/fotos/pand11.jpg');
preloadImages ('images/fotos/pand12.jpg');


var cnt = 0;
function preloadImages() {
  for (var i = 0; i < arguments.length; i++) {
    images[images.length] = new Image();
    images[images.length - 1].src = arguments[i];
  }
}
var imgTag = '';
imgTag += '<IMG NAME="theImage" ';
imgTag += document.all ?
           ' STYLE="filter: revealTrans(duration='
            + transDuration + ',transition=' + transType + ');" ' :
           '';
imgTag += ' SRC="' + images[0].src + '"';
imgTag += '>';

setTimeout ("nextImage()", delay);
function nextImage () {
  cnt = ++cnt % images.length;
  var img = document.theImage;
  if (img.filters && transType == 23)  // get random type
    img.filters.revealTrans.transition =
      Math.floor(Math.random() * 23);
  if (img.filters)
    img.filters.revealTrans.apply();
  img.src = images[cnt].src;
  if (img.filters)
    img.filters.revealTrans.play();
  setTimeout('nextImage()',
    delay + (img.filters ? Math.round(transDuration * 1000) : 0));
}
