The W3C Core DOM - getElementById - method is specified as returning -
null - when it cannot locate an element with a corresponding ID
attribute in the DOM. The - typeof - operator returns the string
"object" when its operand is - null - so neither of these tests will
work. A type-converting test would be more effective in this situation.
Please do not top-post in comp.lang.javascirpt.