Proper JavaScript for changing link's name