The dark despair of DOCTYPEs
It bears repeating: the use of different DOCTYPEs can change the DOM interface in unexpected ways. It shouldn't, but it does. To wit:
document.documentElement.scrollTop...depending on which DOCTYPE is used. (The former property doesn't disappear, but stops being updated, returning 0 (zero) no matter how much you scroll). This seems to be true for both IE6 and Firefox. So be sure to test for both if your web app depends on accurately measuring the scroll offset of a page. Double-especially if your app is something to be dropped into existing webpages with DOCTYPEs you cannot know in advance.
IE has a neato
document.compatModeproperty that returns "BackCompat" if the DOCTYPE is allowing the page to behave like old-school IE, with the broken box model and the stuff and the thing. "CSS1Compat" indicates DOCTYPE-triggered "standards-compliance" mode. So you can have your app test for this and adjust accordingly.