<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<script>
function Recalc(chk) {
var fld = document.getElementById('field');
var i = parseFloat(fld.value);
if (isNaN(i)) i = 0;
if (chk.checked)
fld.value = i+parseFloat(chk.value);
else
fld.value = i-parseFloat(chk.value);
}
</script>
</head>
<body>
<input type="checkbox"value="2000" onclick="Recalc(this)"/><br />
<input type="text" id="field" value="0"/>
</body>
</html>