var checked = chkBtn.checked;
var c = document.getElementsByName('action');
for (var i = 0; i < c.length; i++) {
if (c[i].type == 'checkbox' && c[i].checked != checked) {
var checked = chkBtn.checked;
var c = document.getElementsByName('action');
for (var i = 0; i < c.length; i++) {
if (c[i].type == 'checkbox' && c[i].checked != checked) {