/**
 * @author soenke
 */
var urbanVoting = {
    initialized: false,
    init: function(){
        this.container = document.getElementById("star_long");
        this.id = 0;
        this.form = document.forms["article-voting"];
        this.inputElement = this.form.votes;
        this.ratingElement = document.getElementById("rating");
        this.initialized = true;
    },
    rateArticle: function(votes) {
      if (!this.initialized) 
          this.init();
      var input = parseInt(votes);
      if (input>0) {
          this.form.action = location.href;
          this.inputElement.value = input;
          this.form.submit();
      }
    },
    showRating: function(description) {
      if (!this.initialized) 
          this.init();
      var input = description;  
      this.ratingElement.innerText = input;
    }
};
