// JavaScript Document
<!--//--><![CDATA[//><!--

var startColor = "dddddd";
var endColor = "ffffff";
var color = startColor;
var interval;
var time = 0;
var lastTag;

function backgroundToColor(tag, i, finish) {
	time++;
	color = "0x" + color; //tag.style.backgroundColor
	color = parseInt(color, 16) + parseInt("0x010101", 16);
	color = color.toString(16)
	bgcolor = "#" + color;
	tag.style.backgroundColor = bgcolor;
	if (color == endColor || (parseInt("0x" + color, 16) > 16777215) || finish == true) {
		tag.style.backgroundColor = "#" + endColor;
		clearInterval(interval);
		color = startColor;
		time = 0;
		return;
	}
	if (time > 38) {
		tag.style.backgroundColor = "#" + endColor;
		clearInterval(interval);
		time = 0;
	}
}

function setBackground(tag, i) {
	if (lastTag != null) {
		backgroundToColor(lastTag, i, true);
		//lastTag.style.backgroundColor = "#" + endColor;
		//document.write(lastTag.style.backgroundColor);
	}
	interval = setInterval("backgroundToColor(tag, i, false)", 50);
	lastTag = tag;
}

function showRelated(linkTag, idx, count) {
	for (var i=0; i < count; i++) {
		id = idx + "[" + i + "]";
		tag = document.getElementById(id);
		tag.style.display = 'block';
		setBackground(tag, i);
	}
	//setBackground(linkTag.parentNode, i);
	linkTag.style.display = 'none';
}
//--><!]]>
