Added a window.load check for IE7 and 8