I am hiding part of a form, so far all is working great when I expand or contract part of the form manually.

However, I need to expand or contract this form based on the previous content.

Basically using php with Switch Content script II...I just need a little help with the javascript part...as far as overiding the preset...

Using :

<div class="headers"><img src="minus.gif" class="showstate" onClick="expandcontent(this, 'sc1')" />Toggle Extra Fields</div>

This is currently working great, but how do I automate the expansion contraction as soon as the page / form has loaded?