    function namesChecked() 
    {
          var ID  = [];
	      var VAL = [];
		  var SUM = 0;
	   
	      $("input:checked").each(
		    function()
		    {
	   	      ID.push(this.name);		 
		      VAL.push(this.value);	
			  SUM += parseFloat(this.value);  
	        }
		  );
	   
	      //$("#sum_LB").text((SUM > 0 ? SUM : "")); 
		  SUM = isNaN(SUM) ? "" : SUM.toFixed(2);
		  //SUM = isNaN(SUM) ? "" : Math.round(SUM * 100)/100
		  //SUM = isNaN(SUM) ? "" : SUM % 1;
		  document.getElementById('sum_LB').value = (SUM > 0 ? SUM : "");
		  document.getElementById('info_LB').innerHTML = SUM + " &euro;";
		  //document.getElementById('info').innerHTML = SUM + " &euro;";
	      //alert(ID.toString() + "<br>" + VAL.toString());
   }

   function LightBox_coordinates()
   {
      var visW = document.documentElement.clientWidth;
      var visH = document.documentElement.clientHeight;
  
      var visTop  = $(document).scrollTop();
      var visLeft = $(document).scrollLeft();
	  
	  return {W: visW, H: visH, ST: visTop, SL: visLeft};
   }
   
   function LightBox_show_hide()
   {
	  var SUM = document.getElementById('sum_LB').value;
	  SUM = parseFloat(SUM);
	  if(isNaN(SUM))
	  {  
	     alert(ERROR.PRICE_NOT_SEL_PROGRAM); 
		 return;
	  }
	  else
	  {  
	     document.getElementById('info2_LB').innerHTML = MESSAGE.PAY_TOTAL + " : " + SUM + " ˆ";
		 // ïèçäåö... â IE íå ðàáîòàåò
		 //$("#info2_LB").text(MESSAGE.PAY_TOTAL + " : " + SUM + " ˆ");  
	  }
      	  
	  var is_visible = $("#overlay").css("display");
	  if(is_visible == "block")
	  {
 	  	 $("#lightbox").css("display", "none"); 
		 $("#overlay").css("display",  "none");
		 
		 $("#show_LB").focus();
	  }
	  else
	  {
	     var pos        = LightBox_coordinates();
		 /*
 	  	 alert(
		        "w = " + pos.W + "\n" +
				"h = " + pos.H + "\n" +
				"sw = " + pos.ST + "\n" +
				"sh = " + pos.SL + "\n"
		      );
		 */	  
		 $("#overlay").css("top",  "0 px");	 
		 $("#overlay").css("height", (pos.ST + pos.H) + "px");
		 $("#overlay").css("width",  (pos.W + pos.SL) + "px");
		 
		 var pos_offset_Y = pos.ST + Math.round(pos.H / 2);
		 var pos_offset_X = pos.SL + Math.round(pos.W / 2);
		 $("#lightbox").css("top",  pos_offset_Y + "px");	 
		 $("#lightbox").css("left", pos_offset_X + "px");
                   
		 
		 $("#overlay").css("display", "block");
		 $("#lightbox").css("display", "block"); 
	  }
	  
	  return false;
   }
   
   $("#close").click(LightBox_show_hide);
