approccio sbagliato. js non e' un genio. come fa a capire che tu vuoi tutti gli input con id della forma qta["qualche numero"]? un diverso aproccio alla questione e' il seguente:

var tuoFrom = document.getElementById("nomeTuoForm");
var in = tuoForm.getElementsByTagName('INPUT');
if (in.length) {
for (var i=0;i<in.length;i++) {
if (in[i].value == "") alert('errore');
}
}