Poll = Class.create();
Poll.prototype = {
  initialize: function() {
    var count = polls.length;
    var random = parseInt(Math.random()*count);
    this.poll = polls[random];
  },

  getHTML: function() {
    return TrimPath.processDOMTemplate(
      'poll_template_jst',
      this.poll
    );
  },

  renderToPage: function() {
    document.write(this.getHTML());
  }
}
