var winlist = new Array();

function openWindow(url, name, w, h)
{
    if (typeof(winlist[name]) == 'undefined' || winlist[name].closed) {
        var xy = '';
        var x  = (screen.availWidth - w) / 2;
        var y  = (screen.availHeight - h) / 2;
        winlist[name] = window.open(url, name,
                'toolbar=no,status=no,resizable=yes,scrollbars=yes,width=' +
                w + ',height=' + h + ',top=' + y + ',left=' + x);
    } else {
        winlist[name].focus();
        if (url && winlist[name].location.href != url) {
            winlist[name].location = url;
        }
    }
}

function toggleSection(linkObj, id)
{
    var obj = document.getElementById(id);
    if (obj.style.display == 'none') {
        obj.style.display = '';
        linkObj.className = 'linkSectionCollapse';
    } else {
        obj.style.display = 'none';
        linkObj.className = 'linkSectionExpand';
    }
}