Extend an event in javascript

By Anatoly Mironov