Código PHP:
<script language="javascript">
var precio=new Array(107.25,0,192.99,0,238.64,0,17.55,0,34.71,0,64.87,0,86.97,0,18.81,0,48.02,0,36.58,0,35.88,0,24.51,0,5.72,0,16.25,0,263.90,0,333.07,0,96.55,0,157.05,0,66.56,0,170.79);
var total=new Array(0);
function calcula(){
for(i=1;i<40;i++){
var elemento=document.elformu.elements[i];
var nombre = elemento.name;
if(nombre.charAt(0)=="t"){
//alert(precio[i]);
document.elformu.elements[i].value=eval(document.elformu.elements[i-1].value*precio[i-1]);
total[0]=total[0]+document.elformu.elements[i].value
}//fin if
}//fin for
document.elformu.elements[41].value=total[0];
}//fin funcion
</script>
lo tengo publicado en http://www.myjavaserver.com/~javcast...denador_p2.htm