Nah, the flaw definitely is not in the getElementById, unfortunately.
Let me show you an example. This is on vB:
Link has been removed
Scroll to get to see the bunch of alerts with the requested values. The first value is the window.pageYOffset (not ID-related, flexible value), the second is using the offsetTop (ID-related, fixed value). In every browser but IE you see two values of numbers above 0. In Internet Explorer either only one or none show up (undefined/0).
This is the exact same code but outside of vB, and you will see it all works fine:
Link has been removed