var Color= new Array();
Color[15] = "FFFF99";
Color[14] = "FFFFa0";
Color[13] = "FFFFa5";
Color[12] = "FFFFaa";
Color[11] = "FFFFb0";
Color[10] = "FFFFb5";
Color[9]  = "FFFFba";
Color[8]  = "FFFFc0";
Color[7]  = "FFFFc5";
Color[6]  = "FFFFca";
Color[5]  = "FFFFd0";
Color[4]  = "FFFFd9";
Color[3]  = "FFFFe0";
Color[2]  = "FFFFe9";
Color[1]  = "FFFFFF";

var elem;

function waittofade(ele)
{
	if ( document.getElementById(ele) )
	{
		elem = ele;
		setTimeout("fadeIn(15)", 100);
	}
}

function fadeIn(where)
{
	if (where >= 1)
	{
		document.getElementById(elem).style.backgroundColor = "#" + Color[where];
		if (where > 1)
		{
			where -= 1;
			setTimeout("fadeIn("+where+")", 130);
		}
		else
		{
			where -= 1;
			setTimeout("fadeIn("+where+")", 130);
			document.getElementById(elem).style.backgroundColor = "transparent";
		}
    }
}
