resdiv is a text box, you should use "value" property to set some value in it. use the following:
function addthis(tid, val1) {
if (tid.checked) {
document.getElementById("resdiv").value = parseInt(document.getElementById("resdiv").value) + parseInt(val1);
}
else {
document.getElementById("resdiv").value = parseInt(document.getElementById("resdiv").value) - parseInt(val1);
}
}