hasFocus and activeElement simulation

This is a demonstration of hasFocus and activeElement implementation before HTML5 comes out. 2 seconds after the document loads, an alert should appear, telling you what has focus, and what doesn't.

Test link
Test link (focusable, with tabIndex)