Ok, so is there a way of knowing what the visible offset on the screen is. That is not the offset X or top position relative to the parent element or to the top of the page, but the offset to the top of the visible screen area, to gain some idea of whether the element has gone off the top or bottom of the visible area, to know when best to use scrollIntoView().
Basically I don't want to scroll the current element to the top of the display if its in the middle - it just looks wrong. I only needed it to scroll when the element has gone out of view.