I would like to have someone to help me out with my program.Users are able to add items if they wish for the Monthly Claims Charges System.I did not manage to do the calculation part of the program.Could someone help me?

Here is the program:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Monthly claims Charges</title>
<script language="javascript">
function dosum()
{
var i = 0;
while(i < document.temps.item1.length){
document.temps.total1.value += parseFloat(document.temps.item1[i].value);
window.alert("The number entered is: " + document.temps.item1[i].value);
return parseFloat(document.temps.total1.value);
i++;}
}
var nextSubject = new Array(100) ;
var counter = 1 ;
function addRow(){
var tbody = document.getElementById("table1").getElementsByTag Name("tbody")[0];
if (!tbody.crow){
var rows=tbody.getElementsByTagName('TR');
tbody.crow=rows[rows.length-1];
}
var nrow=tbody.crow.cloneNode(true);
var eles=nrow.getElementsByTagName('*');
for (var zxc0=0;zxc0<eles.length;zxc0++){
if (eles[zxc0].name){ eles[zxc0].name=eles[zxc0].name.replace('0',counter); }
if (eles[zxc0].id){ eles[zxc0].id=eles[zxc0].id.replace('0',counter); }
if (eles[zxc0].tagName=='INPUT'){ eles[zxc0].value=''+eles[zxc0].value; } // change to eles[zxc0].value='' when ready
if (eles[zxc0].tagName=='SELECT'){ eles[zxc0].selectedIndex=0; }
}
counter++;
tbody.appendChild(nrow);
}
var nextSubjectA = new Array(100) ;
var counterA = 1 ;
function addRowA(){
var tbody = document.getElementById("table2").getElementsByTag Name("tbody")[0];
if (!tbody.crow){
var rows=tbody.getElementsByTagName('TR');
tbody.crow=rows[rows.length-1];
}
var nrow=tbody.crow.cloneNode(true);
var eles=nrow.getElementsByTagName('*');
for (var zxc0=0;zxc0<eles.length;zxc0++){
if (eles[zxc0].name){ eles[zxc0].name=eles[zxc0].name.replace('0',counterA); }
if (eles[zxc0].id){ eles[zxc0].id=eles[zxc0].id.replace('0',counterA); }
if (eles[zxc0].tagName=='INPUT'){ eles[zxc0].value=''+eles[zxc0].name; } // change to eles[zxc0].value='' when ready
if (eles[zxc0].tagName=='SELECT'){ eles[zxc0].selectedIndex=0; }
}
counterA++;
tbody.appendChild(nrow);
}
</script>
</head>
<body>
<form NAME="temps">
<P align=center><STRONG>YTL E-SOLUTIONS BERHAD- Monthly claim
Charges</STRONG></P>
<P align=center>MONTH: __________________</P>
<P align=center>NAME:________________________________ __________</P>
<table border="0" align="center" width = "80%" id="table1" bgcolor="#99cc99">
<tr>
<td><STRONG>ITEMS</STRONG></td>
<td>
<P align=left><STRONG>PAGE REF.</STRONG></P></td>
<td>
<P align=center><STRONG> RM</STRONG></P></td>
</tr>
<tr >
<td><STRONG>1) PETROL,PARKING
& TRAVELLING &nbs p;</STRONG></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Petrol / Mileage Claims</td>
<td><INPUT maxLength=10 size=10> </td>
<td>
<P align=right><INPUT maxLength=10 size=10 name="item1" onChange="dosum()" value="0"></P></td>
</tr>
<tr>
<td>Parking, Toll and Touch & Go (Top Up)</td>
<td><INPUT maxLength=10 size=10></td>
<td>
<P align=right><INPUT maxLength=10 size=10 name="item1" onChange="dosum()" value="0"></P></td>
</tr>
<tr>
<td>Taxi Fare, Air Fare, Bus Fare and etc</td>
<td><INPUT maxLength=10 size=10></td>
<td>
<P align=right><INPUT maxLength=10 size=10 name="item1" onChange="dosum()" value="0"></P></td>
</tr>
<tr>
<td>
<INPUT maxLength=30 size=30
name=" "
="32142">
</td>
<td><INPUT maxLength=10 size=10
name=""
="32144"></td>
<td>
<P align=right><INPUT maxLength=2 size=10
name="item1" onChange="dosum()" value="0"></P></td>
</tr></table>
<P align=left> &nb sp;
&n bsp; <INPUT onclick=addRow(); type=button value="Insert Row"> &nb sp;   ; & nbsp; &nb sp;   ; & nbsp; &nb sp;   ; & nbsp;
<TABLE align=center border=0 width = "80%">
<TR>
<TD>
<P
align=right> &n bsp; &nbs p; &n bsp; &nbs p; &n bsp; &nbs p; &n bsp; &nbs p; &n bsp; &nbs p; &n bsp; Total: <INPUT
maxLength=10 size=10 name ="total1" input></P>
</TD></TR></TABLE></P>
</form>
</body>
</html>