A Javascript function to parse chemical formulas into strings with super/subscript.