var allowFeaturePic = true;

function gamePicOver(td, rating)
{
	var featuredImgSrc = td.childNodes[0].lang;
	if(featuredImgSrc != "" && featuredImgSrc != null)
	{
		var featuredPicBox = document.getElementById("featuredPicBox");
		var featuredPicTitle = document.getElementById("featuredPicTitle");
		var featuredPicDesc = document.getElementById("featuredPicDesc");
		var featuredDesc = td.childNodes[1].lang;
		var featuredLeft = 10;
		var featuredTop = 10;
		var image = "<img src='/images/stumpy/rating" + rating + ".gif' alt='' />";
		document.getElementById("featuredImg").src = featuredImgSrc;
		
		featuredPicTitle.innerHTML =  "<table style='width:300px;' cellpadding='0' cellspacing='0'><tr><td style='width:25px;padding:1px;border-right:1px solid #000000'>" + image + "</td><td style='width:275px;vertical-align:middle;'>" + td.childNodes[0].childNodes[0].alt + "</td></tr></table>";
		featuredPicDesc.innerHTML = featuredDesc;
		featuredTop = findPosY(td) + 100;		
		
		
		featuredLeft = findPosX(td) - 120;
		if(featuredLeft < 10) featuredLeft = 10;
		if(featuredTop < 10) featuredtop = 10;
		featuredPicBox.style.left = featuredLeft + "px";
		featuredPicBox.style.top = featuredTop + "px";		
	}
	if(td.className == "gameNavyTd gameNavyTdBG") td.className = "gameNavyTdOver gameNavyTdBG";
	else if(td.className == "gameTd gameTdBG") td.className = "gameTdOver gameTdBG";
}
function gamePicOut(td)
{
	var featuredPicBox = document.getElementById("featuredPicBox");
	featuredPicBox.style.left = "-10000px";
	featuredPicBox.style.top = "-10000px";
	if(td.className == "gameNavyTdOver gameNavyTdBG") td.className = "gameNavyTd gameNavyTdBG";
	else if(td.className == "gameTdOver gameTdBG") td.className = "gameTd gameTdBG";
}
function gamePicDown(td)
{
	var gameLink = "";
	gameLink = td.childNodes[0].childNodes[0].lang;
	top.location.href = gameLink;
}
function topSitesMouseDown(div, id)
{
	document.getElementById("linktositeiframe").src = "http://www.flashtrackz.com/linkout.php?id=" + id;
}
function topSitesMouseOver(div, url, hits)
{
}
function topSitesMouseOut(div)
{
}
function topGamesMouseOver(div)
{
	var img = div.childNodes[0];
	img.style.display = "inline";
}
function topGamesMouseOut(div)
{
	var img = div.childNodes[0];
	img.style.display = "none";
}
function categoryDown(div, link)
{
	top.location.href = link;

}
