/**
 * Set focus to the element with the given id.
 *
 * @param id  The id of the element which should receive focus.
 */
function SimpleSAML_focus(id) {
  element = document.getElementById(id);
  if(element != null) {
    element.focus();
  }
}

@@ -239,8 +239,516 @@
 ;%0A  %7D%0A%7D%0A
+%0A%0A/**%0A * Show the given DOM element.%0A *%0A * @param id  The id of the element which should be shown.%0A */%0Afunction SimpleSAML_show(id) %7B%0A  element = document.getElementById(id);%0A  if (element == null) %7B%0A    return;%0A  %7D%0A%0A  element.style.display = 'block';%0A%7D%0A%0A%0A/**%0A * Hide the given DOM element.%0A *%0A * @param id  The id of the element which should be hidden.%0A */%0Afunction SimpleSAML_hide(id) %7B%0A  element = document.getElementById(id);%0A  if (element == null) %7B%0A    return;%0A  %7D%0A%0A  element.style.display = 'none';%0A%7D%0A

Add show and hide functions.