/* Functiion for Zabiha Calculation*/
function gzDetail(zDtl) {
	
	document.Form.MC_TotalZabiha.value = "";
	document.Form.MC_zZabihaQ.value = "";
	
	zZDtl = zDtl.options[zDtl.selectedIndex].value;
	
	if (zZDtl == "NONE") {
		document.Form.zSelection.value = "0";
	}
	
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Afghanistan") {
		document.Form.zSelection.value = "140";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Albania") {
		document.Form.zSelection.value = "260";
	}
	
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Bangladesh") {
		document.Form.zSelection.value = "110";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Bosnia") {
		document.Form.zSelection.value = "230";
	}
	
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Cameroon") {
		document.Form.zSelection.value = "0";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Cambodia") {
		document.Form.zSelection.value = "0";
	}
	
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Canada") {
		document.Form.zSelection.value = "250";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "China") {
		document.Form.zSelection.value = "145";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Dominican Republic") {
		document.Form.zSelection.value = "85";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Egypt") {
		document.Form.zSelection.value = "250";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Eritrea") {
		document.Form.zSelection.value = "0";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Ethiopia") {
		document.Form.zSelection.value = "65";
	}

	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Gambia") {
		document.Form.zSelection.value = "0";
	}
	
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Grenada") {
		document.Form.zSelection.value = "140";
	}

	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Guyana") {
		document.Form.zSelection.value = "0";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Ghana") {
		document.Form.zSelection.value = "120";
	}
	
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Haiti") {
		document.Form.zSelection.value = "100";
	}
	
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "India") {
		document.Form.zSelection.value = "110";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Iraq") {
		document.Form.zSelection.value = "325";
	}
	
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Indonesia") {
		document.Form.zSelection.value = "170";
	}
	
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Jordan") {
		document.Form.zSelection.value = "260";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Kashmir") {
		document.Form.zSelection.value = "120";
	}
	
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Kenya") {
		document.Form.zSelection.value = "65";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Kosovo") {
		document.Form.zSelection.value = "260";
	}
	
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Lebanon") {
		document.Form.zSelection.value = "265";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Lesotho") {
		document.Form.zSelection.value = "100";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Liberia") {
		document.Form.zSelection.value = "165";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Libya") {
		document.Form.zSelection.value = "295";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Macedonia") {
		document.Form.zSelection.value = "260";
	}
	
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Madagascar") {
		document.Form.zSelection.value = "85";
	}

	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Mali") {
		document.Form.zSelection.value = "0";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Malawi") {
		document.Form.zSelection.value = "0";
	}
	
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Morocco") {
		document.Form.zSelection.value = "195";
	}
	
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Montenegro") {
		document.Form.zSelection.value = "260";
	}
	
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Namibia") {
		document.Form.zSelection.value = "100";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Niger") {
		document.Form.zSelection.value = "0";
	}

	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Pakistan") {
		document.Form.zSelection.value = "120";
	}

	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Palestine") {
		document.Form.zSelection.value = "340";
	}
	
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Philippines") {
		document.Form.zSelection.value = "110";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Sierra Leone") {
		document.Form.zSelection.value = "120";
	}

	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Somalia") {
		document.Form.zSelection.value = "65";
	}
	
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "South Africa") {
		document.Form.zSelection.value = "145";
	}
	
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Sri Lanka") {
		document.Form.zSelection.value = "120";
	}
	
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "St. Lucia") {
		document.Form.zSelection.value = "140";
	}
	
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Sudan-Darfur") {
		document.Form.zSelection.value = "130";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Swaziland") {
		document.Form.zSelection.value = "100";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Syria") {
		document.Form.zSelection.value = "335";
	}	
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Tanzania") {
		document.Form.zSelection.value = "0";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Togo") {
		document.Form.zSelection.value = "0";
	}
	
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Trinidad") {
		document.Form.zSelection.value = "330";
	}

	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Tunisia") {
		document.Form.zSelection.value = "250";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Turkey") {
		document.Form.zSelection.value = "235";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Uganda") {
		document.Form.zSelection.value = "0";
	}
	
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "USA") {
		document.Form.zSelection.value = "170";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Yemen") {
		document.Form.zSelection.value = "175";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Zambia") {
		document.Form.zSelection.value = "100";
	}
	if (zZDtl == "Sheep/Goat" & document.Form.ref2.value == "Zimbabwe") {
		document.Form.zSelection.value = "100";
	}
	
	
	
	
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Afghanistan") {
		document.Form.zSelection.value = "75";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Albania") {
		document.Form.zSelection.value = "175";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Bangladesh") {
		document.Form.zSelection.value = "70";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Bosnia") {
		document.Form.zSelection.value = "0";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Cameroon") {
		document.Form.zSelection.value = "125";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Cambodia") {
		document.Form.zSelection.value = "55";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Canada") {
		document.Form.zSelection.value = "0";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "China") {
		document.Form.zSelection.value = "0";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Dominican Republic") {
		document.Form.zSelection.value = "0";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Egypt") {
		document.Form.zSelection.value = "150";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Eritrea") {
		document.Form.zSelection.value = "100";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Ethiopia") {
		document.Form.zSelection.value = "0";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Gambia") {
		document.Form.zSelection.value = "100";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Grenada") {
		document.Form.zSelection.value = "170";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Guyana") {
		document.Form.zSelection.value = "70";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Ghana") {
		document.Form.zSelection.value = "65";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Haiti") {
		document.Form.zSelection.value = "80";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "India") {
		document.Form.zSelection.value = "50";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Iraq") {
		document.Form.zSelection.value = "305";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Indonesia") {
		document.Form.zSelection.value = "160";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Jordan") {
		document.Form.zSelection.value = "0";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Kashmir") {
		document.Form.zSelection.value = "70";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Kenya") {
		document.Form.zSelection.value = "45";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Kosovo") {
		document.Form.zSelection.value = "205";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Lebanon") {
		document.Form.zSelection.value = "0";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Lesotho") {
		document.Form.zSelection.value = "0";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Liberia") {
		document.Form.zSelection.value = "0";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Libya") {
		document.Form.zSelection.value = "0";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Macedonia") {
		document.Form.zSelection.value = "205";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Madagascar") {
		document.Form.zSelection.value = "0";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Mali") {
		document.Form.zSelection.value = "100";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Malawi") {
		document.Form.zSelection.value = "100";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Morocco") {
		document.Form.zSelection.value = "0";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Montenegro") {
		document.Form.zSelection.value = "205";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Namibia") {
		document.Form.zSelection.value = "0";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Niger") {
		document.Form.zSelection.value = "100";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Pakistan") {
		document.Form.zSelection.value = "70";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Palestine") {
		document.Form.zSelection.value = "305";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Philippines") {
		document.Form.zSelection.value = "0";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Somalia") {
		document.Form.zSelection.value = "45";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "South Africa") {
		document.Form.zSelection.value = "0";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Sri Lanka") {
		document.Form.zSelection.value = "60";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Sierra Leone") {
		document.Form.zSelection.value = "70";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "St. Lucia") {
		document.Form.zSelection.value = "170";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Syria") {
		document.Form.zSelection.value = "0";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Sudan-Darfur") {
		document.Form.zSelection.value = "100";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Swaziland") {
		document.Form.zSelection.value = "0";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Tanzania") {
		document.Form.zSelection.value = "100";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Togo") {
		document.Form.zSelection.value = "105";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Trinidad") {
		document.Form.zSelection.value = "260";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Tunisia") {
		document.Form.zSelection.value = "150";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Turkey") {
		document.Form.zSelection.value = "0";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Uganda") {
		document.Form.zSelection.value = "100";
	}
	
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "USA") {
		document.Form.zSelection.value = "160";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Yemen") {
		document.Form.zSelection.value = "165";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Zambia") {
		document.Form.zSelection.value = "0";
	}
	if (zZDtl == "Cow/Buffalo" & document.Form.ref2.value == "Zimbabwe") {
		document.Form.zSelection.value = "0";
	}

}	

