Fixed IE9 compatibility issues.

In IE onKeyPress variable "event" is undefined. window.event is where event is located. And in IE instead of event.target event.srcElement should be used.