function checkUncheckAll(theElement, checkBoxName, elementCount) {

	var theForm = theElement.form, z = 0;
	var name = checkBoxName + z;
	for(z=0; z<elementCount; z++){
		
		name = checkBoxName + z;
		if(theForm[name].type == 'checkbox')
			theForm[name].checked = theElement.checked;
		
	}
}