var x = 1.0;
var t;
var i;

function darken(i){
	if (x > 0.5){
		x = x - 0.05;
		i.style.opacity=x;
		i.style.filter = 'Alpha(opacity = '+x*100+')'
		t=setTimeout("darken(i)",50);
	} else lighten(i);
}

function lighten(i){
	if (x < 1.0){
		x = x + 0.05;
		i.style.opacity=x;
		i.style.filter = 'Alpha(opacity = '+x*100+')'
		t=setTimeout("lighten(i)",50);
	} else darken(i);
}

function out(i){
	clearTimeout(t);
	x = 1.0;
	i.style.opacity=x;
	i.style.filter = 'Alpha(opacity = '+x*100+')'
}