  function checkForm_opros (form)
     {
		var c = 0;
		var param = '';

		while (form[c])
		 {
		    if (form[c].type == 'checkbox')
		     {
                  if(form[c].checked==true)
                   {
                   	 param += form[c].name + '=1&';
                   }
		     }
			c++;
		 }
		 if (param!='') opros(param, form);
	 }
  function opros (param, form)
          {
                 var id = document.getElementById("id").value;
                 var url = 'opros.php?id=' + id;
                 this.http = get_http1();
                 this.working = false;

                 // Запрос
		         if (!this.working && this.http)
		          {
		            var http = this.http;
					var method = "POST";
					this.http.open(method, url, true);
					if (method == "POST")
					{
					  param = encodeURI(param);
					  this.http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
					  this.http.setRequestHeader("Content-length", param.length);
					  this.http.setRequestHeader("Connection", "close");
					}
		            //прикрепляем к запросу функцию-обработчик
		            //событий
		            this.http.onreadystatechange = function()
		             {
			            // 4 - данные готовы для обработки
		                if (http.readyState == 4)
		                  {
		                    value = http.responseText;
		                    this.working = false;

                                form.style.display = 'block';
			                	form.innerHTML = value;

		                  }else
		                  {
                             form.innerHTML = '<center><img src="/images/ProgressBar.gif"></center>';
		                  }
		             }
		            this.working = true;
		            this.http.send(param);
		          }
		         if(!this.http)
		          {
		              alert('Ошибка при создании XMLHTTP объекта!')
		          }

          }





























		 function get_http1()
		  {
		    if (window.XMLHttpRequest) {
		        try {
		            return new XMLHttpRequest();
		        } catch (e){}
		    } else if (window.ActiveXObject) {
		        try {
		            return new ActiveXObject('Msxml2.XMLHTTP');
		        } catch (e){}
		        try {
		            return new ActiveXObject('Microsoft.XMLHTTP');
		        } catch (e){}
		    }
		    return null;
		  }