LDAPAccountManager/lam/templates/3rdParty/pla/htdocs/js/CheckAll.js

23 lines
545 B
JavaScript
Raw Normal View History

2014-07-15 18:21:39 +00:00
function CheckAll(setbgcolor,form,index) {
htmlform = document.getElementById(form+index);
for (var i=0;i<htmlform.elements.length;i++) {
var e = htmlform.elements[i];
if (e.type == 'checkbox' && e.name != 'allbox') {
e.checked = htmlform.allbox.checked;
if (!document.layers && setbgcolor) {
var tr = document.getElementById('tr_'+e.id);
if (e.checked) {
tr.style.backgroundColor='#DDDDFF';
} else {
var id = e.id.substr(3);
tr.style.backgroundColor= id%2 ? '#E0E0E0' : '#F0F0F0';
}
}
}
}
}