// zeepesizer, made by Menno vd Leden 1998
// (c) 2005

	

	var total = 96;
	var names = new Array(total);
	var values = new Array(total);
	var metricname = new Array(2);
	metricname[0] = "gram";
	metricname[1] = "ounces";
	
names[1] = "almond oil, sweet almond oil, Prunus amygdalus oil";
names[2] = "apricot kernel oil, Prunus armeniaca oil";
names[3] = "arachis oil, peanut oil, earthnut oil, katchung oil, maize oil";
names[4] = "avocado oil, Persea americana oil";
names[5] = "babassu, Brazil nut oil";
names[6] = "bayberry or myrtle wax";
names[7] = "bear fat, bear tallow";
names[8] = "beef hoof oil, neat's foot oil";
names[9] = "beef tallow, beef fat, beef suet";
names[10] = "beeswax";
names[11] = "borage oil, Borago officinalis oil";
names[12] = "Brazil nut oil, babassu oil";
names[13] = "butterfat, cow";
names[14] = "butterfat, goat";
names[15] = "camelia oil, Camellia sinensis oil";
names[16] = "canola oil, rapeseed oil, colza oil, rape oil, ramic oil";
names[17] = "carnauba wax";
names[18] = "castor oil, ricinus oil";
names[19] = "chicken fat";
names[20] = "China wood oil, tung oil, nut oil";
names[21] = "Chinese bean oil, soybean oil";
names[22] = "cocoa butter, theobroma oil";
names[23] = "coconut oil, Cocos nucifera oil";
names[24] = "cod liver oil, banks oil, morrhua oil";
names[25] = "coffee-seed oil";
names[26] = "colza oil, canola oil, rape seed oil";
names[27] = "corn oil, maize oil";
names[28] = "cottonseed oil";
names[29] = "Chinese vegetable tallow";
names[30] = "deer tallow, venison fat";
names[31] = "earthnut oil, peanut oil";
names[32] = "emu oil, emu fat, ostrich oil, ostrich fat";
names[33] = "evening primrose oil, Oenothera biennis oil";
names[34] = "flax seed oil, linseed oil";
names[35] = "Florence oil, olive oil, lovvu oil, Glotrnvr oil, oliumm, olivate, sweet oil";
names[36] = "gigely oil, sesame oil, teal oil";
names[37] = "goat tallow, goat fat";
names[38] = "goose fat";
names[39] = "grape seed oil, grapefruit seed oil, Vitis vinifera oil (varies widely) ";
names[40] = "hazelnut oil, Corylus avellana oil";
names[41] = "hemp oil, hemp seed oil";
names[42] = "herring oil, fish oil";
names[43] = "java cotton, Kapok oil";
names[44] = "jojoba oil, Simmondsia chinensis oil";
names[45] = "kapok, Java cotton oil";
names[46] = "Karite butter, shea butter";
names[47] = "Katchung oil, peanut oil earthnut oil, arachis oil, maize oil";
names[48] = "kukui oil, candle nut oil";
names[49] = "lanolin, sheep wool fat";
names[50] = "lard, pork tallow, pork fat";
names[51] = "linseed oil, flax seed oil";
names[52] = "loccu oil, olive oil, Florence oil, olium olivate, sweet oil";
names[53] = "macademia nut oil, Macadamia integrifolia oil";
names[54] = "maize oil, corn oil";
names[55] = "margarine";
names[56] = "menhaden, fish oil. pogy oil, mossbunker oil";
names[57] = "mink oil";
names[58] = "mustard seed oil";
names[59] = "mutton tallow, sheep tallow";
names[60] = "myrtle wax, bayberry wax";
names[61] = "neem";
names[62] = "neat's foot oil, beef hoof oil";
names[63] = "niger-seed oil";
names[64] = "olive oil, loccu oil, Florence oil, olium olivate, sweet oil, Olea europa oil";
names[65] = "olium olivate, olive oil, loccu oil, Florence oil, sweet oil";
names[66] = "ostrich oil, ostrich fat, emu oil, emu fat";
names[67] = "palm oil";
names[68] = "palm-kernel oil, palm butter";
names[69] = "peanut oil, earthnut oil, katchung oil, arachis oil, maize oil, Arachis hypogaea oil";
names[70] = "perilla oil";
names[71] = "pistachio oil";
names[72] = "poppy-seed oil";
names[73] = "pumpkin seed oil, Cucurbita pepo oil";
names[74] = "rice bran oil";
names[75] = "ramic oil, canola oil, rape seed oil, colza oil";
names[76] = "ricinus oil, castor oil";
names[77] = "safflower oil";
names[78] = "sardine oil, Japan fish oil";
names[79] = "sesame seed oil, gigely oil, teel oil, til oil, teal oil, Sesamum indicum oil";
names[80] = "shea butter, African karite butter";
names[81] = "sheep fat, sheep tallow";
names[82] = "sheep wool fat, lanolin";
names[83] = "shortening, vegetable shortening, hydrogenated vegetable oil";
names[84] = "soybean oil, Chinese bean oil, Hellanthus annuus oil";
names[85] = "sunflower seed oil";
names[86] = "Theobroma oil, cocoa butter";
names[87] = "tung oil, soybean oil, China wood oil, nut oil";
names[88] = "venison fat, deer fat, deer or venison tallow";
names[89] = "walnut oil, Jugulans regia oil";
names[90] = "whale: sperm whale, body, blubber oil, train oil";
names[91] = "whale: sperm whale, head";
names[92] = "whale: baleen whale";
names[93] = "wheat germ oil, Triticum vulgare oil";
names[94] = "wool fat, lanolin";
names[95] = "sojawas";
values[1]	= .136;
values[2]	= 	.135;
values[3]= .136;
values[4]= .133;
values[5]= .175;
values[6]= .069;
values[7]= .139;
values[8]= .141;
values[9]= .140;
values[10]= .069;
values[11]= .136;
values[12]= .175;
values[13]= .162;
values[14]= .167;
values[15]= .136;
values[16]= .124;
values[17]= .069;
values[18]= .128;
values[19]= .138;
values[20]= .137;
values[21]= .135;
values[22]= .137;
values[23]= .190;
values[24]= .132;
values[25]= .130;
values[26]= .124;
values[27]= .136;
values[28]= .138;
values[29]= .135;
values[30]= .139;
values[31]= .136;
values[32]= .135;
values[33]= .136;
values[34]= .135;
values[35]= .134;
values[36]= .133;
values[37]= .139;
values[38]= .136;
values[39]= .127;
values[40]= .136;
values[41]= .138;
values[42]= .136;
values[43]= .137;
values[44]= .069;
values[45]= .137;
values[46]= .128;
values[47]= .136;
values[48]= .135;
values[49]= .074;
values[50]= .138;
values[51]= .136;
values[52]= .134;
values[53]= .139;
values[54]= .136;
values[55]= .136;
values[56]= .135;
values[57]= .140;
values[58]= .123;
values[59]= .138;
values[60]= .069;
values[61]= .138;
values[62]= .141;
values[63]= .135;
values[64]= .134;
values[65]= .134;
values[66]= .135;
values[67]= .141;
values[68]= .156;
values[69]= .136;
values[70]= .136;
values[71]= .135;
values[72]= .138;
values[73]= .135;
values[74]= .128;
values[75]= .124;
values[76]= .128;
values[77]= .136;
values[78]= .135;
values[79]= .133;
values[80]= .128;
values[81]= .138;
values[82]= .074;
values[83]= .136;
values[84]= .135;
values[85]= .134;
values[86]= .137;
values[87]= .137;
values[88]= .138;
values[89]= .136;
values[90]= .092;
values[91]= .102;
values[92]= .138;
values[93]= .132;
values[94]= .074;
values[95]= .137;
var lye = 0;

