<?php function check(form,name,checked){for(var i=0; i<form[name].length; i++) form[name][i].checked=checked;} ?>