potresti ulizzare:

i = 1;
check = document.getElementById("attiva_" + i);
if(check.checked)..........