Using charAt, for IE