    
<!DOCTYPE html>
<html>
<head>
    <title>Collection Viva Case</title>
        <style type="text/css">
            body, html
            {
                margin: 0; padding: 0; height: 100%; overflow: hidden;
            }

            #viewer
            {
                position:absolute; left: 0; right: 0; bottom: 0; top: 0px; 
            }
        </style>
</head>
<body>
    <h2 id="case-title">{{current_case.title}}</h2>
    <iframe id="viewer" style="width: 100%; height: 100%; border: none; padding: 0px;" src="/ohif/viewer/dicomjson?url=https://www.penracourses.org.uk{% url 'atlas:case_dicom_json' current_case.pk %}"></iframe>

    <script type="text/javascript">
        var win2 = false;

        document.addEventListener("DOMContentLoaded", function() {
            document.title = "Case: {{current_case.title}}";
            console.log('ready');
            let bc = new BroadcastChannel("viva_load");
            bc.onmessage = (event) => {
                console.log("message received");
                console.log(event);
                bc.postMessage({"type": "open-completed", "url" : url});
            };
        });
    </script>

</body>
</html>
