function getWindow(element) {
    var ownerDocument = element.ownerDocument;
    return ownerDocument ? ownerDocument.defaultView : window;
  }
Get the window associated with the element
@argument {Element} element
@returns {Window}