var usewgt;
var last;
var nlast;

//     *************************oxolonic acid bath****************
function oxgc(g,l,dose,oxy,oxa)
{
l=parseFloat(g)*3.785;
x=l.toFixed(3);
if (isNaN(x)) {x=0;}
document.forms.ox.oxl.value=x;

if (last!=1) {
	nlast=last;
	last=1;}

	// amount oxy
	y=(l*25)/39.4;
	x=y.toFixed(2);
	if (isNaN(x)) {x=0;}
	document.forms.ox.oxoxy.value=x;
	// amount oxa
	y=(l*25)/1000;
	x=y.toFixed(3);
	if (isNaN(x)) {x=0;}
	document.forms.ox.oxoxa.value=x;
}
function oxlc(g,l,dose,oxy,oxa)
{
g=parseFloat(l)/3.785;
x=g.toFixed(3);
if (isNaN(x)) {x=0;}
document.forms.ox.oxg.value=x;
if (last!=1) {
	nlast=last;
	last=1;}

	// amount oxy
	y=(l*25)/39.4;
	x=y.toFixed(2);
	if (isNaN(x)) {x=0;}
	document.forms.ox.oxoxy.value=x;
	// amount oxa
	y=(l*25)/1000;
	x=y.toFixed(3);
	if (isNaN(x)) {x=0;}
	document.forms.ox.oxoxa.value=x;
}
