var slideshow_speed = 5000;
var cross_fade_duration = 3;

function slideshow_step(fotos, webs, i) {
    var ss = document.getElementById('slideshow');
    if (document.all) {
        ss.style.filter = "blendTrans(duration=1)";
        ss.filters.blendTrans.Apply();
    }
    ss.src = fotos[i];
    var ss_a = document.getElementById('slideshow_a');
    ss_a.href = webs[i];
    if (document.all)
        ss.filters.blendTrans.Play();
    setTimeout(function () {
        slideshow_step(fotos, webs, (i + 1) % fotos.length);
    }, slideshow_speed);
}

function slideshow(fotos, webs) {
    for (var foto in fotos) {
        var img = new Image();
        img.src = foto;
    }
    slideshow_step(fotos, webs, 0);
}

