I'm trying to make it so that when they click the first link, it will push the 2nd link and everything below it down. However, it just hides it and there's a bunch of space inbetween the first and second link when both of the child layers are hidden.
<layer> tags?! They went out with the Backstreet Boys. Only spported, I believe, by Netscape 4 (1% of browsers - or less). Use <div>.
The CSS property you should use for this is "display". Moreover, you don't need to initialise the display values in an onload handler. These can be set via stylesheet. These can't be read directly from the element's style object in the toggling function, but that's no problem, we just test for the presence¦absence of a property string..
!elm.style.display => string is empty => stylesheet value used => element is not currently displayed.