As you can see, the first statement of the function invokes another function, styleEnabled():

function styleEnabled() {
return ((NS4 && document.test) || IE4);
}

styleEnabled() simply determines if style sheets are enabled by detecting the existance of a pre-defined element. You may recall that we installed a simple SPAN element before the script:

<SPAN ID="test" STYLE="position: absolute;"></SPAN>

The function returns true if IE4 is true, or if both NS4 and document.test evaluate to true. That is, if the user is running Navigator 4.0x, it checks if document.test exists. We do not need to check the existance of the element for Internet Explorer 4.0x, because Explorer cannot disable style sheets. The init() function terminates if the browser doesn't support style sheets.

Another important point in the init() function is that the instances of the popout object are defined as global variables. Their showElement() method is invoked as a deferred script (when the user clicks the tab), so these objects must be accessible. Therefore, they must be global variables.

And last, but not least important, the statement that calls the function:

init();

Why did we use a function, rather than global statements, to initialize the pop-out elements? The answer is very simple. The return statement terminates a function, so it is easy to stop the script if style sheets aren't enabled.