I'm trying to figure out how Netscape references objects.

in IE I have a:
div id=foo
then my jscript:
foo.style.visibility = "visible";

i thougth netscape would be:
document.foo.style.visibility = "show";
thats not the case, anyone?