<!--
// Move the clients object relative to cig object.
function move_clients(cig, clients)
{
    var cleft = -534;
    var ctop = -490;
    var obj = cig;

    while (obj.offsetParent)
    {
        cleft += obj.offsetLeft;
        ctop += obj.offsetTop;
        obj = obj.offsetParent;
    }

    clients.style.left = cleft + 'px';

    ctop += cig.offsetHeight + 0;

    // Handle Internet Explorer body margins,
    // which affect normal document, but not
    // absolute-positioned stuff.
    if (document.body.currentStyle &&
        document.body.currentStyle['marginTop'])
    {
        ctop += parseInt(
            document.body.currentStyle['marginTop']);
    }

    clients.style.top = ctop + 'px';
}

// Show clients if it wasn't shown yet or is hidden
// or hide it if it is currently shown
function pop_clients(cig, width, height, borderStyle)
{
    var href = cig.href;
    var clientsdiv = document.getElementById(href);

    if (clientsdiv != null)
    {
        if (clientsdiv.style.display=='none')
        {
            // Show existing clients, move it
            // if document changed layout
            move_clients(cig, clientsdiv);
            clientsdiv.style.display='block';
        }
        else
            // Hide currently shown clients.
            clientsdiv.style.display='none';
        return false;
    }

    // Create clients object through DOM
    clientsdiv = document.createElement('div');

    // Assign id equal to the document it will show
    clientsdiv.setAttribute('id', href);

    clientsdiv.style.display = 'block';
    clientsdiv.style.position = 'absolute';
    clientsdiv.style.width = width + 'px';
    clientsdiv.style.height = height + 'px';
    clientsdiv.style.border = borderStyle;
    clientsdiv.style.textAlign = 'right';
    clientsdiv.style.padding = '0px';
    clientsdiv.style.background = '#1F183A';
    document.body.appendChild(clientsdiv);

    var offset = 0;

    var contents = document.createElement('iframe');
    contents.scrolling = 'no';
    contents.overflowX = 'hidden';
    contents.overflowY = 'hidden';
    contents.frameBorder = '0';
    contents.style.width = width + 'px';
    contents.style.height = (height - offset) + 'px';

    clientsdiv.appendChild(contents);

    move_clients(cig, clientsdiv);

    if (contents.contentWindow)
        contents.contentWindow.document.location.replace(
            href);
    else
        contents.src = href;

    // The script has successfully shown the clients,
    // prevent hyperlink navigation.
    return false;
}
//-->