Change register javascript