function toggleElement(element) {
	if (document.getElementById(element).style.display == 'none') {
		document.getElementById(element).style.display = 'block';
	}
	else {
		document.getElementById(element).style.display = 'none';
	}
}

function getWindowWidth()
{
	if (document.all) return document.body.clientWidth;
	if (document.layers) return innerWidth;
	return 800;
}

function getWindowHeight()
{
	if (document.all) return document.body.clientHeight;
	if (document.layers) return innerHeight;
	return 600;
}

function getPageSizeWithScroll()
{
	if (window.innerHeight && window.scrollMaxY) {// Firefox
		yWithScroll = window.innerHeight + window.scrollMaxY;
		xWithScroll = window.innerWidth + window.scrollMaxX;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		yWithScroll = document.body.scrollHeight;
		xWithScroll = document.body.scrollWidth;
	} else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
		yWithScroll = document.body.offsetHeight;
		xWithScroll = document.body.offsetWidth;
	}
	arrayPageSizeWithScroll = new Array(xWithScroll,yWithScroll);
	//alert( 'The height is ' + yWithScroll + ' and the width is ' + xWithScroll );
	return arrayPageSizeWithScroll;
}

pageResize = function()
			{
				pageSize = getPageSizeWithScroll();
				xajax.$('loadingMessageContainer').style.width = pageSize[0]+'px';
				xajax.$('loadingMessageContainer').style.height = pageSize[1]+'px';
			}
