if we have javascript available, use that to toggle more/less links. This is
[squirrelmail.git] / templates / default / js / default.js
index 4c7b9e890a18d56524f1529c575d6796f1341c6a..2c045a36cee40927268c903d03d28920bf239957 100644 (file)
@@ -289,3 +289,17 @@ function printThis()
     parent.frames['right'].focus();
     parent.frames['right'].print();
 }
+
+/* JS implementation of more/less links in To/CC. Could later be extended
+ * show/hide other interface items */
+function showhide (item, txtmore, txtless) {
+    var oTemp=document.getElementById("recpt_tail_" + item);
+    var oClick=document.getElementById("toggle_" + item);
+    if (oTemp.style.display=="inline") {
+        oTemp.style.display="none";
+        oClick.innerHTML=txtmore;
+    } else {
+        oTemp.style.display="inline";
+        oClick.innerHTML=txtless;
+    }
+}