function gzCal() {

	if (document.Form.MC_zZabihaQ.value == "")
	{
		alert("Please enter Quantity")
		document.Form.MC_zZabihaQ.focus();
		return (false);
	}
	var checkOK3 = "0123456789-.";
	var checkStr3 = document.Form.MC_zZabihaQ.value;
	var allValid3 = true;
	var validGroups3 = true;
	var decPoints3 = 0;
	var allNum3 = "";
	for (i1 = 0;  i1 < checkStr3.length;  i1++)
	{
		ch3 = checkStr3.charAt(i1);
		for (j1 = 0;  j1 < checkOK3.length;  j1++)
		if (ch3 == checkOK3.charAt(j1))
		break;
		if (j1 == checkOK3.length)
		{
			allValid3 = false;
			break;
		}
		if (ch3 == ".")
		{
			allNum3 += ".";
			decPoints3++;
		}
		else
		allNum3 += ch3;
	}
	if (!allValid3)
	{
		alert("Please enter only digits in the \"Quantity\".");
		document.Form.MC_zZabihaQ.focus();
		return (false);
	}
	if (decPoints3 > 1 || !validGroups3)
	{
		alert("Please enter a valid number in the \"Quantity\".");
		document.Form.MC_zZabihaQ.focus();
		return (false);
	}
	var chkVal3 = allNum3;
	var prsVal3 = parseFloat(allNum3);
	if (chkVal3 != "" && !(prsVal3 >= "1"))
	{
		alert("Please enter a value greater than or equal to \"1\" in the \"Quantity\" box.");
		document.Form.MC_zZabihaQ.focus();
		return (false);
	}
	document.Form.MC_TotalZabiha.value = document.Form.zSelection.value * document.Form.MC_zZabihaQ.value
	document.Form.trnAmount.value = document.Form.MC_TotalZabiha.value
	document.Form.ref3.value = "For "+document.Form.MC_zZabihaQ.value+" "+document.Form.MC_zZabihaDetails.value+". Dedicated to: "+document.Form.MC_zMemo.value;

}

function gzChange(div3) {

	document.Form.MC_zZabihaDetails.selectedIndex = 0
	document.Form.zSelection.value = "";
	document.Form.MC_zZabihaQ.value = "";
	document.Form.MC_TotalZabiha.value = "";
	document.Form.trnAmount.value = "";

}
