This link seems like it might help you. Its basically just setting the display properties of the paragraphs to none and then to block. If you want them to where they stay open and not make the previous one close well you might just have to tweak the code in the link provided a bit.
You could also look at Contractible Headers on the same website...same general idea, but it has an option of keeping other items open when you click a new item, and for the browser to remember the last open items (using a cookie) in case you leave the page and come back.
and added the following code to my stylesheet to match the h3 tags. Is there a simple way to get these to change colour on mouseover, like the "contact page" link above them.
<h3 onClick="expandcontent('sc1')" style="cursor:hand; cursorointer">What is JavaScript?</h3>
<div id="sc1" class="switchcontent">
JavaScript is a scripting language originally developed by Netscape to add interactivity and power to web documents. It is purely client side, and runs completely on the client's browser and computer.
</div>
and added the following code to my stylesheet to match the h3 tags. Is there a simple way to get these to change colour on mouseover, like the "contact page" link above them.
<h3 onClick="expandcontent('sc1')" style="cursor:hand; cursor:pointer">What is JavaScript?</h3>
<div id="sc1" class="switchcontent">
JavaScript is a scripting language originally developed by Netscape to add interactivity and power to web documents. It is purely client side, and runs completely on the client's browser and computer.
</div>
Jon you would need to use a link to make them change color on hover
Code:
<h3><a href="#" onclick="expandcontent('sc1');return false">What is JavaScript?</a></h3>
<div id="sc1" class="switchcontent">
JavaScript is a scripting language originally developed by Netscape to add interactivity and power to web documents. It is purely client side, and runs completely on the client's browser and computer.
</div>
You can actually put an A element inside the h4 and target your style to that instead. In fact, you don't actually need the h4 at all - the script doesn't depend on the type of element being used, just the class and javascript action. So you could leave out the h4 altogether, and put the classheader class in the A element itself, as well as the onlick attribute.
Ranger56: there are two cursor styles because the netscape line of browsers uses a different cursor for the link rollover, so there are two styles to ensure that both netscape and IE get an appropriate cursor. Actually, the default script has no links at all, just the h4's. Javascript and styles are used on those h4's to simulate links, which is a bit redundant.
Grant is correct you don't really need the headers but I see what you are trying to do. You are trying to draw attention to them for the search engines.