function disableScreen()
{
	if( document.body && ( document.body.scrollWidth || document.body.scrollHeight ) )
	{
			var pageWidth = document.body.scrollWidth+'px';
			var pageHeight = document.body.scrollHeight+'px';
	}
	else if( document.body.offsetWidth )
	{
		var pageWidth = document.body.offsetWidth+'px';
		var pageHeight = document.body.offsetHeight+'px';
	}
	else
	{
		var pageWidth='100%';
		var pageHeight='100%';
	}

	document.getElementById('subPopupBG').style.height = pageHeight;
	document.getElementById('subPopupBG').style.width = pageWidth;
	document.getElementById('subPopupBG').style.display='block';
}

function enableScreen()
{
	document.getElementById('subPopupBG').style.display='none';
}

function showPopup(popupid)
{
	//disableScreen();

	document.getElementById(popupid).style.display='block';
	return false;
}

function hidePopup(popupid)
{
	//enableScreen();
	document.getElementById(popupid).style.display='none';

	return false;
}


//Disabling the screen globally was an afterthought in this app,
//so this function will give us this ability without messing with the
//existing screens that provide it.
function disableScreen2()
{
	initRafBG();

	if( document.body && ( document.body.scrollWidth || document.body.scrollHeight ) )
	{
			var pageWidth = document.body.scrollWidth+'px';
			var pageHeight = document.body.scrollHeight+'px';
	}
	else if( document.body.offsetWidth )
	{
		var pageWidth = document.body.offsetWidth+'px';
		var pageHeight = document.body.offsetHeight+'px';
	}
	else
	{
		var pageWidth='100%';
		var pageHeight='100%';
	}

	document.getElementById('disableBG').style.height = pageHeight;
	document.getElementById('disableBG').style.width = pageWidth;
	document.getElementById('disableBG').style.display='block';
}

function enableScreen2()
{
	document.getElementById('disableBG').style.display='none';
}