docs: function (element, stopAbsolute) {
              if (!element) {
                  return;
              }
  
              var document = element.ownerDocument;
              // shortcut to Browser
              var browser = ariaCoreBrowser;
  
              var offsetLeft = 0;
              var offsetTop = 0;
              var scrollTop = 0;
              var scrollLeft = 0;
  
              var scrollNotIncluded = true;
  
              // Get offset information
              var i = 0;
              /* Get the dom in case of JS object */
              var obj = element, objPositionCss;
  
              if (obj.getBoundingClientRect && !stopAbsolute) {
                  // IE getBoundingClientRect have extra pixels.
                  // cf https://github.com/jquery/jquery/blob/master/src/offset.js#L101-106
                  var shiftLeft = browser.isIE7 ? document.documentElement.clientLeft : 0;
                  var shiftTop = browser.isIE7 ? document.documentElement.clientTop : 0;
                  // IE throws an error if the element is not in DOM
                  try {
                      var rect = obj.getBoundingClientRect();
                      scrollNotIncluded = false;
                      offsetLeft = rect.left - shiftLeft;
                      offsetTop = rect.top - shiftTop;
  
                  } catch (er) {
                      offsetLeft = 0;
                      offsetTop = 0;
                  }
              } else {
                  while (obj && obj.parentNode) {
                      objPositionCss = aria.utils.Dom.getStyle(obj, "position");
  
                      if (stopAbsolute && i > 0 && objPositionCss == "absolute") {
                          break;
                      }
                      offsetLeft += obj.offsetLeft;
                      offsetTop += obj.offsetTop;
  
                      obj = obj.offsetParent;
                      i++;
                  }
              }
  
              // Get scroll information
              i = 0;
              obj = element;
  
              while (obj && obj.parentNode && obj.parentNode != document.body && obj.parentNode.tagName) {
  
                  if (!browser.isOpera && obj.nodeName != 'HTML') {
                      if (obj.scrollTop !== 0 && obj.scrollTop) {
                          scrollTop = obj.scrollTop;
                          if (scrollNotIncluded) {
                              offsetTop -= obj.scrollTop;
                          }
                      } else if (obj.scrollLeft !== 0 && obj.scrollLeft) {
                          scrollLeft = obj.scrollLeft;
                          if (scrollNotIncluded) {
                              offsetLeft -= obj.scrollLeft;
                          }
                      }
                  } else if (browser.isOpera) {
                      if (obj.scrollTop !== 0 && obj.scrollTop != obj.offsetTop) {
                          if (scrollNotIncluded) {
                              offsetTop -= obj.scrollTop;
                          }
                          scrollTop = obj.scrollTop;
                      } else if (obj.scrollLeft !== 0 && obj.scrollLeft != obj.offsetLeft) {
                          scrollLeft = obj.scrollLeft;
                          if (scrollNotIncluded) {
                              offsetLeft -= obj.scrollLeft;
                          }
                      }
                  }
  
                  // scrollOffset calculation did not take care of the stopAbsolute
                  objPositionCss = aria.utils.Dom.getStyle(obj, "position");
                  if (i > 0 && objPositionCss == "absolute") {
                      break;
                  }
  
                  i++;
                  obj = obj.parentNode;
              }
  
              var position = {
                  top : Math.round(offsetTop),
                  left : Math.round(offsetLeft),
                  scrollTop : scrollTop,
                  scrollLeft : scrollLeft
              };
  
              return position;
          }