qui

a sort of DOM-specific array that holds nodes
Una NodeList non ha le stesse proprietà/metodi di un array.





PS.
L'inizio dello script assomiglia + all'ostrogoto
che a js scusa ma non ti basta un semplice
Codice PHP:
var tmp= [];
var 
targetdocument.getElementById('variante_righe');
var 
inputListtarget.getElementsByTagName('input');
for(var 
i=0;i<inputList.length;i++){
    if(
inputList.item(i).type=='checkbox'){
        if(
inputList.item(i).checked==true){
            
tmp.push(inputList.item(i));
        }
    }

PPS nel codice ci possono essere errori perchè non lo testato