<script language="javascript">
//GLOBAL Var.
var maxIndex= 5; //Put the # of form fields (takes in mind it starts numbering with the 0)
///////////////////////////////////////
function Sumatory (f, numFields) {
///////////////////////////////////////
var sumatory= 0;
for (k=0; k < numFields; k++) {
theValue= f.dd[k].value;
if (!(isNaN(theValue))) {
sumatory+= parseInt(theValue);
}
}
//return (sumatory);
document.getElementById('visor').innerHTML= sumatory;
}
</script>