	var req_polltag = null;

	function PollClick(pollid, polltag, questionid, answerid)
	{
		req_polltag = polltag;

//		$("poll_" + req_polltag).innerHTML = "Saving... <img src='/img/indicator.green.gif'/>";

		new Ajax.Request(
			"/poll/vote",
			{
				method: 'get',
				parameters: "pollid=" + pollid + "&a[" + questionid + "]=" + answerid,
				onComplete: PollReceived
			});
	}

	function PollSubmit(pollid, polltag)
	{
		$.get("/poll/vote?" + $("#poll_" + pollid).serialize(), function(data){
			if(data.trim().slice(0, 1) == "_")
				$("#poll_" + polltag).html(data.trim().slice(1));
		});
	}
