/**
 * @author Michelangelo Capraro (mich@number9.com)
 */



function getWidth()
{
      var x = 0;
      if (self.innerHeight)
      {
              x = self.innerWidth;
      }
      else if (document.documentElement && document.documentElement.clientHeight)
      {
              x = document.documentElement.clientWidth;
      }
      else if (document.body)
      {
              x = document.body.clientWidth;
      }
      return x;
}

function getHeight()
{
      var y = 0;
      if (self.innerHeight)
      {
              y = self.innerHeight;
      }
      else if (document.documentElement && document.documentElement.clientHeight)
      {
              y = document.documentElement.clientHeight;
      }
      else if (document.body)
      {
              y = document.body.clientHeight;
      }
      return y;
}

var startWidth = getWidth();
var startHeight = getHeight();
var startX = window.screenLeft == null ? window.screenX : window.screenLeft;
var startY = window.screenTop == null ? window.screenY : window.screenTop;


// this forces the browser fullscreen
function maximize()
{
	window.resizeTo(screen.width, screen.height);
	window.moveTo(0, 0);
}

// this brings the browser back to it's original size
function restore()
{
	window.resizeTo(startWidth, startHeight);
	window.moveTo(startX, startY);
}


