window.addEventListener ? window.addEventListener("load",init,false) : window.attachEvent("onload",init);

var d=document, divs = new Array(), zInterval = null, current=0, pause=false;

var dd = null;

function init()
	{
	if (!d.getElementById || !d.createElement || !d.getElementById("banners"))
		{return;}

	divs = d.getElementById("banners").getElementsByTagName("div");

	if (divs.length < 2)
		{return;}

	for (i=1; i<divs.length; i++)
		{divs[i].xOpacity = 0;}

	divs[0].xOpacity = .99;

	setTimeout(xfade,4000);
	}

function xfade()
	{
	cOpacity = divs[current].xOpacity;
	nIndex = divs[current+1]?current+1:0;
	nOpacity = divs[nIndex].xOpacity;

	cOpacity-=.05;
	nOpacity+=.05;

	divs[nIndex].style.display = "block";
	divs[current].xOpacity = cOpacity;
	divs[nIndex].xOpacity = nOpacity;

	setOpacity(divs[current]);
	setOpacity(divs[nIndex]);

	if (cOpacity<=0)
		{
		divs[current].style.display = "none";
		current = nIndex;
		setTimeout(xfade,4000);
		}
	else
		{setTimeout(xfade,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) + ")";
		}
	}


function focusThis(i)
	{
	if (i.getAttribute('old') == null)
		{i.setAttribute('old',i.value);}

	if (i.getAttribute('old') == i.value)
		{i.value = '';}

	i.className = 'focus';
	}


function blurThis(i)
	{
	if (i.value == '')
		{
		i.className = 'text';
		i.value = i.getAttribute('old');
		}
	}