Jim,
I fixed the problem on my page. Some of the JS was missing
You can look at the page if you like
http://tandcl.homemail.com.au/sitemap.html
The expand/contract buttons are written by this code
<a href='#' onclick="ExpandAll();return false">Expand All</a> |
<a href='#' onclick="ExpandAll('hide');return false">Collapse All</a><br />
Click <img src="images/display/plus.gif" alt="" width="15" height="15" />
to expand
<img src="images/display/minus.gif" alt="" width="15" height="15"
/> to collapse<br />
As you can see, the plus and minus images are "images/display/plus.gif" and
"images/display/minus.gif"
The expand/contract behaviour is managed by code like this
<ul style="margin-left:0">
<dt><a href="#" onclick="changeVisibility(1);return false">
<img src="images/display/plus.gif" alt="" id="image1" width="15"
height="15" /></a>
<a href="index.html" class="head4">Trevor and Carole's Home
Page</a></dt>
<ul id="ulist1">
<dt><img src="images/display/smfile.gif"><a
href="news.html">News</a></dt>
<dt><img src="images/display/smfile.gif"><a href="dayborn.html">Day
Born</a></dt>
</ul>
.........
</ul>
The <dt></dt> is the heading which displays when contracted. The plus image
has an ID e.g. "image1".
Associated with the <dt> is a <ul></ul> which has an ID of "ulist1" - the
number here (1) must match that in "Image 1" above it
Repeat the pattern for further entries
All you need then is this JS code which I have in external .js
//---------------
function ExpandAll(hide){
var i = 0
while (document.images["image" + ++i])
showVisible(i,hide)
}
//------------------------------
function changeVisibility(i){
var hide = (document.images["image" + i].src.match(/^.+minus\.gif$/)) ?
'hide' : ''
showVisible(i,hide)
}
//------------------------------
function showVisible(i,hide){
var sign = (hide) ? "plus" : "minus"
document.images["image" + i].src = "images/display/" + sign + ".gif"
document.getElementById("ulist" + i).style.display = (hide!='hide') ?
"block" : "none"
}
//---------------
You can also force the list to contract on loading by using
<body onload="ExpandAll('hide')">
Good luck
(I may be abe to help if this sounds too complex.)