Javascript to Progress bar's percentage