[bug973112] - Moved error tracker to a separate file, change 'onerror' to 'eventListener'

[bug973112] - Modified eventListener

[bug973112] - Added 'window.jsErrorDetected = true;' back