only call scrollIntoViewIfNeeded if the browser has it.  It's a nonstandard method that is not likely to make it into any web standard anytime soon (though its functionality might through another mechanism).