/***************************************************
* www.netlobo.com
* Checkbox checking/unchecking/inverting functions
*
* Pass the id of the form into the function and
* all the checkboxes in that form will be
* checked/unchecked/inverted.
*
* This example checks all the checkboxes in the
* form with the id 'survey':
*   checkAll('survey');
**************************************************/
function checkAll(id){
	var f = document.getElementById(id);
	var inputs = f.getElementsByTagName("input");
	for(var t = 0;t < inputs.length;t++){
		if(inputs[t].type == "checkbox")
			inputs[t].checked = true;
	}
}
function uncheckAll(id){
	var f = document.getElementById(id);
	var inputs = f.getElementsByTagName("input");
	for(var t = 0;t < inputs.length;t++){
		if(inputs[t].type == "checkbox")
			inputs[t].checked = false;
	}
}
function invertAll(id){
	var f = document.getElementById(id);
	var inputs = f.getElementsByTagName("input");
	for(var t = 0;t < inputs.length;t++){
		if(inputs[t].type == "checkbox")
			inputs[t].checked = !inputs[t].checked;
	}
}