<!--
var 
factors=[6.2898107704321,27.496156037386,28.377593258402,100000,1000000,1000,35.314666721489,61023.744094732,1,1000000000,1.3079506193144,100,270512.18161474,33814.022701843,35195.079727854,264.17205235815,219.96924829909,8453.5056754608,10,1000,1000000000,1000000,16230730.896885,113.510373033606000,2113.3764188652,1759.7539863927,1816.1659685377,1056.6882094326,879.87699319635,908.08298426886];
var gbrt=["barrel (petroleum) (bbl, bo)","bushel (UK) (bu)","bushel (US dry) (bu)","centiliter (cl)","cubic centimeter (cc, cm<sup>3</sup>)","cubic decimeter (dm<sup>3</sup>)","cubic foot (ft<sup>3</sup>, cu ft)","cubic inch (in<sup>3</sup>, cu in) ","cubic meter (m<sup>3</sup>)","cubic millimeter (mm<sup>3</sup>)","cubic yard (yd<sup>3</sup>)","dekaliter (dal)","fluid dram (fl dr)","fluid ounce (fl oz)","fluid ounce (UK) (fl oz)","gallon (liquid) (gal)","gallon (UK) (gal)","gill (gi)","hectoliter (hl)","liter (l)","microliter (µl)","milliliter (ml)","minim (min)","peck (US dry) (pk)","pint (liquid) (pt)","pint (UK) (pt)","pint (US dry) (pt)","quart (liquid) (qt)","quart (UK) (qt)","quart (US dry) (qt)"];
function fix(v){
//Copyright 2003 Unit-conversion.info
if (!isFinite(v)) return "";
if (v==0) return "0";
st=""+v;
epos=st.indexOf('E');
if (epos==-1) epos=st.indexOf('e');
sdigi=Math.log(Math.abs(v)) / Math.LN10;
sdigif=Math.floor(sdigi);
if (epos==-1){
adjust=Math.pow(10, sdigif-12);
faqs=Math.round(v/adjust);
norst=""+faqs;
if (sdigif<12){
adjust2=Math.pow(10, 12-sdigif);
return (faqs / adjust2);}
else return (faqs*adjust);}
else {
zo=v*Math.pow(10, 12-sdigif);
szo=String(Math.round(zo));
inse=-1;
if (szo.charAt(0)=='-') inse=2;
else inse=1;
rest=szo.substring(inse,szo.length);
i=rest.length-1;
while (i>=0 && rest.charAt(i)=='0')
i--;
rest=rest.substring(0,i+1);
rou=szo.substring(0,inse);
if (rest.length>0) rou += "."+rest;
if (sdigif<0) sa=rou+"E";
else sa=rou+"E+";
snow=sa+sdigif;
vanow=Math.abs(parseFloat(snow));
faqsvab=Math.abs(v);
if (sdigif>=0){
if (vanow>5*faqsvab)
snow=sa+String(sdigif-1);
else if (vanow<faqsvab/5)
snow=sa+String(sdigif+1);}
else if (sdigif>=0){
if (vanow>5*faqsvab)
snow=sa+String(sdigif+1);
else if (vanow<faqsvab/5)
snow=sa+String(sdigif-1);}
vanow=parseFloat(snow);
if (vanow>1.1*v || vanow<0.9*v) return v;
else return snow;}}

function convert()
{
//Copyright 2003 Unit-conversion.info
isNS4=(document.layers) ? true : false;
isIE4=(document.all && !document.getElementById) ? true : false;
isIE5=(document.all && document.getElementById) ? true : false;
isNS6=(!document.all && document.getElementById) ? true : false;
myform=document.forms['cform'];
w1=myform.D1.options[myform.D1.selectedIndex].value;
w2=myform.D2.options[myform.D2.selectedIndex].value;
faqsorg=factors[w2]/factors[w1];
resfaqs=myform.T1.value*faqsorg;
if (isIE5 || isNS6){
elm=document.getElementById("N1");
elm2=document.getElementById("N2");
elm.innerHTML=gbrt[w1];
elm2.innerHTML=gbrt[w2];}
if (isNaN(parseFloat(resfaqs)))
myform.T2.value="";
else
{myform.T2.value=fix(parseFloat(resfaqs))+" ";}}
// -->

