function GetYScroll()
{
	iYScroll = 0;
	if ( window.innerHeight && window.scrollMaxY || window.innerWidth && window.scrollMaxX )
	{
		iYScroll = window.innerHeight + window.scrollMaxY;
		iXScroll = window.innerWidth + window.scrollMaxX;
		var pDocElement = document.documentElement;
		var iWidth = (pDocElement && pDocElement.clientWidth) || document.body.clientWidth || window.innerWidth || self.innerWidth;
		var iHeight = (pDocElement && pDocElement.clientHeight) || document.body.clientHeight || window.innerHeight || self.innerHeight;
		iXScroll -= (window.innerWidth - iWidth);
		iYScroll -= (window.innerHeight - iHeight);
	}
	else if ( document.body.scrollHeight > document.body.offsetHeight || document.body.scrollWidth > document.body.offsetWidth )
	{
		// all but Explorer Mac
		iYScroll = document.body.scrollHeight;
		iXScroll = document.body.scrollWidth;
	}
	else
	{
		// Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		iYScroll = document.body.offsetHeight;
		iXScroll = document.body.offsetWidth;
	}
	return iYScroll;
}
var arrElements =
[
	'calcform', 'result', 'whois'
];
function ShowForm(strFormId)
{
	window.scrollTo(0, 0);
	try {
		$(strFormId).style.display = 'block';
	} catch ( e ) {}
	ShowScreen();
}

function HideForms()
{
	for ( i in arrElements )
	{
		try {
			$(arrElements[i]).style.display = 'none';
		} catch ( e ) {}
	}
	HideScreen();
}
function ShowScreen()
{
	$('screen').style.display = 'block';
	$('screen').style.height = GetYScroll() + 'px';
}
function HideScreen()
{
	$('screen').style.display = 'none';
}