var rotatorIndex = 1;



function StartImageRotator()
{
    window.setInterval('ImageRotator()', 5000);
    //window.setInterval('ImageRotator(progid:DXImageTransform.Microsoft.Wheel((duration=3, spokes=10))', 5000);
}

function ImageRotator(filterFunction)
{   
    if (filterFunction == null)
    {
        filterFunction = 'progid:DXImageTransform.Microsoft.Wheel((duration=3, spokes=10)';
        //filterFunction = "blendTrans(duration=2.0)"
    }

    var img = document.getElementById('ctl00_ImageRotator_imgRotator'); 
    if(img != null)
    {
        img.style.filter = filterFunction;                               
        if (img.filters && img.filters[0])
        {
          img.filters[0].Apply();
          img.filters[0].Play();
        }
     }
    
    var list = document.getElementById('ctl00_ImageRotator_dblImageFiles'); 
    if(list != null)
    {
        img.src = list.options[rotatorIndex].text;   
        if (rotatorIndex >= ((list.length) - 1))
	    {
	        rotatorIndex = 0;
	    }
        else
	    {
	        rotatorIndex = rotatorIndex + 1;
	    }
    }
}
