function findTotal(id){
var arr112 = document.getElementsByName('amount');
var tot = 0;
for(var j=0;j<arr112.length;j++){
if(parseInt(arr112[j].value))
tot += parseInt(arr112[j].value);
console.log("a="+arr112);
}
console.log("arr112="+arr112);
console.log("tot="+tot);
document.getElementById('total').value = tot;
}