function summ()
 {

var h12 = 27440;
var h13 = 27440;
var h14 = 26340;
var h15 = 26340;
var h16 = 0;
var h17 = 24025;
var h18 = 24025;
var h19 = 23789;
var h20 = 24025;
var h21 = 24025;
var h22 = 23789;
var h23 = 23789;

// var h12 = 22881.33;
// var h13 = 22772.77;
// var h14 = 22012.85;
// var h15 = 21795.73;
// var h16 = 21524.33;
// var h17 = 21904;
// var h18 = 21687.17;
// var h19 = 21198.65;
// var h20 = 21904.29;
// var h21 = 21687.17;
// var h22 = 20927.25;
// var h23 = 19461.69;
  
 if (document.calc.i29.value<60 || document.calc.i29.value>100 ) { alert("Неверно задана ширина внутреннего основания каркаса D");  return; }
 if (document.calc.i30.value<70 || document.calc.i30.value>300 ) { alert("Неверно задана высота каркаса E");  return; }
 if (document.calc.i35.value<1.6 || document.calc.i35.value>12 ) { alert("Неверно задана длина каркаса G");  return; }

  if (document.calc.i26.value == 5) document.calc.i31.value = 0.144;
  else if (document.calc.i26.value == 6 ) document.calc.i31.value = 0.222;
  else if (document.calc.i26.value == 7 ) document.calc.i31.value = 0.26;
  else if (document.calc.i26.value == 8 ) document.calc.i31.value = 0.395;
  else if (document.calc.i26.value == 10) document.calc.i31.value = 0.616;
  else if (document.calc.i26.value == 12) document.calc.i31.value = 0.888;
  else { document.calc.i31.value = 0; }
 
 if (document.calc.i27.value == 5) document.calc.i32.value = 0.144*2;
  else if (document.calc.i27.value == 6 ) document.calc.i32.value = 0.222*2;
  else if (document.calc.i27.value == 7 ) document.calc.i32.value = 0.26*2;
  else if (document.calc.i27.value == 8 ) document.calc.i32.value = 0.395*2;
  else if (document.calc.i27.value == 10) document.calc.i32.value = 0.617*2;
  else if (document.calc.i27.value == 12) document.calc.i32.value = 0.888*2;
 else { document.calc.i32.value = 0; }


 var i33c = Math.sqrt (document.calc.i30.value*document.calc.i30.value+(document.calc.i29.value/2)*(document.calc.i29.value/2)+100*100)*10*2/1000;

 if (document.calc.i28.value == 4) document.calc.i33.value = 0.092*i33c;
  else if (document.calc.i28.value == 5) document.calc.i33.value = 0.144*i33c;
  else if (document.calc.i28.value == 6) document.calc.i33.value = 0.222*i33c;
 else { document.calc.i33.value = 0; }

 if (document.calc.i28.value == 4) document.calc.i33.value = 0.092*i33c;
  else if (document.calc.i28.value == 5) document.calc.i33.value = 0.144*i33c;
  else if (document.calc.i28.value == 6) document.calc.i33.value = 0.222*i33c;
 else { document.calc.i33.value = 0; }

 if (document.calc.i28.value == 4) i34c1 = 0.092; 
 if (document.calc.i28.value == 5) i34c1 = 0.144; 
 if (document.calc.i28.value == 6) i34c1 = 0.222; 

 if (document.calc.i26.value == 5 ) i34c2 = 0.144; 
 if (document.calc.i26.value == 6 ) i34c2 = 0.222; 
 if (document.calc.i26.value == 7 ) i34c2 = 0.26; 
 if (document.calc.i26.value == 8 ) i34c2 = 0.395; 
 if (document.calc.i26.value == 10) i34c2 = 0.616; 
 if (document.calc.i26.value == 12) i34c2 = 0.888; 

 if (document.calc.i27.value == 5 ) i34c3 = 0.144; 
 if (document.calc.i27.value == 6 ) i34c3 = 0.222; 
 if (document.calc.i27.value == 7 ) i34c3 = 0.26; 
 if (document.calc.i27.value == 8 ) i34c3 = 0.395; 
 if (document.calc.i27.value == 10) i34c3 = 0.617; 
 if (document.calc.i27.value == 12) i34c3 = 0.888; 

 document.calc.i34.value = 1.045*(i33c*i34c1+i34c2+i34c3*2);
 document.calc.i34out.value = Math.round(document.calc.i34.value*100)/100;
 document.calc.i37.value = document.calc.i34.value*document.calc.i35.value*document.calc.i36.value;
 document.calc.i37out.value = Math.round(document.calc.i37.value*100)/100;

 if (document.calc.i28.value == 4) i42c1 = 0.092/1000; 
 if (document.calc.i28.value == 5) i42c1 = 0.144/1000; 
 if (document.calc.i28.value == 6) i42c1 = 0.222/1000; 

 if (document.calc.i28.value == 4) i42c2 = h12; 
 if (document.calc.i28.value == 5) i42c2 = h13; 
 if (document.calc.i28.value == 6) i42c2 = h14; 

 
 if (document.calc.i26.value == 5 ) i42c3 = 0.144/1000; 
 if (document.calc.i26.value == 6 ) i42c3 = 0.222/1000; 
 if (document.calc.i26.value == 7 ) i42c3 = 0.26/1000; 
 if (document.calc.i26.value == 8 ) i42c3 = 0.395/1000; 
 if (document.calc.i26.value == 10) i42c3 = 0.617/1000; 
 if (document.calc.i26.value == 12) i42c3 = 0.888/1000; 

 if (document.calc.i26.value == 5) i42c4 = h13; 
 if (document.calc.i26.value == 6) i42c4 = h14; 
 if (document.calc.i26.value == 7) i42c4 = h17; // ! стоимость
 if (document.calc.i26.value == 10) i42c4 = h20; 
 if (document.calc.i26.value == 12) i42c4 = h23; 

 if (document.calc.i27.value == 5 ) i42c5 = 0.144/1000; 
 if (document.calc.i27.value == 6 ) i42c5 = 0.222/1000;
 if (document.calc.i27.value == 7 ) i42c5 = 0.26/1000; 
 if (document.calc.i27.value == 8 ) i42c5 = 0.395/1000; 
 if (document.calc.i27.value == 10) i42c5 = 0.617/1000;
 if (document.calc.i27.value == 12) i42c5 = 0.888/1000;

 if (document.calc.i27.value == 5) i42c6 = h13; 
 if (document.calc.i27.value == 6) i42c6 = h14; 
 if (document.calc.i27.value == 7) i42c6 = h17; //! стоимость
 if (document.calc.i27.value == 8) i42c6 = h17; 
 if (document.calc.i27.value == 10) i42c6 = h20; 
 if (document.calc.i27.value == 12) i42c6 = h23; 

 document.calc.i42.value = i33c*i42c1*i42c2+i42c3*i42c4+i42c5*i42c6*2;
 document.calc.i44.value = (document.calc.i42.value-0)+(document.calc.i43.value-0)+(document.calc.i42.value*0.2-0);
 document.calc.i45.value = document.calc.i44.value*document.calc.i36.value*document.calc.i35.value;
 document.calc.i48.value = document.calc.i44.value*document.calc.i47.value/100+(document.calc.i44.value-0);
 document.calc.i48out.value = Math.round(document.calc.i48.value*100)/100;
 document.calc.i49.value = document.calc.i44.value/document.calc.i34.value*document.calc.i47.value/100+(document.calc.i44.value/  document.calc.i34.value-0);
 document.calc.i49out.value = Math.round(document.calc.i49.value*100)/100;
 document.calc.i50.value = document.calc.i48.value*document.calc.i35.value*document.calc.i36.value; 
 document.calc.i50out.value = Math.round(document.calc.i50.value*100)/100;

}
