/* 
   This Javascript code was generated by Jemplate, the Javascript
   Template Toolkit. Any changes made to this file will be lost the next
   time the templates are compiled.

   Copyright 2006 - Ingy döt Net - All rights reserved.
*/

if (typeof(Jemplate) == 'undefined')
    throw('Jemplate.js must be loaded before any Jemplate template files');

Jemplate.templateMap['meter.tmpl'] = function(context) {
    if (! context) throw('Jemplate function called without context\n');
    var stash = context.stash;
    var output = '';

    try {
output += '<span class="progressmeter">\n    <div class="meter" style="width: ';
//line 2 "meter.tmpl"
output += stash.get('barwidth');
output += 'px;">\n        <div class="amount" style="width: ';
//line 3 "meter.tmpl"
output += stash.get('currentbarwidth');
output += 'px;"></div>\n        <div class="percent" style="width: ';
//line 4 "meter.tmpl"
output += stash.get('barwidth');
output += 'px">';
//line 4 "meter.tmpl"
output += stash.get('percent');
output += '%</div>\n    </div>\n    <table>\n        <tbody>\n            <tr>\n                <th>Status:</th>\n                <td>';
//line 15 "meter.tmpl"
if (stash.get('finished')) {
output += '\n                    <span class="finished">Transfer complete  (';
//line 12 "meter.tmpl"
output += stash.get('size');
output += ')</span>';
}
else {
output += '\n                    ';
//line 14 "meter.tmpl"
output += stash.get('received');
output += ' of ';
//line 14 "meter.tmpl"
output += stash.get('size');
}

output += '\n                </td>\n            </tr>\n            <tr>\n                <th>Time:</th>\n                <td>';
//line 20 "meter.tmpl"
output += stash.get('elapsedtime');
output += ' (~ ';
//line 20 "meter.tmpl"
output += stash.get('remainingtime');
output += ' to go)</td>\n            </tr>\n            <tr>\n                <th>Rate:</th>\n                <td>';
//line 24 "meter.tmpl"
output += stash.get('currentrate');
output += ' (avg ';
//line 24 "meter.tmpl"
output += stash.get('rate');
output += ')</td>\n            </tr>\n        </tbody>\n    </table>\n</span>\n';
    }
    catch(e) {
        var error = context.set_error(e, output);
        throw(error);
    }

    return output;
}

