This sounds more complicated that what it is. Anyone who knows a little javascript should be able to assist me with this. Basically, I would like a simple function that sets all div tags underneath a specified parent tag to have their style set to "display: none;".

So for example, I might have this in the parent tag (the parent tag will most likely always be a div tag).

Code HTML4Strict:
<div onload="collapse_all(this)">
   <div>
      <img src="spacer.gif"/>
      <img src="spacer.gif"/>
      <img src="spacer.gif"/>
      <table><tr><td>
         A bunch of text
      </td></tr></table>
      <div>
         <img src="spacer.gif"/>
         <img src="spacer.gif"/>
         <img src="spacer.gif"/>
      </div>
   </div>
</div>

Using that code above as an example, I'd like all the div tags positioned under the parent div tag (the div tag that calls the onload event) to have their style set to "display: none;". The main purpose of this is to make the code neat so I don't have to have style="display: none;" attribute for every div tag (which could be quite a few).

Cheers!