function accepting() { for(var k=0;k<id.length;k++) { document.getElementById("check"+id[k]).nextSibling.style.color='black'; } }