<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
</head>
<body>
<form id='input'>
<input type="checkbox" name="three" value="-3" /> -3
<input type="checkbox" name="eight" value="-8" /> -8
<input id="res" type="sumbit" />
</form>
<script type="text/javascript">
var input = document.getElementById('input');
var res = document.getElementById('res');
var sum = 0;
input.onclick = function(e) {
e = e || window.event;
var target = e.target || e.srcElement;
while(target != input) {
if (target.nodeName == 'INPUT') {
if(target.checked){
sum += parseInt(target.value);
res.value = sum;
return;
}
target = target.parentNode;
}
}
}
</script>
</body>
</html>
Думаю этого достаточно)