Como acumular valor em JavaScript (+= em JAVA) [RESOLVIDO]

[color=darkblue] Tenho uma tabela em JavaScript que uso uma function para popular:[/color]


function add() {
   var myRow = document.all.tblListas.insertRow();
   var myCell = myRow.insertCell();
   myCell.innerText = getElm('codigo').value; 
   var myCell1 = myRow.insertCell();
   myCell1.innerText = getElm('valor').value;

  //Aqui quero acumular o valor
  // total_int = total_int + getElm('vlrBkg1').value;
} 

[color=darkblue] Como faço para acumular o valor e imprimir em um Text ?

[/color]

<input type="text" id="total_int" value="0,00" readonly="readonly" class="input" style="width:80px;text-align:right;"/>

[color=darkblue] Desde já agradeço ![/color]

Segue um exemplo simples de como fazer.

[]'s

<html>
<head>

	<script>

		var total = Number(0);

		function acumula(valor) {
			total += Number(valor);
			alert(Number(valor));
		}

		function teste(objectId) {
			acumula(V(objectId));
			alert("Total = "+total);
		}

		function $(id) {
			return document.getElementById(id);
		}
	
		function V(id) {
			return $(id).value;
		}
	</script>
</head>
<body>
	<form>
		<input type="text" id="txt">&nbsp;<input type="button" value="teste" onclick="javascript:teste('txt');">
	</form>
</body>
</html>