function opacityIn(id) 
{
	//speed for each frame
	var speed = 10;//Math.round(millisec / 100);
	var timer = 0;

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

function opacityOut(id) 
{
	//speed for each frame
	var speed = 10;//Math.round(millisec / 100);
	var timer = 0;

	//determine the direction for the blending, if start and end are the same nothing happens
	for(i = 0; i <= 100; 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 + ")";
}

