<!--
var summ = 0;
 var stselect;
 var stselectpost;
 function Calc(thiss) {
    Checkall();
    Readsumm();
  }
  
  function Checkall(){  
    var choption;
	var summop;
	summ = 0;
	stselect = stselectpost = '';
	checkform = document.forms['calc'].elements['wb_calc[]'];
	checknum  = checkform.length;
    for (var i = 0; i < checknum; i++){     
     summop = 0;
	 choption = checkform[i].checked;
	 summop   = checkform[i].value; 
	  
      if(choption) {
        summ += parseInt(summop); 
	    namestr = document.forms['calc'].elements['name_option[]'];
	     if(stselect == '') {
		  stselect += namestr[i].value;
		  stselectpost += namestr[i].value +"="+ summop;
		 }else{
		  stselect += ", "+ namestr[i].value;
		  stselectpost += ", "+ namestr[i].value +"="+ summop;
		 }
       }
   }  
  } 
  
  function Readsumm() {
    summend.innerHTML = summ;
	stsel.innerHTML   = stselect;
	document.calc.ussel.value = stselectpost;
	document.calc.sp1.value = "Индивидуальный проект";
	document.calc.summ_end.value = summ;
  }
  
  function new_calc() 
  {
	if ( confirm('Новый расчёт?')) { document.forms['calc'].reset(); Calc(''); }
  }
	
  function CalcMenu(act) {
	 var MtyMenu = document.all[act];
     if(MtyMenu.style.display == 'none') {
	   MtyMenu.style.display = 'block';
	 }else{
	   MtyMenu.style.display = 'none';
	 }
	 return;
  }
  
  function CalcMenuFor(act, fori) {
	 for( i=1; i<=fori; i++) {
	  var MtyMenu = document.all[act +"_"+ i];
      if(MtyMenu.style.display == 'none') {
	    MtyMenu.style.display = 'block';
	  }else{
	    MtyMenu.style.display = 'none';
	  }
	 }
	 return;
  }
  
  function SelOption(thsel) {
   if(thsel.value == 1) {
    document.calc.sp1.value = "Индивидуальный проект";
   }else{
    document.calc.sp1.value = thsel.value;
   }
  }
  
  function SendSP()
  {
   print_send = "Для отправки заявки вам необходимо заполнить все поля!";
 
   if(document.calc.ussel.value == "" && (document.calc.sp1.value == "Индивидуальный проект" || document.calc.sp1.value == "") ) {
    alert("Для отправки заявки вам необходимо выбрать пакет услуг или определить набор модулей.");
    return;
    }
 
   if (document.calc.name.value=="")
   {
   alert(print_send);
   document.calc.name.focus();
   return;
   }
   if (document.calc.orgname.value=="")
   {
   alert(print_send);
   document.calc.orgname.focus();
   return;
   }
   if (document.calc.phon.value=="")
   {
   alert(print_send);
   document.calc.phon.focus();
   return;
   }
   if (document.calc.mail.value=="")
   {
   alert(print_send);
   document.calc.mail.focus();
   return;
   }
   document.calc.act.value='submit';
   document.calc.submit();
}
// -->