function schermHoogte(){

  var y;
  if (self.innerHeight) // all except Explorer
  {
    y = self.innerHeight;
  }
  else if (document.documentElement && document.documentElement.clientHeight)
	 // Explorer 6 Strict Mode
  {
    y = document.documentElement.clientHeight;
  }
  else if (document.body) // other Explorers
  {
    y = document.body.clientHeight;
  }
  return y;
}

function schermBreedte(){

  var x;
  if (self.innerHeight) // all except Explorer
  {
    x = self.innerWidth;
  }
  else if (document.documentElement && document.documentElement.clientHeight)
	 // Explorer 6 Strict Mode
  {
	 x = document.documentElement.clientWidth;
  }
  else if (document.body) // other Explorers
  {
	 x = document.body.clientWidth;
  }
  return x;
}

function paginaHoogte(){

  var y;
  var test1 = document.body.scrollHeight;
  var test2 = document.body.offsetHeight;
  if (test1 > test2) // all but Explorer Mac
  {
    y = document.body.scrollHeight;
  }
  else // Explorer Mac;
    //would also work in Explorer 6 Strict, Mozilla and Safari
  {
    y = document.body.offsetHeight;
  }
  return y;
}

function paginaBreedte(){

  var x;
  var test1 = document.body.scrollWidth;
  var test2 = document.body.offsetWidth;
  if (test1 > test2) // all but Explorer Mac
  {
	 x = document.body.scrollWidth;
	}
  else // Explorer Mac;
     //would also work in Explorer 6 Strict, Mozilla and Safari
  {
	 x = document.body.offsetWidth;
	}
  return x;
}

function scrollTop(){

  var y;
  if (self.pageYOffset) // all except Explorer
  {
    y = self.pageYOffset;
  }
  else if (document.documentElement && document.documentElement.scrollTop)
    // Explorer 6 Strict
  {
    y = document.documentElement.scrollTop;
  }
  else if (document.body) // all other Explorers
  {
    y = document.body.scrollTop;
  }
  return y;
}

function scrollLeft(){

  var x;
  if (self.pageYOffset) // all except Explorer
  {
    x = self.pageXOffset;
  }
  else if (document.documentElement && document.documentElement.scrollTop)
    // Explorer 6 Strict
  {
    x = document.documentElement.scrollLeft;
  }
  else if (document.body) // all other Explorers
  {
    x = document.body.scrollLeft;
  }
    return x;
}

function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}
