If you already have an answer your happy with ignore this but otherwise it might help.<br><br>function toggleDisplay(id) {<br>&nbsp;&nbsp;&nbsp; var el = document.getElementById(id);<br>&nbsp;&nbsp;&nbsp; if(el.className == 'hidden') {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; el.className
 = '';<br>&nbsp;&nbsp;&nbsp; } else {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; el.className = 'hidden';<br>&nbsp;&nbsp;&nbsp; }<br>}<br><br>&lt;div id='toHide'&gt;My div content&lt;/div&gt;<br>&lt;a href='#' onclick=&quot;toggleDisplay('toHide'); return false;&quot;&gt;Toggle display&lt;/a&gt;
<br><br>You might want to perform a better check than just looking for an exact match on the className, like prototype's Element.hasClassName but this is just a quick sample to get you started.<br><br><br>