Here's a snipet I've used in the past. It probably only works with IE, but I hope it helps get you started.
--JamIt
<html>
<head>
<SCRIPT type=text/javascript>
function expandColapse(sH,sD)
{
var h, d;
var s;
//h = document.getElementById('headerrow' + sH);
for(i=1; i <= sD; i++)
{
try
{
d = document.getElementById('datarow' + sH + '.' + i);
if (d.style.display == 'none')
{
//h.src = 'test_files/minus.gif';
d.style.display = 'block';
}
else
{
//h.src = 'test_files/plus.gif';
d.style.display = 'none';
}
}
catch(e)
{
}
}
}
</SCRIPT>
</head>
<body>
<table>
<tr><td valign="bottom"><span title="spn1"><a href="javascript:expandColapse(1, 1);">Q1</a></span></td></tr>
<tr id="datarow1.1" style="display:none"><td width="1"></td><td valign="top" nowrap colspan="1">A1</a></td></tr>
<tr><td valign="bottom"><span title="spn2"><a href="javascript:expandColapse(2, 1);">Q2</a></span></td></tr>
<tr id="datarow2.1" style="display:none"><td width="1"></td><td valign="top" nowrap colspan="1">A2</a></td></tr>
</table>
</body>
</html>