<!-- Begin

function  doLinear() {

var conv = new Array(7);
 conv[1] = new Array(7);
 conv[2] = new Array(7);
 conv[3] = new Array(7);
 conv[4] = new Array(7);
 conv[5] = new Array(7);
 conv[6] = new Array(7);
 conv[7] = new Array(7);
 
conv[1][2] = "0.08333";// Inches to Feet
conv[1][3] = "0.0254";// Inches to Meters
conv[1][4] = "2.54";// Inches to Centimeters
conv[1][5] = "25.40";// Inches to Milimeters
conv[1][6] = "1000";// Inches to Mils
conv[1][7] = "25400";// Inches to Microns
conv[2][3] = "0.96";//Feet to Meters
conv[2][4] = "96";//Feet to Centimeters
conv[2][5] = "960";//Feet to Milimeters
conv[2][6] = "12000";//Feet Mils
conv[2][7] = "960000";//Feet to Microns
conv[3][4] = "100";//Meters to Centimeters
conv[3][5] = "1000";//Meters to Milimeters
conv[3][6] = "39370";//Meters to Mils
conv[3][7] = "1000000";//Meters to Microns
conv[4][5] = "10";//Centimeters to Milimeters
conv[4][6] = "393.70";//Centimeters to Mils
conv[4][7] = "10000";// Centimeters to Microns
conv[5][6] = "39.37";//Milimeters to Mils
conv[5][7] = "1000";//Milimeters to Microns
conv[6][7] = "25.39";//Mils  to Microns

 var unitsfrom=document.LinearForm.selectedfrom.selectedIndex;
 var unitsto=document.LinearForm.selectedto.selectedIndex;
 var inputval=document.LinearForm.inputvalue.value;
 var multiplier=0;	
 
 if (inputval == null) alert("Please enter an input value.");
 	if (unitsfrom == 0) alert("Please select an input conversion unit.");
 	if (unitsto == 0) alert("Please select an output conversion unit.");
 	if (unitsto == unitsfrom) multiplier=1.000;
 	if (unitsto < unitsfrom) multiplier=(1.000000/(conv[unitsto][unitsfrom]));
 	if (unitsto > unitsfrom) multiplier=(conv[unitsfrom][unitsto]);
 	
 	if ((unitsfrom != 0)&&(unitsto != 0))
 		var lresults = (inputval  * multiplier)
 		document.LinearForm.resultsf.value=( lresults );
 }

function  doMass() {
var conv = new Array(11); 
 conv[1] = new Array(11); 
 conv[2] = new Array(11); 
 conv[3] = new Array(11); 
 conv[4] = new Array(11); 
 conv[5] = new Array(11); 
 conv[6] = new Array(11); 
 conv[7] = new Array(11); 
 conv[8] = new Array(11); 
 conv[9] = new Array(11); 
 conv[10] = new Array(11); 
 conv[11] = new Array(11); 

conv[1][2] = "100";// Grams to Centigrams
conv[1][3] = "1000";// Grams to Miligrams
conv[1][4] = "0.035274";// Grams to Ounces
conv[1][5] = "0.002205";// Grams to Pounds
conv[1][6] = "0.001";// Grams to Kilograms
conv[1][7] = "5";// Grams to Carat
conv[1][8] = "15.43235";// Grams to Grains
conv[1][9] = "0.643";// Grams to Pennyweight
conv[1][10] = "0.03215";// Grams to Troy Ounce
conv[1][11] = "0.002679";// Grams to Troy Pound
conv[2][3] = "10";//Centigrams to Miligrams
conv[2][4] = "0.00035274";//Centigrams to Ounces
conv[2][5] = "0.00002205";//Centigrams to Pounds
conv[2][6] = "0.00001";//Centigrams Kilograms
conv[2][7] = "0.05";//Centigrams to Carat
conv[2][8] = "0.1543235";// Centigrams to Grains
conv[2][9] = "0.00643";// Centigrams to Pennyweight
conv[2][10] = "0.0003215";// Centigrams to Troy Ounce
conv[2][11] = "0.00002679";// Centigrams to Troy Pound
conv[3][4] = "0.000035274";//Miligrams to Ounces
conv[3][5] = "0.000002205";//Miligrams to Pounds
conv[3][6] = "0.000001";//Miligrams to Kilograms
conv[3][7] = "0.005";//Miligrams to Carat
conv[3][8] = "0.01543235";// Miligrams to Grains
conv[3][9] = "0.000643";// Miligrams to Pennyweight
conv[3][10] = "0.00003215";// Miligrams to Troy Ounce
conv[3][11] = "0.00002679";// Miligrams to Troy Pound
conv[4][5] = "0.0625";//Ounces to Pounds
conv[4][6] = "0.0283495";//Ounces to Kilograms
conv[4][7] = "141.7475";// Ounces to Carat
conv[4][8] = "437.5";// Ounces to Grains
conv[4][9] = "18.2292";// Ounces to Pennyweight
conv[4][10] = "0.911458";// Ounces to Troy Ounce
conv[4][11] = "0.0759548";// Ounces to Troy Pound
conv[5][6] = "0.453592";//Pounds to Kilograms
conv[5][7] = "2267.96";//Pounds to Carat
conv[5][8] = "7000";// Pounds to Grains
conv[5][9] = "291.667";// Pounds to Pennyweight
conv[5][10] = "14.583";// Pounds to Troy Ounce
conv[5][11] = "1.2153";// Pounds to Troy Pound
conv[6][6] = "1";//same Kilograms
conv[6][7] = "5000";//Kilograms  to Carat
conv[6][8] = "15432.35";// Kilograms to Grains
conv[6][9] = "643";// Kilograms to Pennyweight
conv[6][10] = "32.15";// Kilograms to Troy Ounce
conv[6][11] = "2.679";// Kilograms to Troy Pound
conv[7][8] = "3.08647";// Carat to Grains
conv[7][9] = "0.1286";// Carat to Pennyweight
conv[7][10] = "2.572";// Carat to Troy Ounce
conv[7][11] = "0.183714";// Carat to Troy Pound
conv[8][9] = "0.041667";// Grains to Pennyweight
conv[8][10] = "0.002083286";// Grains to Troy Ounce
conv[8][11] = "0.000148806";// Grains to Troy Pound
conv[9][10] = "0.05";// Pennyweight to Troy Ounce
conv[9][11] = "0.00357142";// Pennyweight to Troy Pound
conv[10][11] = "0.07142857";// Troy Ounce to Troy Pound

 var unitsfrom=document.MassForm.selectedfrom.selectedIndex;
 var unitsto=document.MassForm.selectedto.selectedIndex;
 var inputval=document.MassForm.inputvalue.value;
 var multiplier=0;	

	if (inputval == null) alert("Please enter an input value.");
	if (unitsfrom == 0) alert("Please select an input conversion unit.");
	if (unitsto == 0) alert("Please select an output conversion unit.");

	if (unitsto == unitsfrom) multiplier=1.000;
	if (unitsto < unitsfrom) multiplier=(1.000000/(conv[unitsto][unitsfrom]));
	if (unitsto > unitsfrom) multiplier=(conv[unitsfrom][unitsto]);

	if ((unitsfrom != 0)&&(unitsto != 0))
		var mresults = (inputval  * multiplier)
		document.MassForm.resultsf.value=( mresults );
}

