I think it's ok to use 'document' as a variable name. 99% of code should not access the global document.