var reloading = false;

function closeThis() { parent.close(); }

function timeOut() { setTimeout('closeThis()',100); }

function grabTime() {
	if (reloading == false) {
		var endTime = new Date;
		options = "scrollbars=no,menubar=no,toolbar=no,location=no,status=no,resizable=no";
		window.open("/games/PrepareRating.asp?gameID=" + numGameID + "&timeSpent=" + ( endTime - startTime ),"timeWindow","width=550,height=400");
		timeOut();
		timedFlag = 1;
	}
}

function gameFocus() { if (document.all) game.focus(); }

function refreshOpener() { var s = opener.location; opener.location = s; }

function reload() {
	var u = String(document.location);
	if (u.indexOf("&time") == -1) u = u + "&time=" + startTime;
	reloading = true;
	document.location = u;
}