FIX FOR IE7: Ie7 will throw an error whenever you click on any of the UI buttons because IE has an (of course) non-standard implementation of the event.target attribute. IE instead uses event.srcElement, but it can't even check for event.target being undefined because passing in events is borked too -- so we have to take the event from the window and overwrite the function event for IE, then check for it to be undefined. The behavior is unchanged for standards compliant browsers