<input name="ch" type="checkbox" value="1" id="ch1"><input name="ch" type="checkbox" value="2" id="ch2"><input name="ch" type="checkbox" value="3" id="ch3">document.all ("ch" + i)....
document.all ("ch" + i)....