﻿function onRatingClicked(url,updatableArea,refreshFunction) {


    var date = new Date();
    var moddedUrl = url + '&time=' + date.getMilliseconds();

    new Ajax.Updater(
        updatableArea,
        moddedUrl,
        {
            method: 'post',
            onSuccess: function(transport) {

                callRefresh(refreshFunction);

            }
        }
    );
    }

    function callRefresh(refreshFunction) {

        this[refreshFunction]();
        
    }
 
function refreshAverageRating(averageRatingDisplayArea,url) {

    var date = new Date();
    var moddedUrl = url + '&time=' + date.getMilliseconds();
    
    new Ajax.Updater(
            averageRatingDisplayArea,
            moddedUrl,
            {
                method: 'post',
                onSuccess: function(transport) {

                }
            }
        );
}