// 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.name.substr(0,obj.name.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('You may only choose ' + max + ' '+box.substr(0,box.length-1) +' to compare.\nTo pick this option unselect one of the others.');}}
