Text switching with JS

this code is lame