function startCalc(){
  interval = setInterval("calc()",1);
}
function calc(){
  K1 = isNaN(Number(document.autoSumForm.K1.value)) ? 0 : Number(document.autoSumForm.K1.value);
  K2 = isNaN(Number(document.autoSumForm.K2.value)) ? 0 : Number(document.autoSumForm.K2.value);
  K3 = isNaN(Number(document.autoSumForm.K3.value)) ? 0 : Number(document.autoSumForm.K3.value);
  K4 = isNaN(Number(document.autoSumForm.K4.value)) ? 0 : Number(document.autoSumForm.K4.value);
  K5 = isNaN(Number(document.autoSumForm.K5.value)) ? 0 : Number(document.autoSumForm.K5.value);
  K6 = isNaN(Number(document.autoSumForm.K6.value)) ? 0 : Number(document.autoSumForm.K6.value);
  K7 = isNaN(Number(document.autoSumForm.K7.value)) ? 0 : Number(document.autoSumForm.K7.value);
  K8 = isNaN(Number(document.autoSumForm.K8.value)) ? 0 : Number(document.autoSumForm.K8.value);
  K9 = isNaN(Number(document.autoSumForm.K9.value)) ? 0 : Number(document.autoSumForm.K9.value);
  K10 = isNaN(Number(document.autoSumForm.K10.value)) ? 0 : Number(document.autoSumForm.K10.value);
  K11 = isNaN(Number(document.autoSumForm.K11.value)) ? 0 : Number(document.autoSumForm.K11.value);
  K12 = isNaN(Number(document.autoSumForm.K12.value)) ? 0 : Number(document.autoSumForm.K12.value);
  K13 = isNaN(Number(document.autoSumForm.K13.value)) ? 0 : Number(document.autoSumForm.K13.value);
  K14 = isNaN(Number(document.autoSumForm.K14.value)) ? 0 : Number(document.autoSumForm.K14.value);
  K15 = isNaN(Number(document.autoSumForm.K15.value)) ? 0 : Number(document.autoSumForm.K15.value);
  K16 = isNaN(Number(document.autoSumForm.K16.value)) ? 0 : Number(document.autoSumForm.K16.value);
  K17 = isNaN(Number(document.autoSumForm.K17.value)) ? 0 : Number(document.autoSumForm.K17.value);
  K18 = isNaN(Number(document.autoSumForm.K18.value)) ? 0 : Number(document.autoSumForm.K18.value);
  K19 = isNaN(Number(document.autoSumForm.K19.value)) ? 0 : Number(document.autoSumForm.K19.value);
  K20 = isNaN(Number(document.autoSumForm.K20.value)) ? 0 : Number(document.autoSumForm.K20.value);
  K21 = isNaN(Number(document.autoSumForm.K21.value)) ? 0 : Number(document.autoSumForm.K21.value);
  K22 = isNaN(Number(document.autoSumForm.K22.value)) ? 0 : Number(document.autoSumForm.K22.value);
  K23 = isNaN(Number(document.autoSumForm.K23.value)) ? 0 : Number(document.autoSumForm.K23.value);
  K24 = isNaN(Number(document.autoSumForm.K24.value)) ? 0 : Number(document.autoSumForm.K24.value);
  K25 = isNaN(Number(document.autoSumForm.K25.value)) ? 0 : Number(document.autoSumForm.K25.value);
  K26 = isNaN(Number(document.autoSumForm.K26.value)) ? 0 : Number(document.autoSumForm.K26.value);
  K27 = isNaN(Number(document.autoSumForm.K27.value)) ? 0 : Number(document.autoSumForm.K27.value);
  K28 = isNaN(Number(document.autoSumForm.K28.value)) ? 0 : Number(document.autoSumForm.K28.value);
  K29 = isNaN(Number(document.autoSumForm.K29.value)) ? 0 : Number(document.autoSumForm.K29.value);
  K30 = isNaN(Number(document.autoSumForm.K30.value)) ? 0 : Number(document.autoSumForm.K30.value);
  K31 = isNaN(Number(document.autoSumForm.K31.value)) ? 0 : Number(document.autoSumForm.K31.value);
  K32 = isNaN(Number(document.autoSumForm.K32.value)) ? 0 : Number(document.autoSumForm.K32.value);

  V1 = isNaN(Number(document.autoSumForm.V1.value)) ? 0 : Number(document.autoSumForm.V1.value);
  V2 = isNaN(Number(document.autoSumForm.V2.value)) ? 0 : Number(document.autoSumForm.V2.value);
  V3 = isNaN(Number(document.autoSumForm.V3.value)) ? 0 : Number(document.autoSumForm.V3.value);
  V4 = isNaN(Number(document.autoSumForm.V4.value)) ? 0 : Number(document.autoSumForm.V4.value);
  V5 = isNaN(Number(document.autoSumForm.V5.value)) ? 0 : Number(document.autoSumForm.V5.value);
  V6 = isNaN(Number(document.autoSumForm.V6.value)) ? 0 : Number(document.autoSumForm.V6.value);
  V7 = isNaN(Number(document.autoSumForm.V7.value)) ? 0 : Number(document.autoSumForm.V7.value);
  V8 = isNaN(Number(document.autoSumForm.V8.value)) ? 0 : Number(document.autoSumForm.V8.value);
  V9 = isNaN(Number(document.autoSumForm.V9.value)) ? 0 : Number(document.autoSumForm.V9.value);
  V10 = isNaN(Number(document.autoSumForm.V10.value)) ? 0 : Number(document.autoSumForm.V10.value);
  V11 = isNaN(Number(document.autoSumForm.V11.value)) ? 0 : Number(document.autoSumForm.V11.value);
  V12 = isNaN(Number(document.autoSumForm.V12.value)) ? 0 : Number(document.autoSumForm.V12.value);
  V13 = isNaN(Number(document.autoSumForm.V13.value)) ? 0 : Number(document.autoSumForm.V13.value);
  V14 = isNaN(Number(document.autoSumForm.V14.value)) ? 0 : Number(document.autoSumForm.V14.value);
  V15 = isNaN(Number(document.autoSumForm.V15.value)) ? 0 : Number(document.autoSumForm.V15.value);
  V16 = isNaN(Number(document.autoSumForm.V16.value)) ? 0 : Number(document.autoSumForm.V16.value);
  V17 = isNaN(Number(document.autoSumForm.V17.value)) ? 0 : Number(document.autoSumForm.V17.value);
  V18 = isNaN(Number(document.autoSumForm.V18.value)) ? 0 : Number(document.autoSumForm.V18.value);
  V19 = isNaN(Number(document.autoSumForm.V19.value)) ? 0 : Number(document.autoSumForm.V19.value);
  V20 = isNaN(Number(document.autoSumForm.V20.value)) ? 0 : Number(document.autoSumForm.V20.value);
  V21 = isNaN(Number(document.autoSumForm.V21.value)) ? 0 : Number(document.autoSumForm.V21.value);
  V22 = isNaN(Number(document.autoSumForm.V22.value)) ? 0 : Number(document.autoSumForm.V22.value);
  V23 = isNaN(Number(document.autoSumForm.V23.value)) ? 0 : Number(document.autoSumForm.V23.value);
  V24 = isNaN(Number(document.autoSumForm.V24.value)) ? 0 : Number(document.autoSumForm.V24.value);
  V25 = isNaN(Number(document.autoSumForm.V25.value)) ? 0 : Number(document.autoSumForm.V25.value);
  V26 = isNaN(Number(document.autoSumForm.V26.value)) ? 0 : Number(document.autoSumForm.V26.value);
  V27 = isNaN(Number(document.autoSumForm.V27.value)) ? 0 : Number(document.autoSumForm.V27.value);
  V28 = isNaN(Number(document.autoSumForm.V28.value)) ? 0 : Number(document.autoSumForm.V28.value);
  V29 = isNaN(Number(document.autoSumForm.V29.value)) ? 0 : Number(document.autoSumForm.V29.value);
  V30 = isNaN(Number(document.autoSumForm.V30.value)) ? 0 : Number(document.autoSumForm.V30.value);
  V31 = isNaN(Number(document.autoSumForm.V31.value)) ? 0 : Number(document.autoSumForm.V31.value);
  V32 = isNaN(Number(document.autoSumForm.V32.value)) ? 0 : Number(document.autoSumForm.V32.value);




  document.autoSumForm.S1.value = K1 * V1 ;
  document.autoSumForm.S2.value = K2 * V2 ;
  document.autoSumForm.S3.value = K3 * V3 ;
  document.autoSumForm.S4.value = K4 * V4 ;
  document.autoSumForm.S5.value = K5 * V5 ;
  document.autoSumForm.S6.value = K6 * V6 ;
  document.autoSumForm.S7.value = K7 * V7 ;
  document.autoSumForm.S8.value = K8 * V8 ;
  document.autoSumForm.S9.value = K9 * V9 ;
  document.autoSumForm.S10.value = K10 * V10 ;
  document.autoSumForm.S11.value = K11 * V11 ;
  document.autoSumForm.S12.value = K12 * V12 ;
  document.autoSumForm.S13.value = K13 * V13 ;
  document.autoSumForm.S14.value = K14 * V14 ;
  document.autoSumForm.S15.value = K15 * V15 ;
  document.autoSumForm.S16.value = K16 * V16 ;
  document.autoSumForm.S17.value = K17 * V17 ;
  document.autoSumForm.S18.value = K18 * V18 ;
  document.autoSumForm.S19.value = K19 * V19 ;
  document.autoSumForm.S20.value = K20 * V20 ;
  document.autoSumForm.S21.value = K21 * V21 ;
  document.autoSumForm.S22.value = K22 * V22 ;
  document.autoSumForm.S23.value = K23 * V23 ;
  document.autoSumForm.S24.value = K24 * V24 ;
  document.autoSumForm.S25.value = K25 * V25 ;
  document.autoSumForm.S26.value = K26 * V26 ;
  document.autoSumForm.S27.value = K27 * V27 ;
  document.autoSumForm.S28.value = K28 * V28 ;
  document.autoSumForm.S29.value = K29 * V29 ;
  document.autoSumForm.S30.value = K30 * V30 ;
  document.autoSumForm.S31.value = K31 * V31 ;
  document.autoSumForm.S32.value = K32 * V32 ;


  S1 = isNaN(Number(document.autoSumForm.S1.value)) ? 0 : Number(document.autoSumForm.S1.value);
  S2 = isNaN(Number(document.autoSumForm.S2.value)) ? 0 : Number(document.autoSumForm.S2.value);
  S3 = isNaN(Number(document.autoSumForm.S3.value)) ? 0 : Number(document.autoSumForm.S3.value);
  S4 = isNaN(Number(document.autoSumForm.S4.value)) ? 0 : Number(document.autoSumForm.S4.value);
  S5 = isNaN(Number(document.autoSumForm.S5.value)) ? 0 : Number(document.autoSumForm.S5.value);
  S6 = isNaN(Number(document.autoSumForm.S6.value)) ? 0 : Number(document.autoSumForm.S6.value);
  S7 = isNaN(Number(document.autoSumForm.S7.value)) ? 0 : Number(document.autoSumForm.S7.value);
  S8 = isNaN(Number(document.autoSumForm.S8.value)) ? 0 : Number(document.autoSumForm.S8.value);
  S9 = isNaN(Number(document.autoSumForm.S9.value)) ? 0 : Number(document.autoSumForm.S9.value);
  S10 = isNaN(Number(document.autoSumForm.S10.value)) ? 0 : Number(document.autoSumForm.S10.value);
  S11 = isNaN(Number(document.autoSumForm.S11.value)) ? 0 : Number(document.autoSumForm.S11.value);
  S12 = isNaN(Number(document.autoSumForm.S12.value)) ? 0 : Number(document.autoSumForm.S12.value);
  S13 = isNaN(Number(document.autoSumForm.S13.value)) ? 0 : Number(document.autoSumForm.S13.value);
  S14 = isNaN(Number(document.autoSumForm.S14.value)) ? 0 : Number(document.autoSumForm.S14.value);
  S15 = isNaN(Number(document.autoSumForm.S15.value)) ? 0 : Number(document.autoSumForm.S15.value);
  S16 = isNaN(Number(document.autoSumForm.S16.value)) ? 0 : Number(document.autoSumForm.S16.value);
  S17 = isNaN(Number(document.autoSumForm.S17.value)) ? 0 : Number(document.autoSumForm.S17.value);
  S18 = isNaN(Number(document.autoSumForm.S18.value)) ? 0 : Number(document.autoSumForm.S18.value);
  S19 = isNaN(Number(document.autoSumForm.S19.value)) ? 0 : Number(document.autoSumForm.S19.value);
  S20 = isNaN(Number(document.autoSumForm.S20.value)) ? 0 : Number(document.autoSumForm.S20.value);
  S21 = isNaN(Number(document.autoSumForm.S21.value)) ? 0 : Number(document.autoSumForm.S21.value);
  S22 = isNaN(Number(document.autoSumForm.S22.value)) ? 0 : Number(document.autoSumForm.S22.value);
  S23 = isNaN(Number(document.autoSumForm.S23.value)) ? 0 : Number(document.autoSumForm.S23.value);
  S24 = isNaN(Number(document.autoSumForm.S24.value)) ? 0 : Number(document.autoSumForm.S24.value);
  S25 = isNaN(Number(document.autoSumForm.S25.value)) ? 0 : Number(document.autoSumForm.S25.value);
  S26 = isNaN(Number(document.autoSumForm.S26.value)) ? 0 : Number(document.autoSumForm.S26.value);
  S27 = isNaN(Number(document.autoSumForm.S27.value)) ? 0 : Number(document.autoSumForm.S27.value);
  S28 = isNaN(Number(document.autoSumForm.S28.value)) ? 0 : Number(document.autoSumForm.S28.value);
  S29 = isNaN(Number(document.autoSumForm.S29.value)) ? 0 : Number(document.autoSumForm.S29.value);
  S30 = isNaN(Number(document.autoSumForm.S30.value)) ? 0 : Number(document.autoSumForm.S30.value);
  S31 = isNaN(Number(document.autoSumForm.S31.value)) ? 0 : Number(document.autoSumForm.S31.value);
  S32 = isNaN(Number(document.autoSumForm.S32.value)) ? 0 : Number(document.autoSumForm.S32.value);


// 1. DÖNEM
  document.autoSumForm.DK1.value = K1 + K2 + K3 + K4 + K5 + K6 + K7;
  document.autoSumForm.DV1.value = V1 + V2 + V3 + V4 + V5 + V6 + V7;
  document.autoSumForm.DS1.value = S1 + S2 + S3 + S4 + S5 + S6 + S7 ;

  DK1 = isNaN(Number(document.autoSumForm.DK1.value)) ? 0 : Number(document.autoSumForm.DK1.value);
  DS1 = isNaN(Number(document.autoSumForm.DS1.value)) ? 0 : Number(document.autoSumForm.DS1.value);

  document.autoSumForm.DO1.value = DS1 / DK1;

// 2. DÖNEM
  document.autoSumForm.DK2.value = K8 + K9 + K10 + K11 + K12 + K13 + K14 + K15;
  document.autoSumForm.DV2.value = V8 + V9 + V10 + V11 + V12 + V13 + V14 + V15;
  document.autoSumForm.DS2.value = S8 + S9 + S10 + S11 + S12 + S13 + S14 + S15;

  DK2 = isNaN(Number(document.autoSumForm.DK2.value)) ? 0 : Number(document.autoSumForm.DK2.value);
  DS2 = isNaN(Number(document.autoSumForm.DS2.value)) ? 0 : Number(document.autoSumForm.DS2.value);

  document.autoSumForm.DO2.value = DS2 / DK2;

// 3. DÖNEM
  document.autoSumForm.DK3.value = K16 + K17 + K18 + K19 + K20;
  document.autoSumForm.DV3.value = V16 + V17 + V18 + V19 + V20;
  document.autoSumForm.DS3.value = S16 + S17 + S18 + S19 + S20;

  DK3 = isNaN(Number(document.autoSumForm.DK3.value)) ? 0 : Number(document.autoSumForm.DK3.value);
  DS3 = isNaN(Number(document.autoSumForm.DS3.value)) ? 0 : Number(document.autoSumForm.DS3.value);

  document.autoSumForm.DO3.value = DS3 / DK3;

// 4. DÖNEM
  document.autoSumForm.DK4.value = K21 + K22 + K23 + K24 + K25;
  document.autoSumForm.DV4.value = V21 + V22 + V23 + V24 + V25;
  document.autoSumForm.DS4.value = S21 + S22 + S23 + S24 + S25;

  DK4 = isNaN(Number(document.autoSumForm.DK4.value)) ? 0 : Number(document.autoSumForm.DK4.value);
  DS4 = isNaN(Number(document.autoSumForm.DS4.value)) ? 0 : Number(document.autoSumForm.DS4.value);

  document.autoSumForm.DO4.value = DS4 / DK4;

// 5. DÖNEM
  document.autoSumForm.DK5.value = K26 + K27 + K28 + K29;
  document.autoSumForm.DV5.value = V26 + V27 + V28 + V29;
  document.autoSumForm.DS5.value = S26 + S27 + S28 + S29;

  DK5 = isNaN(Number(document.autoSumForm.DK5.value)) ? 0 : Number(document.autoSumForm.DK5.value);
  DS5 = isNaN(Number(document.autoSumForm.DS5.value)) ? 0 : Number(document.autoSumForm.DS5.value);

  document.autoSumForm.DO5.value = DS5 / DK5;

// 6. DÖNEM
  document.autoSumForm.DK6.value = K30 + K31 + K32;
  document.autoSumForm.DV6.value = V30 + V31 + V32;
  document.autoSumForm.DS6.value = S30 + S31 + S32;

  DK6 = isNaN(Number(document.autoSumForm.DK6.value)) ? 0 : Number(document.autoSumForm.DK6.value);
  DS6 = isNaN(Number(document.autoSumForm.DS6.value)) ? 0 : Number(document.autoSumForm.DS6.value);

  document.autoSumForm.DO6.value = DS6 / DK6;

// agno2
  document.autoSumForm.AGNO2.value = (DS1 + DS2) / (DK1 + DK2);

// agno3
  document.autoSumForm.AGNO3.value = (DS1 + DS2 + DS3) / (DK1 + DK2 + DK3);

// agno4
  document.autoSumForm.AGNO4.value = (DS1 + DS2 + DS3 + DS4) / (DK1 + DK2 + DK3 + DK4);

// agno5
  document.autoSumForm.AGNO5.value = (DS1 + DS2 + DS3 + DS4 + DS5) / (DK1 + DK2 + DK3 + DK4 + DK5);

// agno6
  document.autoSumForm.AGNO6.value = (DS1 + DS2 + DS3 + DS4 + DS5 + DS6) / (DK1 + DK2 + DK3 + DK4 + DK5 + DK6);


}
function stopCalc(){
  clearInterval(interval);
}