function  doVolume() {
var conv = new Array(7); 
 conv[1] = new Array(7); 
 conv[2] = new Array(7); 
 conv[3] = new Array(7); 
 conv[4] = new Array(7); 
 conv[5] = new Array(7); 
 conv[6] = new Array(7); 
 conv[7] = new Array(7); 

conv[1][2] = "3.79";// Gallon to Liter
conv[1][3] = "4";// Gallon to Quart
conv[1][4] = "8";// Gallon to Pint
conv[1][5] = "128";// Gallon to Ounce
conv[1][6] = "3790";// Gallon to Cubic Centimeter
conv[1][7] = "3790";// Gallon to Mililiter
conv[2][3] = "1.0567";// Liter to Quart
conv[2][4] = "2.11";// Liter to Pint
conv[2][5] = "33.8";// Liter to Ounce
conv[2][6] = "1000";// Liter to Cubic Centimeter
conv[2][7] = "1000";// Liter to Mililiter
conv[3][4] = "2";// Quart to Pint
conv[3][5] = "32";// Quart to Ounce
conv[3][6] = "946";// Quart to Cubic Centimeter
conv[3][7] = "946";// Quart to Mililiter
conv[4][5] = "16";// Pint to Ounce
conv[4][6] = "473";// Pint to Cubic Centimeter
conv[4][7] = "473";// Pint to Mililiter
conv[5][6] = "29.6";// Ounce to Cubic Centimeter
conv[5][7] = "29.6";// Ounce to Mililiter
conv[6][7] = "1";// Cubic Centimeter to Mililiter


 var unitsfrom=document.VolumeForm.selectedfrom.selectedIndex;
 var unitsto=document.VolumeForm.selectedto.selectedIndex;
 var inputval=document.VolumeForm.inputvalue.value;
 var multiplier=0;	

	if (inputval == null) alert("Please enter an input value.");
	if (unitsfrom == 0) alert("Please select an input conversion unit.");
	if (unitsto == 0) alert("Please select an output conversion unit.");

	if (unitsto == unitsfrom) multiplier=1.000;
	if (unitsto < unitsfrom) multiplier=(1.000000/(conv[unitsto][unitsfrom]));
	if (unitsto > unitsfrom) multiplier=(conv[unitsfrom][unitsto]);

	if ((unitsfrom != 0)&&(unitsto != 0))
		var vresults = (inputval  * multiplier)
		document.VolumeForm.resultsf.value=( vresults );
}

//-->
