
function fade() { 
javascript:shiftOpacity('btxt', 3000);
javascript:shiftOpacity('topl', 3000);


}

function opacity(id, opacStart, opacEnd, millisec) {
	//speed for each frame
	var speed = Math.round(millisec / 100);
	var timer = 0;

	//determine the direction for the blending, if start and end are the same nothing happens
	if(opacStart > opacEnd) {
		for(i = opacStart; i >= opacEnd; i--) {
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	} else if(opacStart < opacEnd) {
		for(i = opacStart; i <= opacEnd; i++)
			{
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	}
}

//change the opacity for different browsers
function changeOpac(opacity, id) {
	var object = document.getElementById(id).style; 
	object.opacity = (opacity / 100);
	object.MozOpacity = (opacity / 100);
	object.KhtmlOpacity = (opacity / 100);
	object.filter = "alpha(opacity=" + opacity + ")";
}

function shiftOpacity(id, millisec) {
	//if an element is invisible, make it visible, else make it ivisible
		opacity(id, 0, 100, millisec);
}
hex=255 // Initial color value.
hexa=255 // Initial color value.
hexb=255 // Initial color value.
hexc=255 // Initial color value.
function fadetext(){
if(hex>0) { //If color is not black yet
hex-=11; // increase color darkness

document.getElementById("bottomText").style.color="rgb("+hex+","+hex+","+hex+")";

setTimeout("fadetext()",100);
}
else
hex=255 //reset hex value
}

function fadebull(){

if(hexa>0&&hexb>99&&hexc>107) { //If color is not black yet
hexa-=11; // increase color darkness
hexb-=11; // increase color darkness
hexc-=11; // increase color darkness
document.getElementById("b1").style.color="rgb("+hexa+","+hexb+","+hexc+")";
document.getElementById("b2").style.color="rgb("+hexa+","+hexb+","+hexc+")";
setTimeout("fadebull()",100);
}
}



