Code

Added samba logon hours
[gosa.git] / html / include / focus.js
index 4a112e0fb7c8d3d908bfa9318a6de4fde4630940..3b86afac8bc4ad3cc8dbb8046340429787b84429 100644 (file)
@@ -15,6 +15,18 @@ for (iln = 0; iln < len; iln++){
 netscape= (ver.charAt(iln+1).toUpperCase() != "C");
 
 
+/* Toggle checkbox that matches regex */
+function chk_set_all(regex,value)
+{
+        for (var i = 0; i < document.mainform.elements.length; i++) {
+                var _id=document.mainform.elements[i].id;
+                if(_id.match(regex)) {
+                        document.getElementById(_id).checked= value;
+                }
+        }
+}
+
+
 function scrollDown() {
   document.body.scrollTop = document.body.scrollHeight - document.body.clientHeight;
   timeout= setTimeout("scrollDown()", 500);