function New()
{
	 lye = 0;
	 var list = document.getElementById("list");
	 var weight = document.getElementById("weight");
	 
	 list.value = "";
	 weight.value = "";
	 warn("&nbsp;");
	 calc();
}

function warn(s) {
	 var message = document.getElementById("message");
	 message.innerHTML = s;
}

function Add()
{
 var weight = document.getElementById("weight");
 var fat = document.getElementById("fat");
 var list = document.getElementById("list");

 if (weight.value == "") {
 	warn("Gewicht invoeren, alsjeblieft");
 	weight.focus();
    return;
 }
 
 if (!(parseInt(weight.value) > 0 && parseInt(weight.value) < 100000)) {
 	warn("Ongeldig gewicht.");
	return;
 }
 
 warn("&nbsp;");

 
 list.value = list.value 
 			  + parseInt(weight.value) 
 			  + " " 
 			  + "gram" + " " 
 			  + names[fat.selectedIndex + 1]
   			  + " \r" ;
  lye = lye + parseInt(weight.value) * parseFloat(values[fat.selectedIndex + 1]);
  weight.value = "";
  calc();
 			  
}

function calc() {
 
 var lyevalue = document.getElementById("lyevalue");
 var watervalue = document.getElementById("watervalue");
 var superfat = document.getElementById("superfat");
 
 var sffactor = 1;
 
 if (superfat.checked) {
 	sffactor = .95;
 }
 
 lyevalue.value = Math.round(lye * sffactor) 
 				  + " " 
 				  + "gram";
 watervalue.value = Math.round(lye  * 2.8 * sffactor) 
					+ " " 
					+ "gram";

}

function makeFatList()
{
 document.write('<select  style=\"width: 100%\" id="fat" name="fat">\n');
 for (n = 1; n < total; n++)
 { 
   document.write('<option value="' + n + '">' + names[n] + '</option>\n');
 }
 document.write('</select>\n');
}
