Added additional check so that scrollbar continue to be shown if mouse is down
Optimized the code to trap document level mouse up