I've thought about this... and there may in fact be a way to do it without even using Javascript! HTML5 introduced the "Progress" element, maybe give this article a read through (and for further reading, this bit of documentation)? On the downside, not all browsers can render it (though 89% of browsers can) and if you're okay with it looking nice on most, but not all, browsers, then that's fine (it doesn't work in iOS Safari very well, or the Opera Mini browser at all).