var gTip = new Array();
var lastopen = null;
function showTip(gamelink) {
	hideTip();
	hrefTmp = gamelink.href.split("/");
	hIndex = hrefTmp[hrefTmp.length - 1];
	linkPos = findPos(gamelink);
	if (gTip[hIndex]) {
		gTip[hIndex].style.left = linkPos[0] + "px";
		gTip[hIndex].style.top = (linkPos[1] - 100) + "px";
		gTip[hIndex].style.display = "";
	} else {
		gTip[hIndex] = document.createElement("div");
		gTip[hIndex].setAttribute("class", "gtip");
		gTip[hIndex].style.left = linkPos[0] + "px";
		gTip[hIndex].style.top = (linkPos[1] - 100) + "px";
		gTip[hIndex].innerHTML = "<img src='http://games.bigfishgames.com/en_" + hIndex + "/th_screen1.jpg' width='125' height='94' alt='' />";
		gamelink.appendChild(gTip[hIndex]);
	}
	lastopen = gTip[hIndex];
}
function hideTip() {
	if (lastopen != null) {
		lastopen.style.display = "none";
		lastopen = null;
	}
}
function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		do {
			curleft += obj.offsetLeft;
			curtop += obj.offsetTop;
		} while (obj = obj.offsetParent);
	}
	return [curleft,curtop];
}
function trackGP() {
	var d = new Date();
	var e = new Image(1, 1);
	e.src = "/pcnt.gif?g=" + g + "&t=" + d.getTime();
}
function lG() {
	gB = document.createElement("iframe");
	gB.setAttribute("src", "http://games.bigfishgames.com/" + gF + "/online/");
	gB.setAttribute("width", gW);
	gB.setAttribute("height", gH);
	gB.setAttribute("marginheight", "0");
	gB.setAttribute("marginwidth", "0");
	gB.setAttribute("scrolling", "no");
	gB.setAttribute("frameborder", "0");
	document.getElementById("gameblock").appendChild(gB);
}