/*****

Image Cross Fade Redux
Version 1.0
Last revision: 02.15.2006
steve@slayeroffice.com

Please leave this notice intact. 

*****/

window.addEventListener?window.addEventListener("load",function(){so_initer1('imageContainer1',curr1)},false):window.attachEvent("onload",function(){so_initer1('imageContainer1',curr1)});

var imgr1 = new Array();
var curr1=0;

function so_initer1(idname) {

	if(!document.getElementById || !document.createElement)return;
	css = document.createElement("link");
	css.setAttribute("href","");	// This may need to be set to a file.css at some point
	css.setAttribute("rel","stylesheet");
	css.setAttribute("type","text/css");
	document.getElementsByTagName("head")[0].appendChild(css);
	imgr1 = document.getElementById(idname).getElementsByTagName("img");
	for(i=1;i<imgr1.length;i++) imgr1[i].xOpacity = 0;
	imgr1[0].style.display = "block";
	imgr1[0].xOpacity = .99;
	setTimeout(so_xfader1,4000); }	// This starts things going and is only called once

function so_xfader1() {

	cOpacity = imgr1[curr1].xOpacity;
	nIndex = imgr1[curr1+1]?curr1+1:0;
	nOpacity = imgr1[nIndex].xOpacity;
	cOpacity-=.05; 
	nOpacity+=.05;
	imgr1[nIndex].style.display = "block";
	imgr1[curr1].xOpacity = cOpacity;
	imgr1[nIndex].xOpacity = nOpacity;
	
	setOpacity(imgr1[curr1]); 
	setOpacity(imgr1[nIndex]);
	
	if(cOpacity<=0) {
		imgr1[curr1].style.display = "none";
		curr1 = nIndex;
		setTimeout(so_xfader1,8000);
	} else {
		setTimeout(so_xfader1,50);
	}
	
	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) + ")";
	} }

window.addEventListener?window.addEventListener("load",function(){so_initer2('imageContainer2',curr2)},false):window.attachEvent("onload",function(){so_initer2('imageContainer2',curr2)});

var imgr2 = new Array();
var curr2=0;

function so_initer2(idname) {

	if(!document.getElementById || !document.createElement)return;
	css = document.createElement("link");
	css.setAttribute("href","");	// This may need to be set to a file.css at some point
	css.setAttribute("rel","stylesheet");
	css.setAttribute("type","text/css");
	document.getElementsByTagName("head")[0].appendChild(css);
	imgr2 = document.getElementById(idname).getElementsByTagName("img");
	for(i=1;i<imgr2.length;i++) imgr2[i].xOpacity = 0;
	imgr2[0].style.display = "block";
	imgr2[0].xOpacity = .99;
	setTimeout(so_xfader2,4000); }	// This starts things going and is only called once

function so_xfader2() {

	cOpacity = imgr2[curr2].xOpacity;
	nIndex = imgr2[curr2+1]?curr2+1:0;
	nOpacity = imgr2[nIndex].xOpacity;
	cOpacity-=.05; 
	nOpacity+=.05;
	imgr2[nIndex].style.display = "block";
	imgr2[curr2].xOpacity = cOpacity;
	imgr2[nIndex].xOpacity = nOpacity;
	
	setOpacity(imgr2[curr2]); 
	setOpacity(imgr2[nIndex]);
	
	if(cOpacity<=0) {
		imgr2[curr2].style.display = "none";
		curr2 = nIndex;
		setTimeout(so_xfader2,8000);
	} else {
		setTimeout(so_xfader2,50);
	}
	
	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) + ")";
	} }

window.addEventListener?window.addEventListener("load",function(){so_initer3('imageContainer3',curr3)},false):window.attachEvent("onload",function(){so_initer3('imageContainer3',curr3)});

var imgr3 = new Array();
var curr3=0;

