Javascript replaces main text