An adaptation of the $(document).ready() function from jQuery for use in simple JavaScript scenarios.