﻿
var photos=new Array()
var photoslink=new Array()
var which=0

//Aquí tienes que insertar la batería de fotos que quieras exponer. Todas deben ser de las mismas dimensiones
photos[0]="top1.jpg"
photos[1]="top2.jpg"
photos[2]="top3.jpg"
photos[3]="top4.jpg"
photos[4]="top5.jpg"
photos[5]="top6.jpg"
photos[6]="top7.jpg"






//Aquí debes especificar cuantas imágenes tienen enlaces
var linkornot=0

//Aquí introducirás las URL correspondientes a los enlaces de tus imágenes.
photoslink[0]=""
photoslink[1]=""
photoslink[2]=""
photoslink[3]=""



//No toques nada a partir de aquí

var preloadedimages=new Array()
for (i=0;i<photos.length;i++){
preloadedimages[i]=new Image()
preloadedimages[i].src=photos[i]
}


function applyeffect(){
if (document.all){
photoslider.filters.revealTrans.Transition=Math.floor(6) //Math.random()*23  //0,12,23 mola 
photoslider.filters.revealTrans.stop()
photoslider.filters.revealTrans.apply()
}
}



function playeffect(){
if (document.all)
photoslider.filters.revealTrans.play()
}

function keeptrack(){
//window.status="Image "+(which+1)+" of "+photos.length
}


function backward(){
if (which>0){
which--
applyeffect()
document.images.photoslider.src=photos[which]
playeffect()
keeptrack()
}
}

function forward()
{
if (which>photos.length-2)
{
    which=-1;
}
    //if (which<photos.length-1)
    //{
    which++
    applyeffect()
    

    document.images.photoslider.src=photos[which]
    playeffect()
    keeptrack()
    //}
}

function transport(){
window.location=photoslink[which]
}
function cargar()
{
setInterval("forward()",5000);
}
