function togglecategory(spanid) {
    var span = document.getElementById("category_" + String(spanid));
    var arrow = document.getElementById("arrow_" + String(spanid));

    if (span.style.display == "none") {
        // Expand category
        span.style.display = "";
        arrow.src = pixpath + '/i/arw_on.gif';
    } else {
        // Collapse category
        span.style.display = "none";
        arrow.src = pixpath + '/i/arw_off.gif';
    }
}
