﻿function closeFnhModal(divObject) {
	document.getElementById(divObject).style.display = "none";
	objDiv = document.getElementById("downloadwrapper");
	objDiv.style.display = "none";
	return false;
}
function showFnhModal(divObject) {
	var x, y;
	var check1 = document.body.scrollHeight;
	var check2 = document.body.offsetHeight
	if (check1 > check2) // all but Explorer Mac
	{
		x = document.body.scrollWidth;
		y = document.body.scrollHeight;
	}
	else // Explorer Mac;
	//would also work in Explorer 6 Strict, Mozilla and Safari
	{
		x = document.body.offsetWidth;
		y = document.body.offsetHeight;
	}
	try {
		document.getElementById(divObject).style.display = "block";
		objDiv = document.getElementById("downloadwrapper");
		objDiv.style.display = "block";
		objDiv.style.width = "100%";
		objDiv.style.height = "100%";
	}
	catch (e) {
		alert(e);
	}
	return false
}

function closeGameViewModal(divObject) {
	document.getElementById(divObject).style.display = "none";
	gvDiv = document.getElementById("gameviewwrapper");
	if (gvDiv != null) {
		gvDiv.style.display = "none";
	}
	return false;
}
function showGameViewModal(divObject) {
	var x, y;
	var check1 = document.body.scrollHeight;
	var check2 = document.body.offsetHeight
	if (check1 > check2) // all but Explorer Mac
	{
		x = document.body.scrollWidth;
		y = document.body.scrollHeight;
	}
	else // Explorer Mac;
	//would also work in Explorer 6 Strict, Mozilla and Safari
	{
		x = document.body.offsetWidth;
		y = document.body.offsetHeight;
	}
	try {
		document.getElementById(divObject).style.display = "block";
		gvDiv = document.getElementById("gameviewwrapper");
		if (gvDiv != null) {
			gvDiv.style.display = "block";
			gvDiv.style.width = x + "px";
			gvDiv.style.height = y + "px";
		}
	}
	catch (e) {
		alert(e);
	}
	return false
}
