// Limited Selection Checkbox Groups
// copyright Stephen Chapman, 26th July 2005
// you may copy this function provided that you retain the copyright notice
function boxchk(obj,max) {
	var box = obj.id.substr(0,obj.id.lastIndexOf('_')+1);
	var cnt=0,i=1;
	while(obj.form[box+i]){
		cnt += obj.form[box+i].checked;
		i++;
		}
	if (cnt > max) {
		obj.checked = false;
		alert('Only choose ' + max + ' '+box.substr(0,box.length-1) +' checkboxes.\nTo pick this option unselect one of the others.');}}