function submitPoll(answerID,host,pollID,id)
{	
	url = "http://" + host + "/community/polls/answerPoll.html?" + answerID;

	//alert(pollID);
	
	/* error checking ... */	
	if (answerID == '')
	{
		alert('Please make a selection.');
		return false;
	}
		
	new Ajax.Request(url, {
		method: 'post',
		parameters: {p: pollID},
		
		onSuccess: function(transport) {
			//var json = transport.responseText;
			
			//alert(json)
			var json = transport.responseText.evalJSON();
			
			if (json.success == true)
			{
				//alert("Thank you for voting!")
				//alert('done');
				$('poll_' + id).innerHTML = 'Thank you for voting.';
				$('poll_' + id).setStyle({'marginBottom': '10px'});
				$('poll_' + id).setStyle({'fontWeight': '700'});
				$('poll_' + id).setStyle({'marginLeft': '15px'});
			}
			else
			{
				var errMsg=/already answered poll question/gi;
				if (json.failed.match(errMsg))
				{					
					alert('You have already voted for this category.');
				}
				else
				{
					alert("Please try again later.")	
				}
			}
		}
	});
		
	return false;
}