function fadequotes(i,r,g,b,num) {
	if (i >= num) {
		i = 0;
	}
	id = "quote"+i;
	if (document.getElementById(id)) {
		fdiv=document.getElementById(id);
		xr = num2hex(r);
		xg = num2hex(g);
		xb = num2hex(b);
		mm = "#"+xr+""+xg+""+xb;
		fdiv.style.color=mm;
		r += 7;
		g += 6;
		b += 5;
		if (r < 179) {
			qt = setTimeout("fadequotes("+i+","+r+","+g+","+b+","+num+")",20);
		} else {
			i++
			if (i >= (num-1)) {
				i=0;
			}
			id = "quote"+i;
			fdiv2 = document.getElementById(id);
			fdiv2.style.color = mm;
			fdiv2.style.visibility = "visible";
			fdiv.style.visibility = "hidden";
			qt = setTimeout("fadeinquotes("+i+",179,153,113,"+num+")",20);
		}
	} else {
		clearTimeout(qt);
	}
}



function fadeinquotes(i,r,g,b,num) {
	id = "quote"+i;
	if (document.getElementById(id)) {
		fdiv=document.getElementById(id);
		xr = num2hex(r);
		xg = num2hex(g);
		xb = num2hex(b);
		mm = "#"+xr+""+xg+""+xb;
		fdiv.style.color=mm;
		r -= 7;
		g -= 6;
		b -= 5;
		if (r >= 0) {
			qt = setTimeout("fadeinquotes("+i+","+r+","+g+","+b+","+num+")",20);
		} else {
			fdiv.style.color = "#000000";
			qt = setTimeout("fadequotes("+i+",0,0,0,"+num+")",6000);
		}
	} else {
		clearTimeout(qt);
	}
}

function num2hex(m) {
	if (m < 0) {
		xm = "00";
	} else {
		if (m < 16) {
			xm = "0"+m.toString(16).toUpperCase();
		} else {
			xm = m.toString(16).toUpperCase();
		}
	}
	return xm;
}


