it's the script built in to the normal profile collapsibles, HOWEVER, DON'T use HTML in the heading (like the example Zuno gave has a centering tag). The open/close is stored in a cookie and if you use tags ( < > ) in it, it will save the same cookie for all things with tags in it (at least it used to xD idk now). So if you want extra styling, use a style="" thing after the h2. It toggles when you click the h2, so.. yeah.
<h2 style="text-align: center;">NAME</h2>