optimising

I turned document.getElementById(id) into a variable called object.