Is your site already using one of the JavaScript libraries (jQuery, YUI, etc.)?
The generic term for that kind of behaviour, which pretty much all of the libraries have some form of, is "accordion". There are also countless third-party scripts with many variations on the theme.