/*
 * Receives the tab forward event supplied from the previous window supplied.
 */
function receiveTabForwardEvent(theFromWindow, theEvent) {
  window.setTimeout("setFocusToFirstLink()", 10);
}

/*
 * Receives the tab backward event supplied from the previous window supplied.
 */
function receiveTabBackwardEvent(theFromWindow, theEvent) {
  window.setTimeout("setFocusToLoginLink()", 10);
}

/*
 * Sets focus to the first link.
 */
function setFocusToFirstLink() {
  window.focus();
  var firstLink = xGetElementById("firstLink");

  if (firstLink != null) {
    firstLink.focus();
  }
}

/*
 * Sets focus to the login link.
 */
function setFocusToLoginLink() {
  window.focus();
  var loginLink = xGetElementById("loginLink");

  if (loginLink != null) {
    loginLink.focus();
  }
}

/*
 * Initialize the page with registering hot keys and setting focus to 1st link.
 */
function initializePage() {
	setTimeout("setFocusToFirstLink()", 100);
}

/*
 * Cleanup the page with unregistering hot keys.
 */
function cleanupPage() {
}
