A simple JavaScript function for dealing with DOM loading in modern browsers.