﻿function AlertOnContinue()
{
    setTimeout('AlertOnContinueDone();', 100);
}
function AlertOnContinueDone()
{
    if (oOnContinueExitPopup)
    {
        eval(oOnContinueExitPopup);
    }

    oOnContinueExitPopup = null;

    return true;
}

var oOnContinueExitPopup;
function Alert(sTitle, sMessage, iHeight, iWidth, oOnContinue)
{
    try
    {
        var iErrorOnLine = 0;
        var sURL;


        if (!iWidth)
        {
            iWidth = 300;
        }


        //alert(sMessage)
        //oObject.text = sMessage;


        iErrorOnLine = 60;
        //sURL = '/JHH_Popup.aspx?SS=' + sSessionKey + '&CurrentUDV=' + iCurrentUDV + '&Title=' + sTitle;
        $get('ctl00_Popup_LBL_Title').innerHTML = sTitle;

        iErrorOnLine = 100;
        //var sValue = showModalDialog(sURL, sMessage, 'scroll:1;resizable:yes;help:0;status:0;dialogWidth:' + iWidth + 'px;dialogHeight:' + iHeight + 'px;');

        oTable = $get('ctl00_Popup_TBL_Alert');
        oTable.width = iWidth + 'px';

        if (iHeight)
        {
            oTable.height = iHeight + 'px';
        }

        $get('ctl00_Popup_P_Body').innerHTML = sMessage;

        oOnContinueExitPopup = oOnContinue;

        $get("ctl00_Popup_BTN_ShowPopup").click();

        //$get("ctl00_Popup_BTN_Close").focus();

    }
    catch (oErr)
    {
        JSError('Alert', oErr + '\n\n iErrorOnLine=' + iErrorOnLine);
        return false;
    }
}
