(function () {

    (OpenWindowSafelyHandler = function (browserNotTerminatedError) {
        this.browserNotTerminatedError = browserNotTerminatedError;

    }).prototype = {

        openWindowSafely: function (url, target) {

            try {
                window.open(url, target);
            } catch (err) {
                // catch potential script errors and show error message; probably this will only happen in the QA with IE11
                // see http://stackoverflow.com/questions/34868680/internet-explorer-11-takes-excessively-long-to-shutdown
                alert(this.browserNotTerminatedError); // trigger custom QA alert box
            }

        }
    };
})();
