Convert ans files to html using javascript