<!--
// Move the popper object relative to dig object.
function move_popper(dig, popper)
{
    var cleft = 0;
    var ctop = 30;
    var obj = dig;

    while (obj.offsetParent)
    {
        cleft += obj.offsetLeft;
        ctop += obj.offsetTop;
        obj = obj.offsetParent;
    }

    popper.style.left = cleft + 'px';

    ctop += dig.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']);
    }

    popper.style.top = ctop + 'px';
}

// Show popper if it wasn't shown yet or is hidden
// or hide it if it is currently shown
function pop_popper(dig, width, height, borderStyle)
{
    var href = dig.href;
    var popperdiv = document.getElementById(href);

    if (popperdiv != null)
    {
        if (popperdiv.style.display=='none')
        {
            // Show existing popper, move it
            // if document changed layout
            move_popper(dig, popperdiv);
            popperdiv.style.display='block';
        }
        else
            // Hide currently shown popper.
            popperdiv.style.display='none';
        return false;
    }

    // Create popper object through DOM
    popperdiv = document.createElement('div');

    // Assign id equal to the document it will show
    popperdiv.setAttribute('id', href);

    popperdiv.style.display = 'block';
    popperdiv.style.position = 'absolute';
    popperdiv.style.width = width + 'px';
    popperdiv.style.height = height + 'px';
    popperdiv.style.border = borderStyle;
    popperdiv.style.textAlign = 'right';
    popperdiv.style.padding = '0px';
    popperdiv.style.background = '#1F183A';
	popperdiv.style.background.url = 'images/popper-bkg.jpg';
    document.body.appendChild(popperdiv);

    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';

    popperdiv.appendChild(contents);

    move_popper(dig, popperdiv);

    if (contents.contentWindow)
        contents.contentWindow.document.location.replace(
            href);
    else
        contents.src = href;

    // The script has successfully shown the popper,
    // prevent hyperlink navigation.
    return false;
}
//-->
