<script type="text/javascript">
var lat="<?php echo $check; ?>";
var lastSizeVal = 0;
var lastquitionVal = 0;
var lastShapeVal = 0;
function calculate(input) {
var total = parseInt(burgz.total_price.value);
var value = parseInt(input.value);
if (input.type === 'radio') {
if (input.id === lat) {
total -= lastSizeVal;
lastSizeVal = value;
}/*else if(input.id === 'ans2'){
total -= lastquitionVal;
lastquitionVal = value;
}
else {
total -= lastShapeVal;
lastShapeVal = value;
}*/
}
if (input.checked)
burgz.total_price.value = total + value
else
burgz.total_price.value = total - value;
}
</script>