You can use the approach that is similar to what we use in the Real Estate template on the Search page.
You wrap the code section you need to hide/show into a DIV:
<A id=handle1 onclick="toggle('1')" href="#">Hide</A>
<DIV id=content1>
...
</DIV>
Toggle function is defined in BeforeShow event of the Search page as follows:
smarty("includes") = smarty("includes") & "<script>"
smarty("includes") = smarty("includes") & "function toggle(id) " & vbcrlf
smarty("includes") = smarty("includes") & "{if (document.getElementById(""content""+id).style.display == ""none"") {"
smarty("includes") = smarty("includes") & "document.getElementById(""content""+id).style.display = ""block"";"
smarty("includes") = smarty("includes") & "document.getElementById(""handle""+id).innerHTML = ""Hide"";"
smarty("includes") = smarty("includes") & "}"
smarty("includes") = smarty("includes") & "else {"
smarty("includes") = smarty("includes") & "document.getElementById(""content""+id).style.display = ""none"";"
smarty("includes") = smarty("includes") & "document.getElementById(""handle""+id).innerHTML = ""Show"";"
smarty("includes") = smarty("includes") & "}}</script>"