function sendPollVote(pollId) {
	var answerId = getCheckedRadioValue(document.getElementsByName('answerId'));

	if (answerId == '') {
		alert('Please select one answer.');

		return false;
	}

	// Create query string...
	var query = "answerId=" + encodeURI(answerId);

	// display notification about sending Ajax request
	reverseDisplay('_pollLinks');
	reverseDisplay('_pollActionStatus');

	// call Ajax
	AJAXRequest(
			'POST',
			'/_user/widget/poll/vote/' + pollId,
			query,
			function(AJAX) {
				if (AJAX.readyState == 4) {
					if (AJAX.status != 200) {
						alert('There was a problem with the request.');
						return;
					}
					reverseDisplay('_pollLinks');
					disableVote();
					reverseDisplay('_pollActionStatus');
					if (AJAX.responseText == 'voted') {
						document.getElementById('_pollAlreadyVoted').style.display = "";
					}

					$
							.ajax( {
								type :"GET",
								url :encodeURI('/_user/widget/poll/results/' + pollId + '?layout=false'),
								success : function(data) {
									document.getElementById("poll_view").innerHTML = data;
								},
								async :true,
								cache :false
							});

				}
			}, true);

	return false;
}

function disableVote(responseText) {
	var oA = document.getElementById('vote');
	if (oA == null)
		return;

	var nod = document.createElement("span");
	nod.setAttribute('style', 'color: #B0B0B0;');

	if (document.body.innerText)
		nod.innerText = oA.innerText; // IE
	else if (document.body.textContent)
		nod.textContent = oA.textContent;// FF

	oA.parentNode.insertBefore(nod, oA);
	oA.parentNode.removeChild(oA);
}