function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

function getInnerDims()
{
	if(self.innerHeight) // all except Explorer
	{
		this.x = self.innerWidth;
		this.y = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		this.x = document.documentElement.clientWidth;
		this.y = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		this.x = document.body.clientWidth;
		this.y = document.body.clientHeight;
	}
}

function getScrollOffset()
{
	if (self.pageYOffset) // all except Explorer
	{
		this.x = self.pageXOffset;
		this.y = self.pageYOffset;
	}
	else if (document.documentElement && document.documentElement.scrollTop)
		// Explorer 6 Strict
	{
		this.x = document.documentElement.scrollLeft;
		this.y = document.documentElement.scrollTop;
	}
	else if (document.body) // all other Explorers
	{
		this.x = document.body.scrollLeft;
		this.y = document.body.scrollTop;
	}
}

function getPageDims()
{
	var test1 = document.body.scrollHeight;
	var test2 = document.body.offsetHeight
	if (test1 > test2) // all but Explorer Mac
	{
		this.x = document.body.scrollWidth;
		this.y = document.body.scrollHeight;
	}
	else // Explorer Mac;
		 //would also work in Explorer 6 Strict, Mozilla and Safari
	{
		this.x = document.body.offsetWidth;
		this.y = document.body.offsetHeight;
	}
}
