The Browser Object Model
Scroll Position
More useful BOM values that we can retrieve are those that give us the current scroll position of the web page within the browser. Again the way that the different browsers provide us with this information is different for the different browsers and again it is Internet Explorer that is the odd one out.
Here are a couple of functions that will allow us to retrieve the coordinates from whichever fields the browser stores the values in.
function scrollY() {return window.pageYOffset ? window.pageYOffset : document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;}
Scrolling the current page to specific coordinates is much easier than it is to retrieve the coordinates of the current scroll position and all browsers do provide the same BOM method for performing this task.

