var wndDisplayReg = null;
var wndDisplayOld = null;
function DisplayImage(szImage,szProductName,nWidth,nHeight)
{
    if (nWidth==null)
        nWidth="600";
    if (nHeight==null)
        nHeight="400";
    var szBrowser       = navigator.appName
    var nBrowserVersion = parseInt(navigator.appVersion)
    if (((szBrowser == "Microsoft Internet Explorer") || (szBrowser == "Netscape")) && (nBrowserVersion < 4))
    {
        var nWidthAdjust  = eval(nWidth  + "+20");
        var nHeightAdjust = eval(nHeight + "+32");
        if ((wndDisplayOld != null) && (wndDisplayOld.closed == false))
            wndDisplayOld.close()
        wndDisplayOld = window.open(szImage, "DisplayOld", "resizable=no,status=no,width=" + nWidthAdjust + ",height=" + nHeightAdjust);
    }
    else
    {
        if (wndDisplayReg != null)
        {
            if (wndDisplayReg.closed == false)
            {
                wndDisplayReg.close();
            }
            wndDisplayReg = null;
        }
        
        var nWidthAdjust  = eval(nWidth  + "+20");
        var nHeightAdjust = eval(nHeight + "+30");

        wndDisplayReg = window.open("", "Display", "status=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,width=" + nWidthAdjust + ",height=" + nHeightAdjust);
        wndDisplayReg.document.open();
        wndDisplayReg.document.write("<HTML>");
        wndDisplayReg.document.write("<head>");
        wndDisplayReg.document.write("<!-- Copyright © 2004-8 Fourth Ray Software -->");
        wndDisplayReg.document.write("</head>");
        wndDisplayReg.document.write("<title>Fourth Ray Software - " + szProductName + "</title>");
        wndDisplayReg.document.write("<body bgcolor='#000000'>");
        wndDisplayReg.document.write("<a href='javascript: void(null)' onClick='self.close()'><img src='" + szImage + "' align='center' width='" + nWidth + "' height='" + nHeight + "' border='0' title='Click image to close window'></A>");
        wndDisplayReg.document.write("</BODY>");
        wndDisplayReg.document.write("</HTML>");
        wndDisplayReg.document.close();
        wndDisplayReg.focus();
    }
}

function CloseWin()
{
    if (wndDisplayReg != null)
    {
        if (wndDisplayReg.closed == false)
            wndDisplayReg.close();
        wndDisplayReg = null;
    }
    else if (wndDisplayOld != null)
    {
        if (wndDisplayOld.closed == false)
            wndDisplayOld.close();
        wndDisplayOld = null;
    }
}
