function TrackFocus()
{
  document.focusedElement = null;
  if(document.addEventListener)
  {
    document.addEventListener("focus", function(e)
    {
      document.focusedElement = e.target;
    }.bindAsEventListener(this), true);
  }
  document.observe("focusin", function(event) {
    document.focusedElement = event.srcElement;
  }.bindAsEventListener(this));
}
/* Track the focused element, and store it in document.focusedElement.. */
Track the focused element, and store it in document.focusedElement
Track the focused element and store it in document . focusedElement
function TrackFocus()
{
  document.focusedElement = null;
  if(document.addEventListener)
  {
    document.addEventListener("focus", function(e)
    {
      document.focusedElement = e.target;
    }.bindAsEventListener(this), true);
  }
  document.observe("focusin", function(event) {
    document.focusedElement = event.srcElement;
  }.bindAsEventListener(this));
}
function TrackFocus ( ) { document . focusedElement = null ; if ( document . addEventListener ) { document . addEventListener ( "focus" , function ( e ) { document . focusedElement = e . target ; } . bindAsEventListener ( this ) , true ) ; } document . observe ( "focusin" , function ( event ) { document . focusedElement = event . srcElement ; } . bindAsEventListener ( this ) ) ; }
Track the focused element, and store it in document.focusedElement..
Track the focused element and store it in document . focusedElement ..