Untitled

From Anonymous, 2 Days ago, written in Plain Text, viewed 6 times. This paste will go to its last resting place in 3 Weeks.
URL https://paste.intergen.online/view/90069bb1 Embed
Download Paste or View Raw
  1.                         CP_req = (1.26 * BodyWeight) + (0.266 * BodyWeight) + (SweatLoss * 7.8 * 2.0 / 0.79);
  2.                         Ca_req = (0.08 * BodyWeight);
  3.                         P_req = (0.058 * BodyWeight);
  4.                         Mg_req = (0.03 * BodyWeight);
  5.                         VitE_req = 2.0 * BodyWeight;
  6.                         Thi_req = 0.125 * BodyWeight;
  7.                         Ribo_req = 0.05 * BodyWeight;
  8.                 }
  9.                 if (WorkLoad == 4) {
  10.                         // Very Heavy
  11.                         SweatLoss = 0.02 * BodyWeight;
  12.                         DE_req = (0.0363 * BodyWeight ) * 1.9;         
  13.                         CP_req = (1.26 * BodyWeight) + (0.354 * BodyWeight) + (SweatLoss * 7.8 * 2.0 / 0.79);
  14.                         Ca_req = (0.08 * BodyWeight);
  15.                         P_req = (0.058 * BodyWeight);
  16.                         Mg_req = (0.03 * BodyWeight);
  17.                         VitE_req = 2.0 * BodyWeight;
  18.                         Thi_req = 0.125 * BodyWeight;
  19.                         Ribo_req = 0.05 * BodyWeight;
  20.                 }
  21.                 LYS_req = 0.043 * CP_req;
  22.                 K_req = 0.05 * BodyWeight + 2.8 * SweatLoss;  
  23.                 Na_req = 0.02 * BodyWeight + 3.1 * SweatLoss;
  24.                 Cl_req = 0.08 * BodyWeight + 5.3 * SweatLoss;
  25.                 S_req = 1.5 * DM_req;
  26.                 Co_req = 0.05 * DM_req;
  27.                 Cu_req = 10.0 * DM_req;
  28.                 I_req = 0.35 * DM_req;
  29.                 Fe_req = 40 * DM_req;
  30.                 Mn_req = 40 * DM_req;
  31.                 Zn_req = 40 * DM_req;
  32.                 Se_req = 0.1 * DM_req;
  33.                 VitA_req = 45 * BodyWeight;
  34.                 VitD_req = 6.6 * BodyWeight;
  35.         break;
  36.  
  37.         case "STALLION":                                       
  38.         // Stallion
  39.                 BodyWeight = MatureWeight;
  40.                 DM_req = (IntakeLevel/100) * BodyWeight;
  41.                 if (StallionMaintLevel == 0)    
  42.                 // Not Breeding
  43.                 {
  44.                         DE_req = 0.0363 * BodyWeight;          
  45.                         CP_req = 1.44 * BodyWeight;
  46.                         Ca_req = 0.04 * BodyWeight;
  47.                         P_req = 0.028 * BodyWeight;
  48.                         Mg_req = 0.015 * BodyWeight;
  49.                         K_req = 0.05 * BodyWeight;
  50.                         Na_req = 0.02 * BodyWeight;
  51.                         Cl_req = 0.08 * BodyWeight;
  52.                         Cu_req = 0.2 * BodyWeight;
  53.                         VitA_req = 30 * BodyWeight;
  54.                         VitE_req = 1.0 * BodyWeight;
  55.                 }
  56.                 if (StallionMaintLevel == 1)   
  57.                 // Breeding
  58.                 {
  59.                         SweatLoss = 0.0025 * BodyWeight; // - (Assumes light workload)
  60.                         DE_req = 0.0363 * BodyWeight * 1.2;            
  61.                         CP_req = 1.44 * BodyWeight + (SweatLoss * 7.8 * 2 / 0.79) + 0.089 * BodyWeight;
  62.                         Ca_req = 0.06 * BodyWeight;
  63.                         P_req = 0.036 * BodyWeight;
  64.                         Mg_req = 0.019 * BodyWeight;
  65.                         K_req = 0.05 * BodyWeight +(1.4 / 0.5) * SweatLoss;
  66.                         Na_req = 0.02 * BodyWeight + 3.1 * SweatLoss;
  67.                         Cl_req = 0.08 * BodyWeight + 5.3 * SweatLoss;
  68.                         Cu_req = 10.0 * DM_req;
  69.                         VitA_req = 45 * BodyWeight;
  70.                         VitE_req = 1.6 * BodyWeight;
  71.                 }
  72.                 LYS_req = 0.043 * CP_req;
  73.                 S_req = 1.5 * DM_req;
  74.                 Co_req = 0.05 * DM_req;
  75.                 I_req = 0.35 * DM_req;
  76.                 Fe_req = 40 * DM_req;
  77.                 Mn_req = 40 * DM_req;
  78.                 Zn_req = 40 * DM_req;
  79.                 Se_req = 0.1 * DM_req;
  80.                 VitD_req = 6.6 * BodyWeight;
  81.                 Thi_req = 0.06 * BodyWeight;
  82.                 Ribo_req = 0.04 * BodyWeight;
  83.         break;
  84.  
  85.         case "PREGNANT":                                       
  86.                 // Pregnancy
  87.                 DM_req = (IntakeLevel/100) * MatureWeight;
  88.                 BodyWeight = MatureWeight;
  89.                 if (MonthOfGest < 5)
  90.                 {
  91.                         FetalMass = 0.0;  
  92.                         PUMass =  0.0;
  93.                         FetalGain =     0.0;
  94.                         DE_req = 0.0333 * BodyWeight;
  95.                         CP_req = 1.26 * BodyWeight;
  96.                         Ca_req = 0.04 * BodyWeight;
  97.                         P_req = 0.028 * BodyWeight;
  98.                         Mg_req = 0.015 * BodyWeight;
  99.                         K_req = 0.05 * BodyWeight;
  100.                         Na_req = 0.02 * BodyWeight;
  101.                         Cl_req = 0.08 * BodyWeight;
  102.                         Cu_req = 0.2 * BodyWeight;
  103.                         I_req = 0.35 * DM_req;
  104.                         Fe_req = 40 * DM_req;
  105.                 }
  106.                 else
  107.                 {
  108.                         GestDay = MonthOfGest * 30.4;  
  109.                         BirthWeight = 0.097 * MatureWeight;
  110.                         FetalMass = (0.0000001 * Math.pow(GestDay, 3.5512)) * 0.01 * BirthWeight;  
  111.                         PUMass = (-0.0135 + (0.00009 * GestDay)) * BodyWeight;
  112.                         FetalGain =     (0.00000035512 * Math.pow(GestDay, 2.5512)) * 0.01 * BirthWeight + 0.00009 * BodyWeight;  
  113.                         DE_req = (0.0333 * BodyWeight ) + (0.0333 * 2 * (FetalMass+PUMass))
  114.                                                 + ((0.03 * FetalGain * 9.4)+(0.2*FetalGain*5.6))/0.6;
  115.                         CP_req = (1.26 * BodyWeight) + (FetalGain * 1000* 2.0 * 0.2 /0.79);
  116.                         if (MonthOfGest < 7)
  117.                         {
  118.                                 Ca_req = 0.04 * BodyWeight;
  119.                                 P_req = 0.028 * BodyWeight;
  120.                                 Mg_req = 0.015 * BodyWeight;
  121.                                 K_req = 0.05 * BodyWeight;
  122.                                 Na_req = 0.02 * BodyWeight;
  123.                                 Cl_req = 0.08 * BodyWeight;
  124.                                 Cu_req = 0.2 * BodyWeight;
  125.                                 I_req = 0.35 * DM_req;
  126.                                 Fe_req = 40 * DM_req;
  127.                         }
  128.                         else if (MonthOfGest < 9)
  129.                         {
  130.                                 Ca_req = 0.056 * BodyWeight;
  131.                                 P_req = 0.04 * BodyWeight;
  132.                                 Mg_req = 0.0152 * BodyWeight;
  133.                                 K_req = 0.05 * BodyWeight;
  134.                                 Na_req = 0.02 * BodyWeight;
  135.                                 Cl_req = 0.08 * BodyWeight;
  136.                                 Cu_req = 0.2 * BodyWeight;
  137.                                 I_req = 0.35 * DM_req;
  138.                                 Fe_req = 40 * DM_req;
  139.                         }
  140.                         else
  141.                         {
  142.                                 Ca_req = 0.072 * BodyWeight;
  143.                                 P_req = 0.0525 * BodyWeight;
  144.                                 Mg_req = 0.0153 * BodyWeight;
  145.                                 K_req = 0.0517 * BodyWeight;
  146.                                 Na_req = 0.022 * BodyWeight;
  147.                                 Cl_req = 0.082 * BodyWeight;
  148.                                 Cu_req = 0.25 * BodyWeight;
  149.                                 I_req = 0.4 * DM_req;
  150.                                 Fe_req = 50 * DM_req;
  151.                         }
  152.                 }
  153.                 LYS_req = 0.043 * CP_req;
  154.                 S_req = 1.5 * DM_req;
  155.                 Co_req = 0.05 * DM_req;
  156.                 Mn_req = 40 * DM_req;
  157.                 Zn_req = 40 * DM_req;
  158.                 Se_req = 0.1 * DM_req;
  159.                 VitA_req = 60 * BodyWeight;
  160.                 VitD_req = 6.6 * BodyWeight;
  161.                 VitE_req = 1.0 * BodyWeight;
  162.                 Thi_req = 0.06 * BodyWeight;
  163.                 Ribo_req = 0.04 * BodyWeight;
  164.                 DailyGain = FetalGain*1.25;
  165.                 BodyWeight = BodyWeight + (FetalMass + PUMass)*1.25;
  166.         break;
  167.  
  168.         case "LACTATING":                                       // Lactating
  169.                 BodyWeight = MatureWeight;
  170.                 DM_req = (IntakeLevel/100) * BodyWeight;
  171.  
  172.                 var MilkVals;
  173.                 var MilkProd;
  174.                 MilkVals = new Array(6);
  175.                 MilkVals[0] = 0.0326;
  176.                 MilkVals[1] = 0.0324;
  177.                 MilkVals[2] = 0.0299;
  178.                 MilkVals[3] = 0.0271;
  179.                 MilkVals[4] = 0.0244;
  180.                 MilkVals[5] = 0.0218;
  181.                
  182.                 MilkProd = MilkVals[MonthOfLact-1] * BodyWeight;
  183.  
  184.                 if (BodyWeight > 700) {
  185.                         DE_req = (0.0333 * BodyWeight ) + ((MilkProd * 10 * 50)/ (1000 * .6));
  186.                 } else {
  187.                         DE_req = (0.0363 * BodyWeight ) + ((MilkProd * 10 * 50)/ (1000 * .6));
  188.                 }
  189.  
  190.                 CP_req = (1.44 * BodyWeight ) + (MilkProd * 50);
  191.                 LYS_req = (0.043 * 1.44 * BodyWeight) + (MilkProd * 3.3);
  192.                 if (MonthOfLact < 4)                            // Lactation - 'early lact'
  193.                 {
  194.                         Na_req = 0.02 * BodyWeight + (MilkProd * 0.17);
  195.                         Ca_req = (0.04 * BodyWeight) + ((MilkProd * 1.2)/0.5);
  196.                         P_req = (0.01/0.45 * BodyWeight) + ((MilkProd * 0.75)/0.45);
  197.                         Mg_req = (0.015 * BodyWeight) + ((MilkProd * 0.09)/0.4);
  198.                         K_req = (0.05 * BodyWeight) + ((MilkProd * 0.7)/0.5);
  199.                 }
  200.                 else if (MonthOfLact < 6)
  201.                 {
  202.                         Na_req = 0.02 * BodyWeight + (MilkProd * 0.14);
  203.                         Ca_req = (0.04 * BodyWeight) + ((MilkProd * 0.8)/0.5);
  204.                         P_req = (0.01/0.45 * BodyWeight) + ((MilkProd * 0.5)/0.45);
  205.                         Mg_req = (0.015 * BodyWeight) + ((MilkProd * 0.09)/0.4);
  206.                         K_req = (0.05 * BodyWeight) + ((MilkProd * 0.4)/0.5);
  207.                 }
  208.                 else
  209.                 {
  210.                         Na_req = 0.02 * BodyWeight + (MilkProd * 0.14);
  211.                         Ca_req = (0.04 * BodyWeight) + ((MilkProd * 0.8)/0.5);
  212.                         P_req = (0.01/0.45 * BodyWeight) + ((MilkProd * 0.5)/0.45);
  213.                         Mg_req = (0.015 * BodyWeight) + ((MilkProd * 0.045)/0.4);
  214.                         K_req = (0.05 * BodyWeight) + ((MilkProd * 0.4)/0.5);
  215.                 }
  216.                 Cl_req = 0.091 * BodyWeight;
  217.                 S_req = 1.5 * DM_req;
  218.                 Co_req = 0.05 * DM_req;
  219.                 Cu_req = 0.25 * BodyWeight;
  220.                 I_req =  0.35 * DM_req;
  221.                 Fe_req = 50 * DM_req;
  222.                 Mn_req = 40 * DM_req;
  223.                 Zn_req = 40 * DM_req;
  224.                 Se_req = 0.1 * DM_req;
  225.                 VitA_req = 60 * BodyWeight;
  226.                 VitD_req = 6.6 * BodyWeight;
  227.                 VitE_req = 2.0 * BodyWeight;
  228.                 Thi_req = 0.075 * BodyWeight;
  229.                 Ribo_req = 0.05 * BodyWeight;
  230.         break;
  231.  
  232.         case "GROWING":                                 // Growing Animal
  233.                 BodyWeight = MatureWeight * (9.7 + (90.3 * (1.0 - (Math.exp(-0.0772 * Age)))))/100.0;
  234.                 DailyGain = MatureWeight * ( 6.97121 * Math.exp(-0.0772 * Age))/(30.4 * 100);
  235.                 DM_req = (IntakeLevel/100) * BodyWeight;
  236.                 if (WorkLoadGrow == 0)
  237.                 {
  238.                         DE_req = ((56.5*Math.pow(Age,-0.145))/1000)*BodyWeight+(1.99 + 1.21*Age - 0.021*Age*Age)*DailyGain;
  239.                         if (Age < 6.5) {
  240.                                 CP_req = 1.44*BodyWeight+((DailyGain*1000*0.2)/0.5)/0.79;
  241.                                 Cl_req = 0.093 * BodyWeight;
  242.                 VitD_req = 22.2 * BodyWeight;
  243.                         } else if (Age < 8.5) {
  244.                                 CP_req = 1.44*BodyWeight+((DailyGain*1000*0.2)/0.45)/0.79;                                     
  245.                                 Cl_req = 0.085 * BodyWeight;
  246.                 VitD_req = 17.4 * BodyWeight;
  247.                         } else if (Age < 10.5) {
  248.                                 CP_req = 1.44*BodyWeight+((DailyGain*1000*0.2)/0.40)/0.79;                                     
  249.                                 Cl_req = 0.085 * BodyWeight;
  250.                 VitD_req = 17.4 * BodyWeight;
  251.                         } else if (Age < 11.5) {
  252.                                 CP_req = 1.44*BodyWeight+((DailyGain*1000*0.2)/0.35)/0.79;                                     
  253.                                 Cl_req = 0.085 * BodyWeight;
  254.                 VitD_req = 17.4 * BodyWeight;
  255.                         } else {
  256.                                 CP_req = 1.44*BodyWeight+((DailyGain*1000*0.2)/0.3)/0.79;                                      
  257.                                 Cl_req = 0.0825 * BodyWeight;
  258.                                 if (Age < 18.5) {
  259.                                         VitD_req = 15.9 * BodyWeight;
  260.                                 } else {
  261.                                         VitD_req = 13.7 * BodyWeight;
  262.                                 }
  263.                         }
  264.                         Mg_req = (0.015 * BodyWeight) + (1.25 * DailyGain);
  265.                         K_req = (0.05 * BodyWeight) + (3.0 * DailyGain);
  266.                         Na_req = 0.02 * BodyWeight + (1.0 * DailyGain);
  267.                 }
  268.                 if (WorkLoadGrow == 1)
  269.                 {
  270.                         // Only applied to animals > 12 mo of age
  271.                         SweatLoss = 0.0025 * BodyWeight;
  272.                         DE_req = ((56.5*Math.pow(Age,-0.145))/1000)*1.2*BodyWeight+(1.99+1.21*Age-0.021*Age*Age)*DailyGain;
  273.                         CP_req = 1.44*BodyWeight+((DailyGain*1000*0.2)/0.3)/0.79 + (SweatLoss* 7.8 * 2 / 0.79)+0.089*BodyWeight;                                       
  274.                         Mg_req = (0.03 * BodyWeight);
  275.                         K_req = (0.05 * BodyWeight) + (3.0 * DailyGain) +(1.4/0.5)*SweatLoss;
  276.                         Na_req = 0.02 * BodyWeight + (1.0 * DailyGain) + 3.1 * SweatLoss;
  277.                         Cl_req = 0.0825 * BodyWeight + 5.3 * SweatLoss;
  278.                                 if (Age < 18.5) {
  279.                                         VitD_req = 15.9 * BodyWeight;
  280.                                 } else {
  281.                                         VitD_req = 13.7 * BodyWeight;
  282.                                 }
  283.                 }
  284.                 if (WorkLoadGrow == 2)
  285.                 {
  286.                         // Only applied to animals > 12 mo of age
  287.                         SweatLoss = 0.005 * BodyWeight;
  288.                         DE_req = ((56.5*Math.pow(Age,-0.145))/1000)*1.4*BodyWeight+(1.99 + 1.21*Age - 0.021*Age*Age )*DailyGain;
  289.                         CP_req = 1.44*BodyWeight+((DailyGain*1000*0.2)/0.3)/0.79 + (SweatLoss* 7.8 * 2 / 0.79)+0.177*BodyWeight;                                       
  290.                         Mg_req = (0.03 * BodyWeight);
  291.                         K_req = (0.05 * BodyWeight) + (3.0 * DailyGain) +(1.4/0.5)*SweatLoss;
  292.                         Na_req = 0.02 * BodyWeight + (1.0 * DailyGain) + 3.1 * SweatLoss;
  293.                         Cl_req = 0.0825 * BodyWeight + 5.3 * SweatLoss;
  294.                                 if (Age < 18.5) {
  295.                                         VitD_req = 15.9 * BodyWeight;
  296.                                 } else {
  297.                                         VitD_req = 13.7 * BodyWeight;
  298.                                 }
  299.                 }
  300.                 if (WorkLoadGrow == 3)
  301.                 {
  302.                         // Only applied to animals > 12 mo of age
  303.                         SweatLoss = 0.01 * BodyWeight;
  304.                         DE_req = ((56.5*Math.pow(Age,-0.145))/1000)*1.6*BodyWeight+(1.99 + 1.21*Age - 0.021*Age*Age )*DailyGain;
  305.                         CP_req = 1.44*BodyWeight+((DailyGain*1000*0.2)/0.3)/0.79 + (SweatLoss* 7.8 * 2 / 0.79)+0.266*BodyWeight;                                       
  306.                         Mg_req = (0.03 * BodyWeight);
  307.                         K_req = (0.05 * BodyWeight) + (3.0 * DailyGain) +(1.4/0.5)*SweatLoss;
  308.                         Na_req = 0.02 * BodyWeight + (1.0 * DailyGain) + 3.1 * SweatLoss;
  309.                         Cl_req = 0.0825 * BodyWeight + 5.3 * SweatLoss;
  310.                                 if (Age < 18.5) {
  311.                                         VitD_req = 15.9 * BodyWeight;
  312.                                 } else {
  313.                                         VitD_req = 13.7 * BodyWeight;
  314.                                 }
  315.                 }
  316.                 if (WorkLoadGrow == 4)
  317.                 {
  318.                         // Only applied to animals > 12 mo of age
  319.                         SweatLoss = 0.02 * BodyWeight;
  320.                         DE_req = ((56.5*Math.pow(Age,-0.145))/1000)*1.9*BodyWeight+(1.99 + 1.21*Age - 0.021*Age*Age )*DailyGain;
  321.                         CP_req = 1.44*BodyWeight+((DailyGain*1000*0.2)/0.3)/0.79 + (SweatLoss* 7.8 * 2 / 0.79)+0.354*BodyWeight;                                       
  322.                         Mg_req = (0.03 * BodyWeight);
  323.                         K_req = (0.05 * BodyWeight) + (3.0 * DailyGain) +(1.4/0.5)*SweatLoss;
  324.                         Na_req = 0.02 * BodyWeight + (1.0 * DailyGain) + 3.1 * SweatLoss;
  325.                         Cl_req = 0.0825 * BodyWeight + 5.3 * SweatLoss;
  326.                                 if (Age < 18.5) {
  327.                                         VitD_req = 15.9 * BodyWeight;
  328.                                 } else {
  329.                                         VitD_req = 13.7 * BodyWeight;
  330.                                 }
  331.                 }
  332.  
  333.  
  334.                 LYS_req = 0.043 * CP_req;
  335.                 Ca_req = (0.072 * BodyWeight) + (32 * DailyGain);
  336.                 P_req = (0.04 * BodyWeight) + (17.8 * DailyGain);
  337.                 S_req = 1.5 * DM_req;
  338.                 Co_req = 0.05 * DM_req;
  339.                 Cu_req = 0.25 * BodyWeight;
  340.                 I_req = 0.35 * DM_req;
  341.                 Fe_req = 50 * DM_req;
  342.                 Mn_req = 40 * DM_req;
  343.                 Zn_req = 40 * DM_req;
  344.                 Se_req = 0.1 * DM_req;
  345.                 VitA_req = 45 * BodyWeight;
  346.                 VitD_req = 20 * BodyWeight;
  347.                 VitE_req = 2.0 * BodyWeight;
  348.                 Thi_req = 0.075 * BodyWeight;
  349.                 Ribo_req = 0.05 * BodyWeight;
  350.         break;
  351.  
  352.         default:
  353.                 alert("Undefined Animal Type");
  354.         }
  355.  
  356.         if (AnimalType == "MAINTENANCE") {
  357.                 if(menuState == 1) {
  358.                         eval("document.theform.frm_LevMaint.style.visibility='visible'");
  359.                 }
  360.                 document.theform.frm_DailyGain.value = (0.00).toFixed(2);
  361.         }
  362.  
  363.         if (AnimalType == "STALLION") {
  364.                 if(menuState == 1) {
  365.                         eval("document.theform.frm_StallionType.style.visibility='visible'");
  366.                 }
  367.                 document.theform.frm_DailyGain.value = (SweatLoss).toFixed(2);
  368.         }
  369.  
  370.         if (AnimalType == "GROWING") {
  371.                 if(menuState == 1) {
  372.                         eval("document.theform.frm_Age2.style.visibility='visible'");
  373.                         eval("document.theform.frm_TxtGrow.style.visibility='visible'");
  374.                         eval("document.theform.frm_DailyGain.style.visibility='visible'");
  375.                         eval("document.theform.frm_txtDailyGain.value='Estimated Weight change, kg/d'");
  376.                         eval("document.theform.frm_txtDailyGain.style.visibility='visible'");
  377.                         if (Age >12) {
  378.                                 eval("document.theform.frm_TxtWork_grow.style.visibility='visible'");
  379.                                 eval("document.theform.frm_WorkLoad_grow.style.visibility='visible'");
  380.                         }
  381.                 }
  382.                 document.theform.frm_DailyGain.value = DailyGain.toFixed(2);
  383.         }
  384.         if (AnimalType == "PREGNANT") {
  385.                 if(menuState == 1) {
  386.                         eval("document.theform.frm_DailyGain.style.visibility='visible'");
  387.                         eval("document.theform.frm_txtDailyGain.value='Estimated Weight change, kg/d'");
  388.                         eval("document.theform.frm_txtDailyGain.style.visibility='visible'");
  389.                         eval("document.theform.frm_MonthOfGest.style.visibility='visible'");
  390.                         eval("document.theform.frm_TxtPreg.style.visibility='visible'");
  391.                 }
  392.                 document.theform.frm_DailyGain.value = (DailyGain).toFixed(2);
  393.         }
  394.         if (AnimalType == "LACTATING") {
  395.                 if(menuState == 1) {
  396.                         eval("document.theform.frm_DailyGain.style.visibility='visible'");
  397.                         eval("document.theform.frm_txtDailyGain.style.visibility='visible'");
  398.                         eval("document.theform.frm_txtDailyGain.value='Estimated Milk Production, kg/d'");
  399.                         eval("document.theform.frm_TxtLact.style.visibility='visible'");
  400.                         eval("document.theform.frm_MonthOfLact.style.visibility='visible'");
  401.                 }
  402.                 document.theform.frm_DailyGain.value = MilkProd.toFixed(2);
  403.         }
  404.         if (AnimalType == "EXERCISE") {
  405.                 if(menuState == 1) {
  406.                         eval("document.theform.frm_TxtWork.style.visibility='visible'");
  407.                         eval("document.theform.frm_WorkLoad.style.visibility='visible'");
  408.                 }
  409.         }
  410.  
  411.         document.theform.frm_Feed_ReqDM.value = DM_req.toFixed(2);
  412.         document.theform.frm_Feed_ReqDE.value = DE_req.toFixed(2);
  413.         document.theform.frm_Feed_ReqCP.value = CP_req.toFixed(0);
  414.         document.theform.frm_Feed_ReqLys.value = LYS_req.toFixed(0);
  415.         document.theform.frm_Feed_ReqCa.value = Ca_req.toFixed(0);
  416.         document.theform.frm_Feed_ReqP.value = P_req.toFixed(0);
  417.         document.theform.frm_Feed_ReqMg.value = Mg_req.toFixed(2);
  418.         document.theform.frm_Feed_ReqK.value = K_req.toFixed(1);
  419.         document.theform.frm_Feed_ReqVitA.value = VitA_req.toFixed(0);
  420.  
  421.         // MinVits
  422.  
  423.         document.theform.frm_Feed_ReqNa.value = Na_req.toFixed(1);
  424.         document.theform.frm_Feed_ReqCl.value = Cl_req.toFixed(1);
  425.         document.theform.frm_Feed_ReqS.value = S_req.toFixed(1);
  426.         document.theform.frm_Feed_ReqCo.value = Co_req.toFixed(1);
  427.         document.theform.frm_Feed_ReqCu.value = Cu_req.toFixed(1);
  428.         document.theform.frm_Feed_ReqI.value = I_req.toFixed(1);
  429.         document.theform.frm_Feed_ReqFe.value = Fe_req.toFixed(1);
  430.         document.theform.frm_Feed_ReqMn.value = Mn_req.toFixed(1);
  431.         document.theform.frm_Feed_ReqZn.value = Zn_req.toFixed(1);
  432.         document.theform.frm_Feed_ReqSe.value = Se_req.toFixed(2);
  433.         document.theform.frm_Feed_ReqVitD.value = VitD_req.toFixed(0);
  434.         document.theform.frm_Feed_ReqVitE.value = VitE_req.toFixed(0);
  435.         document.theform.frm_Feed_ReqThi.value = Thi_req.toFixed(1);
  436.         document.theform.frm_Feed_ReqRibo.value = Ribo_req.toFixed(1);
  437.  
  438.         document.theform.frm_BodyWeight.value = BodyWeight.toFixed(0);
  439.  
  440.         document.theform.frm_Feed_DenDE.value = (DE_req/ DM_req).toFixed(2);
  441.         document.theform.frm_Feed_DenCP.value = (CP_req * 0.1 / DM_req).toFixed(1);
  442.         document.theform.frm_Feed_DenLys.value = (LYS_req * 0.1/ DM_req).toFixed(2);
  443.         document.theform.frm_Feed_DenCa.value = (Ca_req * 0.1 / DM_req).toFixed(2);
  444.         document.theform.frm_Feed_DenP.value = (P_req* 0.1/ DM_req).toFixed(2);
  445.         document.theform.frm_Feed_DenNa.value = (Na_req*0.1/ DM_req).toFixed(2);
  446.         document.theform.frm_Feed_DenCl.value = (Cl_req*0.1/ DM_req).toFixed(2);
  447.         document.theform.frm_Feed_DenK.value = (K_req*0.1/ DM_req).toFixed(2);
  448.  
  449.         tmpDM = document.theform.frm_Feed_TotDM.value - document.theform.frm_Feed_ReqDM.value;
  450.         tmpDE = document.theform.frm_Feed_TotDE.value - document.theform.frm_Feed_ReqDE.value;
  451.         tmpCP = document.theform.frm_Feed_TotCP.value - document.theform.frm_Feed_ReqCP.value;
  452.         tmpLys = document.theform.frm_Feed_TotLys.value - document.theform.frm_Feed_ReqLys.value;
  453.         tmpCa = document.theform.frm_Feed_TotCa.value - document.theform.frm_Feed_ReqCa.value;
  454.         tmpP = document.theform.frm_Feed_TotP.value - document.theform.frm_Feed_ReqP.value;
  455.         tmpNa = document.theform.frm_Feed_TotNa.value - document.theform.frm_Feed_ReqNa.value;
  456.         tmpCl = document.theform.frm_Feed_TotCl.value - document.theform.frm_Feed_ReqCl.value;
  457.         tmpK = document.theform.frm_Feed_TotK.value - document.theform.frm_Feed_ReqK.value;
  458.  
  459.         document.theform.frm_Feed_DiffDM.value = tmpDM.toFixed(2);
  460.         document.theform.frm_Feed_DiffDE.value = tmpDE.toFixed(2);
  461.         document.theform.frm_Feed_DiffCP.value = tmpCP.toFixed(0);
  462.         document.theform.frm_Feed_DiffLys.value = tmpLys.toFixed(0);
  463.         document.theform.frm_Feed_DiffCa.value = tmpCa.toFixed(0);
  464.         document.theform.frm_Feed_DiffP.value = tmpP.toFixed(0);
  465.         document.theform.frm_Feed_DiffNa.value = tmpNa.toFixed(0);
  466.         document.theform.frm_Feed_DiffCl.value = tmpCl.toFixed(0);
  467.         document.theform.frm_Feed_DiffK.value = tmpK.toFixed(1);
  468.  
  469. }
  470.  
  471. function clrCookies(){
  472.  

Reply to "Untitled"

Here you can reply to the paste above