/*******************************************************************************
*
* Javascript Library for Bristol Manufacturing, Inc
*
* Copyright 2004 (c) Bristol Manufacturing, Inc All Rights Reserved.
*
* Revisions
* ------------------------
* Mar 17, 2004 - SEV - Created
*
*******************************************************************************/

isNS4 = (document.layers) ? true : false;
isIE4 = (document.all && !document.getElementById) ? true : false;
isIE5 = (document.all && document.getElementById) ? true : false;
isNS6 = (!document.all && document.getElementById) ? true : false;

function getObj(m)
{
    if (isNS4){
        elm = document.layers[m];
    }
    else if (isIE4){
        elm = document.all[m];
    }
    else if (isIE5 || isNS6){
        elm = document.getElementById(m);
    }
    return elm;
}

function displayDesc(strmsg)
{
    helpWnd = window.open('','','top=150,left=150,width=400,height=450');
    if (!helpWnd.opener) helpWnd.opener = self;
    with (helpWnd.document)
    {
        write('<html>\n');
        write('<head><title>Form Help</title></head>\n');
        write('<body>\n');
        write('<table border="0" height="100%" width="100%">\n<tr><td valign="top">\n');
        write('<p style="font-weight: bold">Listed below is a list of errors that were encountered while processing your form</p>\n');
        write('<ul>\n');
        write(strmsg);
        write('</ul>\n');
        write('\n<br><br>\n');
        write('\n</td></tr><tr><td valign="bottom">\n');
        write('<hr />\n');
        write('click <a href="javascript:window.close();">here</a> to close this window\n');
        write('</td></tr>\n</table>\n');
        write('</body>\n</html>\n');
    }
}

function displayPopupImg(sImageUri)
{
    imgWnd = window.open('','','top=100,left=100,width=500,height=500');
    if (!imgWnd.opener) imgWnd.opener = self;
    with(imgWnd.document)
    {
        write('<html>\n');
        write('<head><title>Popup Image</title></head>\n');
        write('<body>\n');
        write('<img src="' + sImageUri + '" alt="" />\n');
        write('</body>\n</html>\n');
    }
}
