var Kokutter = Class.create();
Kokutter.prototype = {
    initialize: function() {
        this.rate = 0;
    },
    initRate: function() {
        var rate = $('rate_p').innerHTML;
        if (rate == '?') {
            this.updateRate();
        } else {
            this.rate = rate;
        }
    },
    updateRate: function() {
        var rate = Math.floor(Math.random()*100) + 1;
        $('rate_p').innerHTML = rate;
        this.rate = rate;
    },
    submit: function() {
        $('form_rate').value = this.rate;
        $('myform').submit();
    }
}

