Use element ids. slightly improved JavaScript.