function getViewportHeight() 
{
	if (window.innerHeight != window.undefined) return window.innerHeight;
	if (document.compatMode == 'CSS1Compat') return document.documentElement.clientHeight;
	if (document.body) return document.body.clientHeight; 
	return window.undefined; 
}

function getViewportWidth() 
{
	if (window.innerWidth != window.undefined) return window.innerWidth;
	if (document.compatMode == 'CSS1Compat') return document.documentElement.clientWidth;
	if (document.body) return document.body.clientWidth;
		return window.undefined;
}

function centerMaskWindow() 
{
	var fullHeight = document.body.offsetHeight;
	var fullWidth = document.body.offsetWidth;
	
	var viewportHeight = getViewportHeight();
	var viewportWidth = getViewportWidth();

	if (fullHeight < viewportHeight)
		fullHeight = viewportHeight;

	if (fullWidth < viewportWidth)
		fullWidth = viewportWidth;

	var popupMask = document.getElementById("divMask");

	popupMask.style.height = fullHeight + "px";
	popupMask.style.width = fullWidth + "px";
	popupMask.style.top = 0 + "px";
	popupMask.style.left = 0 + "px";
}

function showMask()
{
	centerMaskWindow();

	var popupMask = document.getElementById("divMask");
	popupMask.style.display = "";

	setTimeout('', 50); 
}


function hideMask()
{
	var popupMask =	document.getElementById("divMask");
	popupMask.style.display = "none";

	//var animatedImage = document.getElementById("animatedImage");
	//animatedImage.src = ""; 
}

