Calculating form help

i saw this script on here, i was wondering can i add checkboxes and radio buttons with value on this and make it calulate?


<html>
<head>
<title>You should give your pages titles!</title>
<script type="text/javascript" language="javascript">
<!--
function calcVals(){
//set form to document.form1 so we don't have to type it 100 times
form = document.form1;
//get the fields
val = form.textfield;
val1 = form.textfield1;
val2 = form.textfield2;
//get the title value and muliply times the field value
val = parseFloat(val.title * val.value);
val1 = parseFloat(val1.title * val1.value);
val2 = parseFloat(val2.title * val2.value);
//add all the fields up
total = val + val1 + val2;
//if there's a problem inform the user
if (String(total) != 'NaN') {
form.valTotal.value = total;
} else {
form.valTotal.value = 'ERROR';
}
}
-->
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="" >
$0.12<input type="text" value="0" name="textfield1" title=".12" onkeyup="calcVals()"/><br/>
$5.00<input type="text" value="0" name="textfield2"title="5.00" onkeyup="calcVals()"/><br/>>
<a href="#" >Total</a>
<input type="text" readonly="" name="valTotal" id="valTotal" value="$0"/>
</form>
</body>
</html>

any help would be awsome!!
Thanks