function vote() {
    var oForm = document.forms[1];
    var sBody = getRequestBody(oForm);
	var req = getXmlHttp() 
	var statusElem = document.getElementById('show')   
	req.onreadystatechange = function() {	
		if (req.readyState == 4) { 
			statusElem.innerHTML = req.statusText
			if(req.status == 200) {
				//alert("Ответ сервера: "+req.responseText);
				statusElem.innerHTML = req.responseText
			}
		}
	}
	req.open('POST',oForm.action, true); 
	req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
	req.send(sBody);
	statusElem.innerHTML = '<i class="loader"></i>'
}



function getRequestBody(oForm) {
        var aParams = new Array();
        for(var i = 0; i < oForm.elements.length; i++) {
          var sParam = encodeURIComponent(oForm.elements[i].name);
		  var sType=oForm.elements[i].type;
		  if (sType == "radio" && oForm.elements[i].checked){
			  sParam += "=";
			  sParam += encodeURIComponent(oForm.elements[i].value);
			  aParams.push(sParam);
		  }
        }
        return aParams.join("&");
}  
	  
function getXmlHttp(){
	var xmlhttp;
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
		xmlhttp = false;
		}
	}
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		xmlhttp = new XMLHttpRequest();
	}
	return xmlhttp;
}