To change CSS elements directly via javascript you can do this:
document.querySelector('.progress-bar').style.width = PORCENTAGEM;
In this case you will select the first element with class "progress-bar" and change the width to the value that the PERCENTAGE variable has at the moment.
I'm not sure how you will update the percentage value.
Example: link
By now could do whatever it wants with <progress>
of HTML5, in which case it would do so:
<div class="progress progress-striped active">
<progress max="100" class="progress-bar" value="0"></progress>
</div>
Example: link