function showAll(name, image)
{
    var list = document.getElementsByName(name);
    for (var i = 0; i < list.length; i++) {
        list[i].className = 'shown-rows';
    }
    var img = document.getElementsByName(image);
    for (var i = 0; i < img.length; i++) {
        img[i].innerHTML = '<img title="Hide alternative(s) of this xtuple" src="static/minus.gif" alt="--" />';
    }
}

function hideAll(name, image)
{
    var list = document.getElementsByName(name);
    for (var i = 0; i < list.length; i++) {
        list[i].className = 'hidden-rows';
    }
    var img = document.getElementsByName(image);
    for (var i = 0; i < img.length; i++) {
        img[i].innerHTML = '<img title="Show alternative(s) of this xtuple" src="static/plus.gif" alt="+" />';
    }
}

function toggle(id, id2)
{
    var obj = document.getElementById(id); 
    var obj2 = document.getElementById(id2); 
    if (obj.className == 'hidden-rows') {
        obj.className = 'shown-rows';
        obj2.className = 'hidden-rows';
    } else {
        obj.className = 'hidden-rows';
        obj2.className = 'shown-rows';
    }
}
