But here's my next problem. I think it's a problem with this line, as indicated by the "resize":
checkBrowserWidth();
attachEventListener(window, "resize", checkBrowserWidth, false);
Basically the code is only executing if a user resizes his browser. How would I make it so the code checks...