<!--
/*****
Image Cross Fade Redux
Version 1.0
Last revision: 02.15.2006
steve@slayeroffice.com

Please leave this notice intact. 

Rewrite of old code found here: http://slayeroffice.com/code/imageCrossFade/index.html
*****/
window.addEventListener?window.addEventListener("load",so_init4948f9a62cd2b,false):window.attachEvent("onload",so_init4948f9a62cd2b);

var d=document, rotImg4948f9a62cd2b=new Array(), zInterval=null, current=0, pause=false;

function so_init4948f9a62cd2b(){
	if(!d.getElementById || !d.createElement)return;

	rotImg4948f9a62cd2b = d.getElementById("rot_img4948f9a62cd2b").getElementsByTagName("img");
	for(i=1;i<rotImg4948f9a62cd2b.length;i++) rotImg4948f9a62cd2b[i].xOpacity = 0;
	rotImg4948f9a62cd2b[0].style.display = "block";
	rotImg4948f9a62cd2b[0].xOpacity = .99;

	setTimeout(so_xfade4948f9a62cd2b,6000);
}

function so_xfade4948f9a62cd2b(){
	cOpacity = rotImg4948f9a62cd2b[current].xOpacity;
	nIndex = rotImg4948f9a62cd2b[current+1]?current+1:0;
	nOpacity = rotImg4948f9a62cd2b[nIndex].xOpacity;

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

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

	setOpacity(rotImg4948f9a62cd2b[current]); 
	setOpacity(rotImg4948f9a62cd2b[nIndex]);
	if(cOpacity<=0){
		rotImg4948f9a62cd2b[current].style.display = "none";
		current = nIndex;
		setTimeout(so_xfade4948f9a62cd2b,6000);
	}else{
		setTimeout(so_xfade4948f9a62cd2b,4*15);
	}

	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) + ")";
	}
}
//-->