function so_initer3(idname) {

	if(!document.getElementById || !document.createElement)return;
	css = document.createElement("link");
	css.setAttribute("href","");	// This may need to be set to a file.css at some point
	css.setAttribute("rel","stylesheet");
	css.setAttribute("type","text/css");
	document.getElementsByTagName("head")[0].appendChild(css);
	imgr3 = document.getElementById(idname).getElementsByTagName("img");
	for(i=1;i<imgr3.length;i++) imgr3[i].xOpacity = 0;
	imgr3[0].style.display = "block";
	imgr3[0].xOpacity = .99;
	setTimeout(so_xfader3,4000); }	// This starts things going and is only called once

function so_xfader3() {

	cOpacity = imgr3[curr3].xOpacity;
	nIndex = imgr3[curr3+1]?curr3+1:0;
	nOpacity = imgr3[nIndex].xOpacity;
	cOpacity-=.05; 
	nOpacity+=.05;
	imgr3[nIndex].style.display = "block";
	imgr3[curr3].xOpacity = cOpacity;
	imgr3[nIndex].xOpacity = nOpacity;
	
	setOpacity(imgr3[curr3]); 
	setOpacity(imgr3[nIndex]);
	
	if(cOpacity<=0) {
		imgr3[curr3].style.display = "none";
		curr3 = nIndex;
		setTimeout(so_xfader3,8000);
	} else {
		setTimeout(so_xfader3,50);
	}
	
	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) + ")";
	} }

window.addEventListener?window.addEventListener("load",function(){so_initer4('imageContainer4',curr4)},false):window.attachEvent("onload",function(){so_initer4('imageContainer4',curr4)});

var imgr4 = new Array();
var curr4=0;

function so_initer4(idname) {

	if(!document.getElementById || !document.createElement)return;
	css = document.createElement("link");
	css.setAttribute("href","");	// This may need to be set to a file.css at some point
	css.setAttribute("rel","stylesheet");
	css.setAttribute("type","text/css");
	document.getElementsByTagName("head")[0].appendChild(css);
	imgr4 = document.getElementById(idname).getElementsByTagName("img");
	for(i=1;i<imgr4.length;i++) imgr4[i].xOpacity = 0;
	imgr4[0].style.display = "block";
	imgr4[0].xOpacity = .99;
	setTimeout(so_xfader4,4000); }	// This starts things going and is only called once

function so_xfader4() {

	cOpacity = imgr4[curr4].xOpacity;
	nIndex = imgr4[curr4+1]?curr4+1:0;
	nOpacity = imgr4[nIndex].xOpacity;
	cOpacity-=.05; 
	nOpacity+=.05;
	imgr4[nIndex].style.display = "block";
	imgr4[curr4].xOpacity = cOpacity;
	imgr4[nIndex].xOpacity = nOpacity;
	
	setOpacity(imgr4[curr4]); 
	setOpacity(imgr4[nIndex]);
	
	if(cOpacity<=0) {
		imgr4[curr4].style.display = "none";
		curr4 = nIndex;
		setTimeout(so_xfader4,8000);
	} else {
		setTimeout(so_xfader4,50);
	}
	
	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) + ")";
	} }

window.addEventListener?window.addEventListener("load",function(){so_initer5('imageContainer5',curr5)},false):window.attachEvent("onload",function(){so_initer5('imageContainer5',curr5)});

var imgr5 = new Array();
var curr5=0;

function so_initer5(idname) {

	if(!document.getElementById || !document.createElement)return;
	css = document.createElement("link");
	css.setAttribute("href","");	// This may need to be set to a file.css at some point
	css.setAttribute("rel","stylesheet");
	css.setAttribute("type","text/css");
	document.getElementsByTagName("head")[0].appendChild(css);
	imgr5 = document.getElementById(idname).getElementsByTagName("img");
	for(i=1;i<imgr5.length;i++) imgr5[i].xOpacity = 0;
	imgr5[0].style.display = "block";
	imgr5[0].xOpacity = .99;
	setTimeout(so_xfader5,4000); }	// This starts things going and is only called once

