repeat function http://stackoverflow.com/questions/202605/repeat-string-javascript