<body onload="loaded()">
<script>
function loaded() {
    var msg = { "width": window.outerWidth, "height": window.outerHeight };
    if (window.dialogArguments != undefined) {
        window.returnValue = msg;
        window.close();
    } else
        window.opener.postMessage(msg, '*');
}
</script>
</body>
