http://www.w3schools.com/js/js_loop_while.asp