Add this function to the script:
Code:
function sweeptoggle(state){
var inc=0
while (ccollect[inc]){
ccollect[inc].style.display=state=='contract'? "none" : "block"
inc++
}
}
It can go right before this one:
Code:
function contractcontent(omit){
var inc=0
while (ccollect[inc]){
if (ccollect[inc].id!=omit)
ccollect[inc].style.display="none"
inc++
}
}
Use this markup:
HTML Code:
<a href="javascript:sweeptoggle('contract');">Contract All</a>
<a href="javascript:sweeptoggle('expand');">Expand All</a>
Bookmarks