function getOffsetHeight (el) {
  var ol = el.offsetHeight;
  while ((el = el.offsetParent) != null)
    ol += el.offsetHeight;
  return ol;
}

function getOffsetWidth (el) {
  var ol = el.offsetWidth;
  while ((el = el.offsetParent) != null)
    ol += el.offsetWidth;
  return ol;
}

function getOffsetTop (el) {
  var ot = el.offsetTop;
  while((el = el.offsetParent) != null)
   ot += el.offsetTop;
  return ot;
}

function getOffsetLeft (el) {
  var ol = el.offsetLeft;

  while ((el = el.offsetParent) != null)
    ol += el.offsetLeft;
  return ol;

}
