////////////////////////////////////////////////////////////////////////
//
// Filename:    js/popup.js
// Purpose:     Create a popup window and show document
// Method:      Initialize window properties and call window.open()
// Author:      J.van.der.Steen@gobase.org
// Date:        2006-11-25
//
////////////////////////////////////////////////////////////////////////

function document_display(name, loc, opt)
{
    var win;

    win = window.open(loc, name, opt);
    win.focus();
    if (win.opener == null) win.opener = window;
}

function popup_window(loc, w, h)
{
    var opt;

    if (!w) w = 800;
    if (!h) h = 600;
    opt  = 'width=' + w + ',height=' + h;
    opt += ',location=0,toolbar=0,status=0,menubar=0';
    opt += ',resizable=1,scrollbars=1';
    document_display("popup", loc, opt);
}
