Es casi lo mismo:
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>test</title>
<script>
function toggle(el,im){
el.style.display=el.style.display!='none'?'none':'block';
im.src=el.style.display=='none'?'mas.gif':'menos.gif';
}
</script>
</head>
<body>
<div style="cursor:pointer" onclick="toggle(document.getElementById('capaAOcultar'),this.childNodes[0])"><img src="menos.gif" width="12" height="12" /> titulo</div><div id="capaAOcultar">bla bla bla bla </div>
</body>
</html>