prova così
var tipo = document.formName.tipo;
for (var i=0; i<tipo.length; i++)
...