Implented my own javascript for the progressbar