pgo said it, I'll just throw out some notes:
document.all is a reaaaaally old and outdated method of grabbing something in the page. getElementById does the same thing, but is now the preferred method, and is part of the standard, so it will continue to be supported well into the future, whereas document.all won't be.
For getElementById, The ID in question is the HTML attribute "ID", which can be applied to almost every element. It's meant to be a unique identifier, so if (heaven forbid) you had two elements with the same ID, it should only ever return the first one on the page.