para acumular dentro de un Array como le hago ... aca les dejo un ejemplo de lo que quiero hacer y no se como
Osea tengo este programa ( hecho por mi )
que supuestamente deja ingresar 1 a 23 choferes... pueden ingresar varias veces cada uno
tengo que registrar cada vez que entran el Numero de chofer, Asientos que ocupo y la Recaudacion...
Se tienen que poder sumar los datos de un mismo chofer dentro de el vector...
pero no lo logro que acumule ... ayuda por favor

<html>
<head>
<title>chofer DALE QUE TODAVIA NO VA</title>
</head>
<body BGCOLOR='#000000'> <table align="center" cellspacing="10" cellpadding="10" border="3" BGCOLOR='#fffff'>
<tr>
<td><h1 align ="center"><strong><b><font face="New Time Roman" size="40" color="#000000">Control De Choferes</font></b></h1></strong>
<form name=fmrchofer>
<align="letf">Nº D choferes:<input type=text name="txtchofer" size="40" maxlength="1000"><br></p>
<align="left">A s i e n t o s :<input type=text name="txtocup" size="40" maxlength="1000"><br><br>
<align="left">Recaudacion :<input type=text name="txtrec" size="40" maxlength="1000"><br><br>
<input type="button" value="cargar" onClick= cargar()>
<input type="button" value="informar" onClick= informar()><br></td>
</tr>
</form>
<script>
var I =Array(23)
var G =Array(23)
maxa=0
maxrec=0
max=0
maxchof=0
x=0
maxa= parseInt(maxa)
maxrec= parseInt(maxrec)
max= parseInt(max)
maxchof= parseInt(maxchof)
x= parseInt(x)
document.fmrchofer.txtocup.value= parseInt (0) // ver esto que no se si esta bien
document.fmrchofer.txtrec.value= parseInt (0)
function cargar()
{
I[document.fmrchofer.txtchofer.value] = document.fmrchofer.txtocup.value
G[document.fmrchofer.txtchofer.value] = document.fmrchofer.txtrec.value
maxrec=document.fmrchofer.txtrec.value
maxchof=document.fmrchofer.txtocup.value
}
function informar()
{
for(x=1; x<23;x++)
{
if(I[x] > max)
{
max=I[x]
maxchof = x
}
if (G[x] > maxa)
{
maxa=G[x]
maxrec= x
}
}
alert("el chofer que mas asientos ocupo es el nº:"+maxchof)
alert("el chofer de mayor recaudacion es el nº:"+maxrec)
}
</script>
</body>
</html>