function vote(poll_id, vote_id, url, container) {
    if ((typeof url == 'undefined') || (url == null) || (url == false)) {
        alert('An error occurred processing your vote.  Please refresh the page and try again');
    }
    container = typeof container == 'undefined' ? $('poll_container') : $(container);
    params = 'action=vote&poll_id='+poll_id+'&choice_id='+vote_id;
    fadeOut(container, .75);
    new ajax(url, {method: 'post', postBody: params, onComplete: function(req) { updatePoll(req, container); }});
}

function updatePoll(req, container) {
    setTimeout(
        function() { 
            container.innerHTML = req.responseText;
            fadeIn(container, .75);
        }, 
        750
    )
}