Getting the element that has the focus via JavaScript
This is one of those things that you only need on very specific occasions. I needed to get the element that has the focus on a page. Went to Google and found the answer somewhere deep into a forumthread. So for future reference here goes:
Internet Explorer supports the document.