var timer;
var currentLink;

function myGetElementById(id) {
	var elem = false;
	if (document.getElementById) {
		elem = document.getElementById(id)
	} else if (document.all) {
		elem = document.all[id]
	}
	return elem;
}

function mover(link) {
	clearTimeout(timer);
	if (currentLink) {
		mout(currentLink);
	}
	link.style.backgroundColor = "#fff";
	currentLink = link;
	timer = setTimeout("fade('#fff')", 40);
}
function mout(link) {
	link.style.backgroundColor = "#009";
}

function fade(color) {
	if (currentLink) {
		if (color == '#fff') {
			currentLink.style.backgroundColor = "#c8c8e9";
			timer = setTimeout("fade('#c8c8e9')", 40);
			return;
		}
		if (color == '#c8c8e9') {
			currentLink.style.backgroundColor = "#8989d0";
			timer = setTimeout("fade('#8989d0')", 60);
			return;
		}
		if (color == '#8989d0') {
			currentLink.style.backgroundColor = "#3334ae";
			timer = setTimeout("fade('#3334ae')", 80);
			return;
		}
		if (color == '#3334ae') {
			currentLink.style.backgroundColor = "#009";
		}
	}
}

