Al igual que obtienes el valor de sus casillas puedes agregarles el valor existen muchas formas esta es la que usas tu:
document.formulario.nombre_entrada.
value = ponerlo en cero
en tu codigo es:
document.sumar2.totalsiniva2.value=0;
espero que esta sea la solución que buscas, también modifique cuando no exista en la casilla no me mande un valor nulo. Suerte.
Código HTML:
Ver original<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<script type="text/javascript"> function Suma(isChecked, valor){
x=0;
if (isChecked) {
if(document.sumar2.totalsiniva2.value=="")
x=0;
else
x=document.sumar2.totalsiniva2.value;
siniva2 = (parseFloat(x)+ parseFloat(valor)).toFixed(2);
} else {
siniva2 = (parseFloat(document.sumar2.totalsiniva2.value) - parseFloat(valor)).toFixed(2);
}
var1= document.sumar2.totalsiniva2.value = siniva2;
var2= document.sumar2.total2.value = siniva2;
}
//almaceno el valor original en una variable para saber qué tenía antes.
var valor_viejo = 0;
function SumaSelect(valor){
siniva2 = (parseFloat(document.sumar2.totalsiniva2.value) + parseFloat(valor) - valor_viejo).toFixed(2);
document.sumar2.totalsiniva2.value = siniva2;
document.sumar2.total2.value = siniva2;
valor_viejo = valor;
}
function limpia(){
document.sumar2.totalsiniva2.value=0;
}
<form name="sumar2" method="post" id="sumar2"> <label for="FOR">Pack
</label> <select name="NAME" id="ID" onchange="SumaSelect(this.value)"> <option selected="selected" value="0"> Selecciona un Pack
Pack Uno 10€
Pack Dos 20€
Super Pack U
<input type="checkbox" value="1.00" id="Prod2" name="Prod2" onclick="Suma(this.checked,this.value)">1.00
€ Super Pack D
<input type="checkbox" value="2.00" id="Prod3" name="Prod3" onclick="Suma(this.checked,this.value)">2.00
€ Super Pack T
<input type="checkbox" value="3.00" id="Prod4" name="Prod4" onclick="Suma(this.checked,this.value)">3.00
€ Super Pack C
<input type="checkbox" value="4.00" id="Prod5" name="Prod5" onclick="Suma(this.checked,this.value)">4.00
€ Super Pack C
<input type="checkbox" value="5.00" id="Prod6" name="Prod6" onclick="Suma(this.checked,this.value)">5.00
€ </p><input type="hidden" value="" id="totalsiniva2" name="totalsiniva2"> <b><font color="#999999">Total
</font></b> <input name="total2" type="text" disabled id="total2" value=""> €
<input type="reset" value="limpiar campos" onclick="limpia();">