/**
 *
 *
 * @author Richard Bloem (richard.bloem@goelz.com)
 */

/*
 *  wird benoetigt um die nicht fortlaufenden ids zu speichern:
 */ 
var items = new Array();

/*
 * Function zum setzten aller Checkboxen, beim setzen der "check all" Checkbox
 *
 * @param groupId
 * @param id
 */
 function checkAll (groupId, id) {
     checkAllBox = document.getElementById (id);
	 if (checkAllBox.checked) { 
		boxes = document.getElementsByName("tx_feusersadministration_pi1[list]["+groupId+"][users][]");  
		for (box=0; box < boxes.length; box++ ) { 
			boxes[box].checked = true; 
		}		
	 } else {
		boxes = document.getElementsByName("tx_feusersadministration_pi1[list]["+groupId+"][users][]"); 
		for (box=0; box < boxes.length; box++) { 
			boxes[box].checked = false;
		}	 
	}
 };
 
 /*
 * Function zum zuruecksetzen der "check all" Checkbox
 *
 * @param id
 */
 function uncheckCheckAllBox (id) {
     checkAllBox = document.getElementById (id);
	 checkAllBox.checked=false;
 };
 
  /*
 * Function zum sichtbarmachen des Panels id
 *
 * @param id
 */
 function showPanel (id) {
     for (i=0; i<items.length; i++) {
		panel = document.getElementById('bodygroup'+items[i]); 
		
		if (items[i] == id) {
		   panel.style.display = 'block';
		} else {
		   panel.style.display = 'none';		
		}
   }
 };



 
