Microsoft Internet Explorer does not support the Layers as used in Netscape Navigator.
The problem is that there is no such thing as a layer in Internet Explorer. Yoo can loop through the all object, but this doesn't give you the 'layers' - but everthing in the document. In theory everything in Internet Explorer can be treated as a layer.
You might get some mileage out of the all objects tags() array.