PollPanel = newClass(null, {
    constructor: function(options) {
        this.jsCommonData = options.jsCommonData;

        $(".voteButton").bind('click', {env: this}, this.vote);
    },

    vote: function(e) {
        var env = e.data.env;

        if ($.cookie(env.jsCommonData["pollId"]) >= env.jsCommonData["maxVoteCount"]) {
            showMessageParam(env.jsCommonData["errorTitle"], env.jsCommonData["errorMessage"], false);
        } else {
            location.href = env.jsCommonData["voteLink"];
        }
        e.preventDefault();
        return false;
    }
});