Added sample. Enhanced scroll monitor to operate on an element rather than window, and ehanced with error checking.