// Check if the browser is IE4
var ie4 = false;
if(document.all) {
    ie4 = true;
}

// Return DIV object based on the ID given
function getObject(id) {
    if (ie4) {
        return document.all[id];
    }
    else {
        return document.getElementById(id);
    }
}

// Toggle the visibility of a specific DIV
function togglePanelVisibility(divId, stateId) {
    var divObj = getObject(divId);

    if(divObj.style.display == 'none') {
        divObj.style.display = 'block';
        if(stateId != null) {
            var stateObj = getObject(stateId);
            stateObj.innerHTML = "-";
        }
    }
    else if(divObj.style.display == 'block') {
        divObj.style.display = 'none';
        if(stateId != null) {
            var stateObj = getObject(stateId);
            stateObj.innerHTML = "+";
        }
    }
}