diff --git a/www/resources/script.js b/www/resources/script.js
index 1d1fa03b4a29732aedf3280fbfbbaed46e2c1ab8..3adf1b1f88e7573cc37c8dad40769a5e5fac264b 100644
--- a/www/resources/script.js
+++ b/www/resources/script.js
@@ -9,3 +9,33 @@ function SimpleSAML_focus(id) {
     element.focus();
   }
 }
+
+
+/**
+ * Show the given DOM element.
+ *
+ * @param id  The id of the element which should be shown.
+ */
+function SimpleSAML_show(id) {
+  element = document.getElementById(id);
+  if (element == null) {
+    return;
+  }
+
+  element.style.display = 'block';
+}
+
+
+/**
+ * Hide the given DOM element.
+ *
+ * @param id  The id of the element which should be hidden.
+ */
+function SimpleSAML_hide(id) {
+  element = document.getElementById(id);
+  if (element == null) {
+    return;
+  }
+
+  element.style.display = 'none';
+}