// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000;

// Duration of crossfade (seconds)
var crossFadeOutDuration = 10;
var crossFadeInDuration = 15;

// Specify the image files
var Pic = new Array();
Pic[0] = '/images/home/gray-bg.gif'
Pic[1] = '/images/home/penthouse_view.jpg'
Pic[2] = '/images/home/penthouse_view_breath.jpg'

var t;
var j = 0;
var p = Pic.length;
var play = true;
var preLoad = new Array()

for (i = 0; i < p; i++){
   preLoad[i] = new Image();
   preLoad[i].src = Pic[i];
}

function fadeImage(index) {
    var i = document.getElementById('SlideShow');

    if (document.all) {
        i.style.filter="blendTrans(duration=crossFadeOutDuration)";
        i.style.filter="blendTrans(duration=crossFadeInDuration)";
        i.filters.blendTrans.Apply();
    }

    i.src = preLoad[index].src;

    if (document.all) {
        i.filters.blendTrans.Play();
    }
}

window.onload = function() {
    t = setTimeout('fadeImage(1)', 300);
    t = setTimeout('fadeImage(2)', 2000);
}