function so_xfader5() {

	cOpacity = imgr5[curr5].xOpacity;
	nIndex = imgr5[curr5+1]?curr5+1:0;
	nOpacity = imgr5[nIndex].xOpacity;
	cOpacity-=.05; 
	nOpacity+=.05;
	imgr5[nIndex].style.display = "block";
	imgr5[curr5].xOpacity = cOpacity;
	imgr5[nIndex].xOpacity = nOpacity;
	
	setOpacity(imgr5[curr5]); 
	setOpacity(imgr5[nIndex]);
	
	if(cOpacity<=0) {
		imgr5[curr5].style.display = "none";
		curr5 = nIndex;
		setTimeout(so_xfader5,8000);
	} else {
		setTimeout(so_xfader5,50);
	}
	
	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) + ")";
	} }

window.addEventListener?window.addEventListener("load",function(){so_initer6('imageContainer6',curr6)},false):window.attachEvent("onload",function(){so_initer6('imageContainer6',curr6)});

var imgr6 = new Array();
var curr6=0;

function so_initer6(idname) {

	if(!document.getElementById || !document.createElement)return;
	css = document.createElement("link");
	css.setAttribute("href","");	// This may need to be set to a file.css at some point
	css.setAttribute("rel","stylesheet");
	css.setAttribute("type","text/css");
	document.getElementsByTagName("head")[0].appendChild(css);
	imgr6 = document.getElementById(idname).getElementsByTagName("img");
	for(i=1;i<imgr6.length;i++) imgr6[i].xOpacity = 0;
	imgr6[0].style.display = "block";
	imgr6[0].xOpacity = .99;
	setTimeout(so_xfader6,4000); }	// This starts things going and is only called once

function so_xfader6() {

	cOpacity = imgr6[curr6].xOpacity;
	nIndex = imgr6[curr6+1]?curr6+1:0;
	nOpacity = imgr6[nIndex].xOpacity;
	cOpacity-=.05; 
	nOpacity+=.05;
	imgr6[nIndex].style.display = "block";
	imgr6[curr6].xOpacity = cOpacity;
	imgr6[nIndex].xOpacity = nOpacity;
	
	setOpacity(imgr6[curr6]); 
	setOpacity(imgr6[nIndex]);
	
	if(cOpacity<=0) {
		imgr6[curr6].style.display = "none";
		curr6 = nIndex;
		setTimeout(so_xfader6,8000);
	} else {
		setTimeout(so_xfader6,50);
	}
	
	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) + ")";
	} }

window.addEventListener?window.addEventListener("load",function(){so_initer7('imageContainer7',curr7)},false):window.attachEvent("onload",function(){so_initer7('imageContainer7',curr7)});

var imgr7 = new Array();
var curr7=0;

function so_initer7(idname) {

	if(!document.getElementById || !document.createElement)return;
	css = document.createElement("link");
	css.setAttribute("href","");	// This may need to be set to a file.css at some point
	css.setAttribute("rel","stylesheet");
	css.setAttribute("type","text/css");
	document.getElementsByTagName("head")[0].appendChild(css);
	imgr7 = document.getElementById(idname).getElementsByTagName("img");
	for(i=1;i<imgr7.length;i++) imgr7[i].xOpacity = 0;
	imgr7[0].style.display = "block";
	imgr7[0].xOpacity = .99;
	setTimeout(so_xfader7,4000); }	// This starts things going and is only called once

