HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/MBoogaard/oosting-horseriding.com/CMS/CMSScripts/Dialogs/modaldialog.js
function modalDialog(url, name, width, height, otherParams, noWopener, forceModal, forceNewWindow, setTitle) {
    
    // Header and footer is greater than before, increase window size accordingly
    if (typeof(height) === "number") {
        height += 66;
    }

    // Set default parameter values
    if (setTitle == undefined) {
        setTitle = true;
    }
    if (forceModal == undefined) {
        forceModal = true;
    }
    if (otherParams == undefined) {
        otherParams = 'toolbar=no,directories=no,menubar=no,modal=yes,dependent=yes,resizable=yes';
    }

    var advanced = false;
    try {
        advanced = window.top.AdvancedModalDialogs;
    } catch (err) {
    }

    if (advanced && !forceNewWindow) {
        window.top.advancedModal(url, name, width, height, otherParams, noWopener, forceModal, setTitle, this);
    }
    else {
        var dHeight = height;
        var dWidth = width;
        if (width.toString().indexOf('%') != -1) {
            dWidth = Math.round(screen.width * parseInt(width, 10) / 100);
        }
        if (height.toString().indexOf('%') != -1) {
            dHeight = Math.round(screen.height * parseInt(height, 10) / 100);
        }

        var oWindow = window.open(url, name, 'width=' + dWidth + ',height=' + dHeight + ',' + otherParams);
        if (oWindow) {
            oWindow.opener = this;
            oWindow.focus();
        }
    }
}