﻿doPopup = function(language)
{
    var suffix = language.replace("(", "_");
    suffix = suffix.replace(")", "_");
    var mpe = $find("ModalPopupBehavior_" + suffix);
    if (mpe != null)
    {
        mpe.show();
    }
}

closeModalDialog = function()
{
    var result = true;
    // TBD: close the open popup (if there is one) and return false
    return result;
}

if (window.onbeforeunload) 
{
    window.onbeforeunload = closeModalDialog;
}

