function gofeed(){
window.location.href = ‘feedstuffs.html’;
}
function go1(){
window.location.href = ‘feedstuffs.html’;
}
function CheckWt() {
if (document.Myform.bwt.value > 300){alert(‘Body weight exceeds allowable \(300 lbs\)’); document.Myform.bwt.value = “”;}
}
function CheckKid() {
if (document.Myform.ls.value > 4){alert(‘Number of kids exceeds allowable \(4 kids.\)’); document.Myform.nkids.value = “”;}
}
function CheckBirWt() {
if (document.Myform.birwt.value > 12){alert(‘Birth weight of kids exceeds allowable \(12 lbs\)’); document.Myform.birwt.value = 6.5;}
}
var state1 = ‘none’;
function showhide1(mylayer_ref1) {
if (state1 == ‘none’) {
state1 = ‘block’;
}
else {
state1 = ‘none’;
}
//alert(state1);
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( “document.all.” + mylayer_ref1 + “.style.display = state1”);
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[mylayer_ref1].display = state1;
}
if (document.getElementById &&!document.all) {
hza1 = document.getElementById(mylayer_ref1);
hza1.style.display = state1;
}
}
var state2 = ‘none’;
function showhide2(mylayer_ref2) {
var a4 = document.Myform.gender.options[document.Myform.gender.selectedIndex].value;
if (a4 != 1) {return;}
if (state2 == ‘none’) {
state2 = ‘block’;
}
else {
state2 = ‘none’;
}
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( “document.all.” + mylayer_ref2 + “.style.display = state2”);
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[mylayer_ref2].display = state2;
}
if (document.getElementById &&!document.all) {
hza2 = document.getElementById(mylayer_ref2);
hza2.style.display = state2;
}
}
var state3 = ‘none’;
function showhide3(mylayer_ref3) {
if (state3 == ‘none’) {
state3 = ‘block’;
}
else {
state3 = ‘none’;
}
//alert(state1);
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( “document.all.” + mylayer_ref3 + “.style.display = state3”);
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[mylayer_ref3].display = state3;
}
if (document.getElementById &&!document.all) {
hza3 = document.getElementById(mylayer_ref3);
hza3.style.display = state3;
}
}
var state4 = ‘none’;
function showhide4(mylayer_ref4) {
if (state4 == ‘none’) {
state4 = ‘block’;
}
else {
state4 = ‘none’;
}
//alert(state1);
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( “document.all.” + mylayer_ref4 + “.style.display = state4”);
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[mylayer_ref4].display = state4;
}
if (document.getElementById &&!document.all) {
hza4 = document.getElementById(mylayer_ref4);
hza4.style.display = state4;
}
}
function showhide5(mylayer_ref5, state5) {
//alert(state1);
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( “document.all.” + mylayer_ref5 + “.style.display = state5”);
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[mylayer_ref5].display = state5;
}
if (document.getElementById &&!document.all) {
hza5 = document.getElementById(mylayer_ref5);
hza5.style.display = state5;
}
}
function showhide6(mylayer_ref6, state6) {
//alert(state6);
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( “document.all.” + mylayer_ref6 + “.style.display = state6”);
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[mylayer_ref6].display = state6;
}
if (document.getElementById &&!document.all) {
hza6 = document.getElementById(mylayer_ref6);
hza6.style.display = state6;
}
}
function showhide7(mylayer_ref7, state7) {
//alert(state1);
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( “document.all.” + mylayer_ref7 + “.style.display = state7”);
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[mylayer_ref7].display = state7;
}
if (document.getElementById &&!document.all) {
hza7 = document.getElementById(mylayer_ref7);
hza7.style.display = state7;
}
}
var state8 = ‘none’;
function showhide8(mylayer_ref8) {
if (state8 == ‘none’) {
state8 = ‘block’;
}
else {
state8 = ‘none’;
}
//alert(state1);
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( “document.all.” + mylayer_ref8 + “.style.display = state8”);
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[mylayer_ref8].display = state8;
}
if (document.getElementById &&!document.all) {
hza8 = document.getElementById(mylayer_ref8);
hza8.style.display = state8;
}
}
var state9 = ‘none’;
function showhide9(mylayer_ref9) {
if (state9 == ‘none’) {
state9 = ‘block’;
}
else {
state9 = ‘none’;
}
//alert(state1);
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( “document.all.” + mylayer_ref9 + “.style.display = state9”);
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[mylayer_ref9].display = state9;
}
if (document.getElementById &&!document.all) {
hza9 = document.getElementById(mylayer_ref9);
hza9.style.display = state9;
}
}
function Show11() {
mylayer_ref11 = ‘myObject11’;
state = ‘block’;
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( “document.all.” + mylayer_ref11 + “.style.display = state”);
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[mylayer_ref11].display = state;
}
if (document.getElementById &&!document.all) {
hza11 = document.getElementById(mylayer_ref11);
hza11.style.display = state;
}
}
function Show12() {
mylayer_ref12 = ‘myObject12’;
state = ‘block’;
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( “document.all.” + mylayer_ref12 + “.style.display = state”);
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[mylayer_ref12].display = state;
}
if (document.getElementById &&!document.all) {
hza12 = document.getElementById(mylayer_ref12);
hza12.style.display = state;
}
}
function hide(mylayer_ref1,mylayer_ref2,mylayer_ref3,mylayer_ref4,mylayer_ref5,mylayer_ref6,mylayer_ref7,mylayer_ref8,mylayer_ref9,mylayer_ref10,mylayer_ref11,mylayer_ref12) {
state = ‘none’; state1 = ‘none’; state2 = ‘none’; state3 = ‘none’; state4 = ‘none’; state5 = ‘none’; state6 = ‘none’; state7 = ‘none’; state8 = ‘none’; state9 = ‘none’;
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( “document.all.” + mylayer_ref1 + “.style.display = state”);
eval( “document.all.” + mylayer_ref2 + “.style.display = state”);
eval( “document.all.” + mylayer_ref3 + “.style.display = state”);
eval( “document.all.” + mylayer_ref4 + “.style.display = state”);
eval( “document.all.” + mylayer_ref5 + “.style.display = state”);
eval( “document.all.” + mylayer_ref6 + “.style.display = state”);
eval( “document.all.” + mylayer_ref7 + “.style.display = state”);
eval( “document.all.” + mylayer_ref8 + “.style.display = state”);
eval( “document.all.” + mylayer_ref9 + “.style.display = state”);
eval( “document.all.” + mylayer_ref10 + “.style.display = state”);
eval( “document.all.” + mylayer_ref11 + “.style.display = state”);
eval( “document.all.” + mylayer_ref12 + “.style.display = state”);
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[mylayer_ref1].display = state;
document.layers[mylayer_ref2].display = state;
document.layers[mylayer_ref3].display = state;
document.layers[mylayer_ref4].display = state;
document.layers[mylayer_ref5].display = state;
document.layers[mylayer_ref6].display = state;
document.layers[mylayer_ref7].display = state;
document.layers[mylayer_ref8].display = state;
document.layers[mylayer_ref9].display = state;
document.layers[mylayer_ref10].display = state;
document.layers[mylayer_ref11].display = state;
document.layers[mylayer_ref12].display = state;
}
if (document.getElementById &&!document.all) {
hza1 = document.getElementById(mylayer_ref1);
hza1.style.display = state;
hza2 = document.getElementById(mylayer_ref2);
hza2.style.display = state;
hza3 = document.getElementById(mylayer_ref3);
hza3.style.display = state;
hza4 = document.getElementById(mylayer_ref4);
hza4.style.display = state;
hza5 = document.getElementById(mylayer_ref5);
hza5.style.display = state;
hza6 = document.getElementById(mylayer_ref6);
hza6.style.display = state;
hza7 = document.getElementById(mylayer_ref7);
hza7.style.display = state;
hza8 = document.getElementById(mylayer_ref8);
hza8.style.display = state;
hza9 = document.getElementById(mylayer_ref9);
hza9.style.display = state;
hza10 = document.getElementById(mylayer_ref10);
hza10.style.display = state;
hza11 = document.getElementById(mylayer_ref11);
hza11.style.display = state;
hza12 = document.getElementById(mylayer_ref12);
hza12.style.display = state;
}
}
function CheckBio () {
var a3 = document.Myform.bio.options[document.Myform.bio.selectedIndex].value;
if (a3 == 4) {showhide7(‘myObject7′,’block’); CheckClass();}
else {showhide7(‘myObject7′,’none’); CheckClass();}
//else {CheckClass();}
}
function CheckClass () {
var a2 = document.Myform.g_class.options[document.Myform.g_class.selectedIndex].value;
var a4 = document.Myform.gender.options[document.Myform.gender.selectedIndex].value;
var a3 = document.Myform.bio.options[document.Myform.bio.selectedIndex].value;
showhide5(‘myObject5′,’none’); showhide6(‘myObject6′,’none’);
if (a2 == 1) {document.Myform.tdn.value = 80; document.Myform.ptcp.value = 18; Convertmec();}
else if (a2 == 2) {document.Myform.tdn.value = 60; document.Myform.ptcp.value = 12; Convertmec();}
else if (a2 == 3) {document.Myform.tdn.value = 60; document.Myform.ptcp.value = 10; Convertmec();}
else if (a2 == 4 && a3 == 2) {PickLact(); document.Myform.gender.value = 1;document.Myform.tdn.value = 65; document.Myform.ptcp.value = 15; Convertmec();}
else if (a2 == 4 && a3 != 2) {PickLact(); document.Myform.gender.value = 1;document.Myform.tdn.value = 60; document.Myform.ptcp.value = 10; Convertmec();}
else {document.Myform.tdn.value = 60; document.Myform.ptcp.value = 12; Convertmec();}
if (a2 != 3 && state8 == ‘block’) {showhide8(‘myObject8’);}
if (a4 == 1 && a2 == 3) {showhide8(‘myObject8’);}
}
function PickLact () {
var a1 = document.Myform.bio.options[document.Myform.bio.selectedIndex].value;
if (a1 == 1 || a1 == 3 || a1 == 4) {showhide5(‘myObject5′,’block’); showhide6(‘myObject6′,’none’);}
else if (a1 == 2) {showhide5(‘myObject5′,’none’); showhide6(‘myObject6′,’block’);}
else {alert(‘You must choose a bio.’);}
}
function CheckSex() {
return;
var a2 = document.Myform.g_class.options[document.Myform.g_class.selectedIndex].value;
var a4 = document.Myform.gender.options[document.Myform.gender.selectedIndex].value;
if (a2 == 3 && a4 == 1) {showhide8(‘myObject8’);}
if (a4 != 1 && state8 == ‘block’) {showhide8(‘myObject8’);}
}
function Convertmec () {
document.Myform.mec.value = document.Myform.tdn.value*15.104/100;
}
function checkpreg () {
if (!(document.Myform.preg.checked)) {document.Myform.gestme.value = 0; document.Myform.gestmp.value = 0; document.Myform.gestint.value = 1; document.Myform.breedkid.selectedIndex = 0;}
}
function checkgraz () {
if (!(document.Myform.graz.checked)) {document.Myform.grazf.value = 1; document.Myform.nrcf.selectedIndex = 0;} //document.Myform.nrcf.options[document.Myform.nrcf.selectedIndex].value = 1;}
}
function CalcGraz () {
document.Myform.grazf.value = document.Myform.nrcf.value;
}
function CheckBreedkid () {
document.Myform.birwt.value = document.Myform.breedkid.options[document.Myform.breedkid.selectedIndex].value;
}
function CheckGeno () {
var chkgeno = document.Myform.geno.options[document.Myform.geno.selectedIndex].value;
if (chkgeno == 1 || chkgeno == 4 || chkgeno == 6 || chkgeno == 3) {state10 = ‘block’;} else {state10 = ‘none’}
mylayer_ref10 = ‘myObject10′;
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( “document.all.” + mylayer_ref10 + “.style.display = state10”);
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[mylayer_ref10].display = state10;
}
if (document.getElementById &&!document.all) {
hza10 = document.getElementById(mylayer_ref10);
hza10.style.display = state10;
}
}
function ChangeFleece () {
document.Myform.gfg.value = document.Myform.mohair.value*.7*.454/183*1000;
}
function ChangeMilk () {
document.Myform.milk.value = document.Myform.myield.value;
document.Myform.fatc.value = document.Myform.fatp.value;
document.Myform.protc.value = document.Myform.protp.value;
}
function ChangeMilk2 () {
document.Myform.milk.value = document.Myform.myield2.value;
document.Myform.fatc.value = document.Myform.fatp2.value;
document.Myform.protc.value = document.Myform.protp2.value;
}
function CheckEssential() {
var Str = “”;
var a2 = document.Myform.g_class.options[document.Myform.g_class.selectedIndex].value;
var a4 = document.Myform.gender.options[document.Myform.gender.selectedIndex].value;
var a3 = document.Myform.bio.options[document.Myform.bio.selectedIndex].value;
var a5 = document.Myform.bwt.value;
if (a3 == 0) {Str += “\n\tBiotype”;}
if (a2 == 0) {Str += “\n\tClass”;}
if (a4 == 0) {Str += “\n\tGender”;}
if (a5 == “”) {Str += “\n\tBody weight”;}
if (Str != “”) {Str = “The following necessary information is missing:\n” + Str; alert(Str);}
}
function openWin1( windowURL, windowName, windowFeatures ) {
return window.open( windowURL, windowName); //, config=’toolbar=0,location=0,directories=0,top=10,left=10, fullscreen=0,status=0,menuBar=0,scrollBars=1,resizable=0’)
}
function ShowParms () {
var Str = “”;
var accadjf = document.Myform.accadjf.value; Str += “\n\taccadjf = “+accadjf;
var adg = (document.Myform.adg.options[document.Myform.adg.selectedIndex].value); Str += “\n\tadg = “+adg;
var age = document.Myform.g_class.options[document.Myform.g_class.selectedIndex].value; Str += “\n\tage = “+age;
var bcsadjf = document.Myform.bcsadjf.value; Str += “\n\tbcsadjf = “+bcsadjf;
var bio = document.Myform.bio.options[document.Myform.bio.selectedIndex].value; Str += “\n\tbio = “+bio;
var bw = document.Myform.bwt.value; Str += “\n\tbw = “+bw;
var condmi = document.Myform.condmi.value; Str += “\n\tcondmi = “+condmi;
var dmibw = document.Myform.dmibw.value; Str += “\n\tdmibw = “+dmibw;
var mfat = document.Myform.fatc.value; Str += “\n\tmfat = “+mfat;
var milk = document.Myform.milk.value; Str += “\n\tmilk = “+milk;
var fcm = milk*0.4 + (mfat/100)*milk*15; Str += “\n\tfcm = “+fcm;
var gen = document.Myform.gender.options[document.Myform.gender.selectedIndex].value; Str += “\n\tgen = “+gen;
var gestme = document.Myform.gestme.value; Str += “\n\tgestme = “+gestme;
var gestmp = document.Myform.gestmp.value; Str += “\n\tgestmp = “+gestmp;
var gfg = document.Myform.gfg.value; Str += “\n\tgfg = “+gfg;
var grazf = document.Myform.grazf.value; Str += “\n\tgrazf = “+grazf;
var mec = document.Myform.mec.value; Str += “\n\tmec = “+mec;
var mprot = document.Myform.protc.value; Str += “\n\tmprot = “+mprot;
var ptcp = document.Myform.ptcp.value; Str += “\n\tptcp = “+ptcp;
var tg = (document.Myform.adg.options[document.Myform.adg.selectedIndex].value); Str += “\n\ttg = “+tg;
Str = “These are the parametes passed to the equations:\n” + Str;
//alert(Str);
}
function calc () {
var c1 = document.Myform.g_class.options[document.Myform.g_class.selectedIndex].value;
var b1 = document.Myform.bio.options[document.Myform.bio.selectedIndex].value;
var adg = (document.Myform.adg.options[document.Myform.adg.selectedIndex].value)/30*454;
var gen = document.Myform.gender.options[document.Myform.gender.selectedIndex].value;
var bw = document.Myform.bwt.value*.454;
var grazf = document.Myform.grazf.value;
var bcsadjf = document.Myform.bcsadjf.value;
var accadjf = document.Myform.accadjf.value;
var gestme = document.Myform.gestme.value;
var gestmp = document.Myform.gestmp.value;
var mec = document.Myform.mec.value;
var condmi = document.Myform.condmi.value/100;
var dmibw = document.Myform.dmibw.value;
var ptcp = document.Myform.ptcp.value;
if (b1 == 4) {ShowParms(); memp2(); ShowParms(); fi2();}
else {
if (c1 == 1) {ShowParms(); me1(); mp1(); Show12();}
else if (c1 == 2) {ShowParms(); me2(); ShowParms(); fi4(); ShowParms(); mp1();}
else if (c1 == 3) {ShowParms(); me3(); ShowParms(); fi3(); ShowParms(); mp2();}
else if (c1 == 4) {ShowParms(); me4(); ShowParms(); fi1(); ShowParms(); mp3();}
else {alert(‘You must pick class’);}
}
Show11();
}
//END HIDE–>
