using document.createEventObject for IE8 support