function sendVote(poll_id) {
		var loader = document.getElementById('loader_' + poll_id);		
		loader.style.display = 'inline';
		var answer = '';
		var poll_form = document.getElementById('poll_' + poll_id);	
		for (var i=0; i < poll_form.answer.length; i++) {
			if (poll_form.answer[i].checked) {
				answer = poll_form.answer[i].value;
			}
		}
		
		if(answer == '') return;
			  
		var bingArgs = {
			method: 'post',
			postBody: 'action=poll_form&poll_id=' + poll_id + '&poll_answer=' + answer,
			onSuccess: function(data) {
				fadeBlock('notify_box_' + poll_id,'open');
				loader.style.display = 'none';
				var response = data.responseText;
				var notify = document.getElementById('notify_' + poll_id);
				if(response.indexOf('Thank') != -1) {
					//Success! Display success message and redirect.
					
					notify.style.color = 'green';
					notify.innerHTML = response;
					document.getElementById('poll_' + poll_id +'_form').style.display = 'none';
					pollResults(poll_id);
				} else {
					//Display error message from the server.
					notify.style.color = 'red';
					notify.innerHTML = response;
				}
			},
			on404: function(data) {
				alert('Error 404: location ' + data.statusText + ' was not found.');
			},
			onFailure: function(data) {
				alert('Error ' + data.status + ' -- ' + data.statusText);
			}
		}
		
		new Ajax.Request('/PHP/trigger.php', bingArgs);
	}
	
	function enabledButton(btn) {
		$(btn).disabled=false;	
	}

	function pollResults(poll_id) {
		document.getElementById('loader_' + poll_id).style.display = 'inline';		
		var bingArgs = {
			method: 'post',
			postBody: 'action=poll_results&poll_id=' + poll_id,
			onSuccess: function(data) {
				fadeBlock('poll_' + poll_id + '_results','open');
				document.getElementById('poll_' + poll_id + '_results').innerHTML = data.responseText;
			},
			on404: function(data) {
				alert('Error 404: location ' + data.statusText + ' was not found.');
			},
			onFailure: function(data) {
				alert('Error ' + data.status + ' -- ' + data.statusText);
			}
		}		
		new Ajax.Request('/PHP/trigger.php', bingArgs);
	}

