<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <ID>f8026c5d-8938-4c64-b70c-0a477c607121</ID>
  <Name>js特效轮换广告</Name>
  <Description>兼容浏览器，在firefox中不现实效果，但是可以正常切换</Description>
  <DataFileName>data.js</DataFileName>
  <DataTemplate>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 &lt; 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 &lt; this.Images.length - 1) ? this.Index + 1 : 0;
    this.TimerID = setTimeout(function(){temp.Slide()}, this.Speed + pixeldelay)
}

document.write("&lt;img id=\"Slide\" style=\"cursor:pointer\" /&gt;");
var images = "&lt;%=Ad[1][Image]%&gt;|&lt;%=Ad[2][Image]%&gt;|&lt;%=Ad[3][Image]%&gt;";
var links = "&lt;%=Ad[1][URLForHit]%&gt;|&lt;%=Ad[2][URLForHit]%&gt;|&lt;%=Ad[3][URLForHit]%&gt;";
var slideit = new SlideImage("Slide", images, links, 3000);
slideit.Slide();
</DataTemplate>
  <InvokeCode>&lt;script type="text/javascript" src="&lt;%=Position[DataFilePath]%&gt;"&gt;&lt;/script&gt;</InvokeCode>
</configuration>