main
 1function toggle(id)
 2{
 3    var icon = document.getElementById('toggle-' + id);
 4    if (icon != null)
 5    {
 6        var childElement = document.getElementById(id);
 7        if (icon.src.indexOf('Plus.gif') != -1)
 8        {
 9            icon.src = icon.src.replace('Plus.gif', 'Minus.gif');
10            if (childElement != null)
11                childElement.style.display = "block";
12        }
13        else
14        {
15            icon.src = icon.src.replace('Minus.gif', 'Plus.gif');
16            if (childElement != null)
17                childElement.style.display = "none";
18        }
19    }
20}
21
22function expand(ids)
23{
24    for (var i = 0; i < ids.length; i++)
25    {
26        var id = ids[i];
27        var icon = document.getElementById('toggle-' + id);
28        if (icon != null)
29        {
30            if (icon.src.indexOf('Plus.gif') != -1)
31            {
32                icon.src = icon.src.replace('Plus.gif', 'Minus.gif');
33
34                var childElement = document.getElementById(id);
35                if (childElement != null)
36                    childElement.style.display = "block";
37            }
38        }
39    }
40}