

var slidespeed=10000;
var imageholder=new Array();
var slideimages = new Array();
var strslideimages = "";

function slideit(){
if (document.getElementById("imageRotator"))
{
var random=Math.round(Math.random()* (imageholder.length-1)  );

//if (ie) document.images.imageRotator.filters[0].apply();
//document.images.imageRotator.src=imageholder[random].src;
//if (ie) document.images.imageRotator.filters[0].play();

if (document.getElementById("imageRotator").filters)  {
document.images.imageRotator.style.filter="blendTrans(duration=2)";
document.images.imageRotator.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.imageRotator.filters.blendTrans.Apply();
}
document.images.imageRotator.src=imageholder[random].src;
if (document.getElementById("imageRotator").filters) document.images.imageRotator.filters.blendTrans.Play();

setTimeout("slideit()",slidespeed);
}
}

function startSlides(delay)
{
if (document.getElementById("imageRotator"))
{
var cnt = 0;
var debug = "";
slideimages = strslideimages.split(",");
for (i=0;i<slideimages.length;i++){
if (slideimages[i]!="")
{
imageholder[cnt]=new Image();
imageholder[cnt].src=slideimages[i];
debug += imageholder[cnt].src + "\n";
cnt++;
}
}
setTimeout("slideit()",delay);
}
}

$(function() {
    $(".carousel").cycle({ 
        fx:    "fade", 
        timeout: 6000, 
        cleartypeNoBg: true
    });
});