function checkVote(id) {
    var type  = $('#type_' + id).val();
    var voted = mtGetCookie( type + '_id' );
    if (!voted) {
        return;
    }
    var voted_array = voted.split(',');
    for (var poll in voted_array) {
        if (voted_array[poll] == id) {
            var $vform = $('#' + type + '-form-' + id);
            $vform.hide();
            if (!$('#' + type + '-results-' + id).html()) {
                $vform.get(0).results_only.value = '1';
                submitVote(id);
            }
        }
    }
}