function so_xfader7() {

	cOpacity = imgr7[curr7].xOpacity;
	nIndex = imgr7[curr7+1]?curr7+1:0;
	nOpacity = imgr7[nIndex].xOpacity;
	cOpacity-=.05; 
	nOpacity+=.05;
	imgr7[nIndex].style.display = "block";
	imgr7[curr7].xOpacity = cOpacity;
	imgr7[nIndex].xOpacity = nOpacity;
	
	setOpacity(imgr7[curr7]); 
	setOpacity(imgr7[nIndex]);
	
	if(cOpacity<=0) {
		imgr7[curr7].style.display = "none";
		curr7 = nIndex;
		setTimeout(so_xfader7,8000);
	} else {
		setTimeout(so_xfader7,50);
	}
	
	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) + ")";
	} }

window.addEventListener?window.addEventListener("load",function(){so_initer8('imageContainer8',curr8)},false):window.attachEvent("onload",function(){so_initer8('imageContainer8',curr8)});

var imgr8 = new Array();
var curr8=0;

function so_initer8(idname) {

	if(!document.getElementById || !document.createElement)return;
	css = document.createElement("link");
	css.setAttribute("href","");	// This may need to be set to a file.css at some point
	css.setAttribute("rel","stylesheet");
	css.setAttribute("type","text/css");
	document.getElementsByTagName("head")[0].appendChild(css);
	imgr8 = document.getElementById(idname).getElementsByTagName("img");
	for(i=1;i<imgr8.length;i++) imgr8[i].xOpacity = 0;
	imgr8[0].style.display = "block";
	imgr8[0].xOpacity = .99;
	setTimeout(so_xfader8,4000); }	// This starts things going and is only called once

function so_xfader8() {

	cOpacity = imgr8[curr8].xOpacity;
	nIndex = imgr8[curr8+1]?curr8+1:0;
	nOpacity = imgr8[nIndex].xOpacity;
	cOpacity-=.05; 
	nOpacity+=.05;
	imgr8[nIndex].style.display = "block";
	imgr8[curr8].xOpacity = cOpacity;
	imgr8[nIndex].xOpacity = nOpacity;
	
	setOpacity(imgr8[curr8]); 
	setOpacity(imgr8[nIndex]);
	
	if(cOpacity<=0) {
		imgr8[curr8].style.display = "none";
		curr8 = nIndex;
		setTimeout(so_xfader8,8000);
	} else {
		setTimeout(so_xfader8,50);
	}
	
	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) + ")";
	} }

window.addEventListener?window.addEventListener("load",function(){so_initer9('imageContainer9',curr9)},false):window.attachEvent("onload",function(){so_initer9('imageContainer9',curr9)});

var imgr9 = new Array();
var curr9=0;

function so_initer9(idname) {

	if(!document.getElementById || !document.createElement)return;
	css = document.createElement("link");
	css.setAttribute("href","");	// This may need to be set to a file.css at some point
	css.setAttribute("rel","stylesheet");
	css.setAttribute("type","text/css");
	document.getElementsByTagName("head")[0].appendChild(css);
	imgr9 = document.getElementById(idname).getElementsByTagName("img");
	for(i=1;i<imgr9.length;i++) imgr9[i].xOpacity = 0;
	imgr9[0].style.display = "block";
	imgr9[0].xOpacity = .99;
	setTimeout(so_xfader9,4000); }	// This starts things going and is only called once

function so_xfader9() {

	cOpacity = imgr9[curr9].xOpacity;
	nIndex = imgr9[curr9+1]?curr9+1:0;
	nOpacity = imgr9[nIndex].xOpacity;
	cOpacity-=.05; 
	nOpacity+=.05;
	imgr9[nIndex].style.display = "block";
	imgr9[curr9].xOpacity = cOpacity;
	imgr9[nIndex].xOpacity = nOpacity;
	
	setOpacity(imgr9[curr9]); 
	setOpacity(imgr9[nIndex]);
	
	if(cOpacity<=0) {
		imgr9[curr9].style.display = "none";
		curr9 = nIndex;
		setTimeout(so_xfader9,8000);
	} else {
		setTimeout(so_xfader9,50);
	}
	
	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) + ")";
	} }

