function getWindowHeight() {
	var windowHeight=0;
	if (typeof(window.innerHeight)=='number') {
		windowHeight=window.innerHeight;
	}	else {
		if (document.documentElement&&
		document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}	else {
			if (document.body&&document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}

function getWindowWidth() {
	var windowWidth=0;
	if (typeof(window.innerWidth)=='number') {
		windowWidth=window.innerWidth;
	}	else {
		if (document.documentElement&&
		document.documentElement.clientWidth) {
			windowWidth = document.documentElement.clientWidth;
		}	else {
			if (document.body&&document.body.clientWidth) {
				windowWidth = document.body.clientWidth;
			}
		}
	}
	return windowWidth;
}

function getCurrentYPos() {
 if (document.body && document.body.scrollTop)
   return document.body.scrollTop;
 if (document.documentElement && document.documentElement.scrollTop)
   return document.documentElement.scrollTop;
 if (window.pageYOffset)
   return window.pageYOffset;
 return 0;
}

function getCurrentXPos() {
 if (document.body && document.body.scrollLeft)
   return document.body.scrollLeft;
 if (document.documentElement && document.documentElement.scrollLeft)
   return document.documentElement.scrollLeft;
 if (window.pageXOffset)
   return window.pageXOffset;
 return 0;
}

function setFooter() {
  return false;
}

function setLoading()
{
  $('loading').style.top  = (getCurrentYPos() + getWindowHeight() / 2 - 21) + 'px';
  $('loading').style.left = (getCurrentXPos() + getWindowWidth() / 2 - 95) + 'px';
}

function showLoading()
{
  setLoading();
  new Effect.Appear('loading', {duration:0.3, from:0, to:0.8});
}

function hideLoading()
{
  new Effect.Fade('loading', {duration:0.3, from:0.8, to:0});
}

