function calcvols(form) {  
	var length = parseFloat(form.length.value);  
	var width = parseFloat(form.width.value);  
	var depth1 = parseFloat(form.depth1.value);  
	var depth2 = parseFloat(form.depth2.value);  
	form.vol.value = parseInt(((depth1+depth2)/2)*length*width);
	form.galvol.value = Math.round(form.vol.value*264.17/100)*100;
	
	document.cookie="volumem3="+form.vol.value;
	document.cookie="volumegal="+form.galvol.value;
}

function calcvolr(form) {  
	var diam = parseFloat(form.length.value);
	var depth1 = parseFloat(form.depth1.value);
	var depth2 = parseFloat(form.depth2.value);
	var avdepth = (depth1+depth2)/2;
	var radius = (diam/2);
	form.vol.value = parseInt(radius*radius*avdepth*Math.PI);
	form.galvol.value = Math.round(form.vol.value*264.17/100)*100;
	
	document.cookie="volumem3="+form.vol.value;
	document.cookie="volumegal="+form.galvol.value;
}

function calcvolo(form) {  
	var length = parseFloat(form.length.value/2);
	var width = parseFloat(form.width.value/2);
	var depth1 = parseFloat(form.depth1.value);
	var depth2 = parseFloat(form.depth2.value);
	form.vol.value = parseInt(((depth1+depth2)/2)*length*width*Math.PI);
	form.galvol.value = Math.round(form.vol.value*264.17/100)*100;
	
	document.cookie="volumem3="+form.vol.value;
	document.cookie="volumegal="+form.galvol.value;
}
