Fixed checking xmlHttpRequest status on readyState != 4.
Finally properly fixed getMouseButton

+ onMouseDrag now only captures mouseUp on the element to which it is bound (fix for IE).