Ho trovato l'errore... ora lo script funziona correttamente.
Allego il codice nel caso possa essere d'aiuto a qualcuno 
Codice PHP:
<script>
var numRighe=1;
function accoda(){
if(document.createElement && document.getElementById && document.getElementsByTagName) {
// crea elementi
var oTr=document.createElement("TR");
var oTd1=document.createElement("TD");
var oTd2=document.createElement("TD");
var oTd3=document.createElement("TD");
var oTd4=document.createElement("TD");
var oTd5=document.createElement("TD");
var oField1=document.createElement("SELECT");
var oField2=document.createElement("INPUT");
var oField3=document.createElement("INPUT");
var oField4=document.createElement("INPUT");
var oField5=document.createElement("INPUT");
// setta attributi
oField1.setAttribute("name","descrProdotto"+numRighe);
oField1.setAttribute("id","select2");
<%
for ( int i=0;i<prodotti.size();i++) {%>
<%it.eni.registrifiscali.registri.bo.ProdottiBO prova=(ProdottiBO)prodotti.get(i);%>
var oField=document.createElement("option");
var testo=document.createTextNode("<%=prova.getDescrProdotto()%>");
oField.appendChild(testo);
oField.setAttribute("name","lista");
oField.setAttribute("value",testo);
oField.setAttribute("id","option");
oField1.appendChild(oField);
<%}%>
oField2.setAttribute("type","text"+numRighe);
oField2.setAttribute("id","elemento"+numRighe);
oField3.setAttribute("type","text"+numRighe);
oField3.setAttribute("id","elemento"+numRighe);
oField4.setAttribute("type","text"+numRighe);
oField4.setAttribute("id","elemento1"+numRighe);
oField4.setAttribute("name","kg"+numRighe);
oField4.setAttribute("value",0);
oField5.setAttribute("type","text"+numRighe);
oField5.setAttribute("id","elemento"+numRighe);
//associo al campo di teso l'evento onblur
if(oField4.attachEvent) oField4.attachEvent("onblur",function(){mod2(oField4.value);})
else if(oField4.addEventListener) oField4.addEventListener("blur",function(){mod2(oField4.value);},false);
// appendi al relativo padre
oTd1.appendChild(oField1);
oTd2.appendChild(oField2);
oTd3.appendChild(oField3);
oTd4.appendChild(oField4);
oTd5.appendChild(oField5);
//appendo le colonne alla riga
oTr.appendChild(oTd1);
oTr.appendChild(oTd2);
oTr.appendChild(oTd3);
oTr.appendChild(oTd4);
oTr.appendChild(oTd5);
document.getElementById('tab3.3').getElementsByTagName('TBODY')[0].appendChild(oTr);
numRighe++;
}
}
function mod2(e){
var d=document.getElementById('select2').selectedIndex;
alert(d);
if((document.getElementById('select2').selectedIndex)==0){
document.getElementById('smaltimentoOl').value=e;
Calcola();
}
if((document.getElementById('select2').selectedIndex)==1){
document.getElementById('smaltimentoProdch').value=e;
Calcola();
}
if((document.getElementById('select2').selectedIndex)==2){
document.getElementById('smaltimentoAcido_solf').value=e;
Calcola();}
if((document.getElementById('select2').selectedIndex)==3){
document.getElementById('smaltimentoAddol').value=e;
Calcola();}
if((document.getElementById('select2').selectedIndex)==4){
document.getElementById('smaltimentoMixAlchilbenz').value=e;
Calcola();}
if((document.getElementById('select2').value)==5){
document.getElementById('smaltimentoOlRigen').value=e;
Calcola();}
}