function shoratt(dr,dv,wr,wv,mr,mv,yr,yv,r,v)
{
    var shocode = '<center><table><tr><td>' +
    '<acronym title="today\'s rating: ' + dr + ', ' + dv + ' votes" style="cursor:help;">' + makebar(dr,dv) + '</acronym>' +
    '<acronym title="this week\'s rating: ' + wr + ', ' + wv + ' votes" style="cursor:help;">' + makebar(wr,wv) + '</acronym>' +
    '<acronym title="this month\'s rating: ' + mr + ', ' + mv + ' votes" style="cursor:help;">' + makebar(mr,mv) + '</acronym>' +
    '<acronym title="this year\'s rating: ' + yr + ', ' + yv + ' votes" style="cursor:help;">' + makebar(yr,yv) + '</acronym>' +
    '<acronym title="all-time rating: ' + r + ', ' + v + ' votes" style="cursor:help;">' + makebar(r,v) + '</acronym>' +
    '</td></tr></table></center>';
    return shocode;
}
function makebar(r,v)
{
    var moveratingcolor = '#CCCCCC';
    if(v != 0)
    {
        var light = 30;
        var percent_good = r * 10;
        var quantity_of_green = (200 * (percent_good / 100)) - 1;
        quantity_of_green = Math.floor(quantity_of_green);
        var percent_bad = (10 - r) * 10;
        var quantity_of_red = (200 * (percent_bad / 100)) - 1;
        quantity_of_red = Math.floor(quantity_of_red);

        //safety
        quantity_of_red = quantity_of_red +light;
        if(quantity_of_red>255)
        {
            quantity_of_red=255;
        }
        quantity_of_green = quantity_of_green +light;
        if(quantity_of_green>255)
        {
            quantity_of_green=255;
        }

        moveratingcolor = ' rgb(' + quantity_of_red + ', ' + quantity_of_green + ', ' + light + ')';
    }

    var barminheight = 10;
    var barextrapxpervote = 1.5;
    var barmaxheight = 40;
    var barheight = barminheight + (v * barextrapxpervote);
    if(barheight > barmaxheight)
    {
        barheight = barmaxheight;
    }

    var thebarhtml = '<span style="display:inline-block;border:1px solid #000000;width:10px;height:' + barheight + 'px;background-color:' + moveratingcolor + ';"><!-- --></span>';
    return thebarhtml;
}
