<!--

var images = new Array(), zInterval = null, current=0, pause=false;

var speed=5000;

function StartRollingBanner()
{
	window.addEventListener?window.addEventListener("load",BannerInit,false):window.attachEvent("onload",BannerInit);
}

function BannerInit()
{
	if(!document.getElementById)return;

	images = document.getElementById("imageContainer").getElementsByTagName("img");

	for(i=1; i<images.length; i++)
	{
		images[i].xOpacity = 0;
	}

	images[0].style.display = "block";
	images[0].xOpacity = .99;

	setTimeout(crossFade, speed);
}

function crossFade()
{
	cOpacity = images[current].xOpacity;
	nIndex = images[current+1] ? current+1 : 0;

	nOpacity = images[nIndex].xOpacity;

	cOpacity -= .05;
	nOpacity += .05;

	images[nIndex].style.display = "block";
	images[current].xOpacity = cOpacity;
	images[nIndex].xOpacity = nOpacity;

	setOpacity(images[current]);
	setOpacity(images[nIndex]);

	if(cOpacity<=0)
	{
		images[current].style.display = "none";
		current = nIndex;
		setTimeout(crossFade,speed);
	}
	else
	{
		setTimeout(crossFade,25);
	}

	function setOpacity(obj)
	{
		if(obj.xOpacity>.99)
		{
			obj.xOpacity = .99;
			return;
		}

		obj.style.opacity = obj.xOpacity;
		obj.style.MozOpacity = obj.xOpacity;
		obj.style.filter = "alpha(opacity=" + (obj.xOpacity*100) + ")";
	}
}
// -->
