Fix PHP notice - $use_js was removed from the core in revision 13713
[squirrelmail.git] / templates / util_addressbook.php
index 5ff5f42..8b582c0 100644 (file)
@@ -4,7 +4,7 @@
  *
  * Functions to make working with address books easier
  * 
- * @copyright © 1999-2007 The SquirrelMail Project Team
+ * @copyright © 1999-2009 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
@@ -123,6 +123,16 @@ function insert_javascript() {
         }
     }
 
+    function CheckAll(ch) {
+        var chkObj = "";
+        for (var i = 0; i < document.addressbook.elements.length; i++) {
+            chkObj = document.addressbook.elements[i];
+            if (chkObj.type == "checkbox" && chkObj.name.substr(0,16) == "send_to_search[" + ch) {
+                chkObj.checked = !(chkObj.checked);
+            }
+        }
+    }
+
 // --></script>
 <?php
 } /* End of included JavaScript */