function SlideImage(id, images, links, speed)
{
    this.Image = document.getElementById(id);
    if (this.Image == null)
        return;
    
    this.Images = images.split("|");
    this.Links = links.split("|");
    this.Speed = speed;
    this.TimerID = 0;
    this.Index = 0;
        
    this.ImageHolder = new Array();
    this.IE55 = window.createPopup;
    for (var i = 0; i < this.Images.length; i++)
    {
        this.ImageHolder[i] = new Image();
        this.ImageHolder[i].src = this.Images[i];
    }

    this.Filters = new Array();
    this.Filters[0] = "progid:DXImageTransform.Microsoft.Pixelate (enabled=false,duration=2,maxSquare=25 )";
    this.Filters[1] = "progid:DXImageTransform.Microsoft.Stretch (duration=1,stretchStyle=PUSH)";
    this.Filters[2] = "progid:DXImageTransform.Microsoft.Stretch(duration=1)";
    this.Filters[3] = "progid:DXImageTransform.Microsoft.Slide(bands=8, duration=1)";
    this.Filters[4] = "progid:DXImageTransform.Microsoft.Fade ( duration=1,overlap=0.25 )";
    
    var temp = this;
    this.Image.onmouseover = function(){clearTimeout(temp.TimerID)};
    this.Image.onmouseout = function(){temp.Slide()};        
}

SlideImage.prototype.Slide = function()
{
    this.Image.style.filter = this.Filters[this.Index];
    var pixeldelay = (this.IE55) ? (this.Image.filters[0].duration * 1000) : 0;

    if (this.IE55)
    {
        this.Image.filters[0].apply();
        this.Image.filters[0].play();	
    }
    
    var temp = this;

    this.Image.src = this.ImageHolder[this.Index].src;
    this.Image.onclick = function(){window.open(temp.Links[temp.Index])};

    if (this.IE55)
        this.Image.filters[0].play();
        
    this.Index = (this.Index < this.Images.length - 1) ? this.Index + 1 : 0;
    this.TimerID = setTimeout(function(){temp.Slide()}, this.Speed + pixeldelay)
}

document.write("<img id=\"Slide\" style=\"cursor:pointer\" />");
var images = "||";
var links = "||";
var slideit = new SlideImage("Slide", images, links, 3000);
slideit.Slide();
