function writeBufferZone( pageH ) 
{
var winH = 0;
var divH = 0;

	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		winH = window.innerHeight;
	} else if( document.documentElement &&
		( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		winH = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		winH = document.body.clientHeight;
	}

	if ( winH > pageH ) {
		divH = (winH - pageH) / 3
	}
		
	writeBufferZone = '<div id=\"buffer\" style=\"height:' + divH + 'px;\"><img src=\"/images/furniture/spacer.gif\" height=\"' + divH + '\" width=\"1\"/></div>' 
	return writeBufferZone
}

function enableSubmit() {
	if ($F('user') == ''  || $F('passcode')== '' ) {
		alert('Please enter a valid user id and password');
		return false;
	} else {
		return true;
	}

}

function getQSParam(key) {
	hQS = $H(window.location.href.toQueryParams());
	return hQS.get(key);
}

function checkErr() {
	if ( getQSParam('err') == 'true' ) {
		$('error').show();	
	}
}