// JavaScript Document

function showAnswer(who,contentLetter) 
{
	switch (who.className) 
	{
		case "normal_em common_color active pointer":
			who.className = "normal_em common_color passive pointer";
			document.getElementById("sign_" + contentLetter).className = "passive R sprite_sign";
			document.getElementById("content_" + contentLetter).style.position = "absolute";
			document.getElementById("content_" + contentLetter).style.top = "-5000px";
			break;
		case "normal_em common_color passive pointer":
			who.className = "normal_em common_color active pointer";
			document.getElementById("sign_" + contentLetter).className = "active R sprite_sign";
			document.getElementById("content_" + contentLetter).style.position = "static";
			document.getElementById("content_" + contentLetter).style.top = "0px";
			break;
		case "normal_em common_color last_active pointer":
			who.className = "normal_em common_color last_passive pointer";
			document.getElementById("sign_" + contentLetter).className = "passive R sprite_sign";
			document.getElementById("content_" + contentLetter).style.position = "absolute";
			document.getElementById("content_" + contentLetter).style.top = "-5000px";
			break;
		case "normal_em common_color last_passive pointer":
			who.className = "normal_em common_color last_active pointer";
			document.getElementById("sign_" + contentLetter).className = "active R sprite_sign";
			document.getElementById("content_" + contentLetter).style.position = "static";
			document.getElementById("content_" + contentLetter).style.top = "0px";
			break;
	}
}

function checkDescriptionHeight(who)
{
	if (navigator.appName == "Microsoft Internet Explorer")
		var channelsList = who.nextSibling.childNodes;
	else
		var channelsList = who.nextSibling.nextSibling.childNodes;
	for (var i=0; i<channelsList.length; i++) 
	{
		if (channelsList[i]) 
		{
			for (var j=0; j<channelsList[i].childNodes.length; j++ ) 
			{
				if (channelsList[i].childNodes[j])
				{						
					for (var k=0; k<channelsList[i].childNodes[j].childNodes.length; k++) 
					{
						if ((channelsList[i].childNodes[j].childNodes[k]) && (channelsList[i].childNodes[j].childNodes[k].innerHTML) && (channelsList[i].childNodes[j].childNodes[k].innerHTML.indexOf("<img") == -1)) 
						{
							if ((channelsList[i].childNodes[j].childNodes[k]).offsetHeight > 24)
								channelsList[i].childNodes[j].childNodes[k].style.paddingTop = "2px";
						}
					}
				}
			}
		}	
	}
}

function mesureHeight()
{
	var containerHeight = document.getElementById("channels_list").offsetHeight;
	document.getElementById("bottom_right").style.top = (containerHeight - 9) + "px";
	document.getElementById("bottom_left").style.top = (containerHeight - 9) + "px";
}
