<%@ Page Title="" Language="C#" MasterPageFile="~/PatientAccess/PAAdmin/AdminBase.Master" AutoEventWireup="true" CodeBehind="TemplateViewer.aspx.cs" Inherits="Axium.Web.PAAdmin.TemplateEditorTab.TemplateViewer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Header" runat="server">
    <style type="text/css">
        .headerRow {
            background-color: #808080;
            text-align: right;
            height: 25px;
            padding: 10px;
        }
        .headerRow .closeButton {
            float: right;
            margin-top: 3px;
        }
        .content {
            overflow: auto;
            border: 1px solid #CCC;
            margin: 5px 0 0 5px;
            padding: 5px;
            resize: none;
        }
        .content:disabled {
            background-color: #FFF;
            color: #000;
        }
    </style>
    
    <script type="text/javascript">
        function resizeWindow() {
            var winW = 0;
            var winH = 0;
            if (document.body && document.body.offsetWidth) {
                winW = document.body.offsetWidth;
                winH = document.body.offsetHeight;
            }
            if (document.compatMode == 'CSS1Compat' &&
                document.documentElement &&
                document.documentElement.offsetWidth) {
                winW = document.documentElement.offsetWidth;
                winH = document.documentElement.offsetHeight;
            }
            if (window.innerWidth && window.innerHeight) {
                winW = window.innerWidth;
                winH = window.innerHeight;
            }

            var elmt = document.getElementById('<%=Content.ClientID%>');
            elmt.style.width = winW - 22 + 'px';
            elmt.style.height = winH - 67 + 'px';
        }

        $(document).ready(function () {
            resizeWindow();

            window.onresize = function () {
                resizeWindow();
            };
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Container" runat="server">
    <div class="headerRow">
        <span class="closeButton"><asp:Button ID="CloseBtn" runat="server" Text="Close" onClientClick="window.close()" CssClass="ButtonGrey" /></span>
    </div>
    <asp:TextBox runat="server" ID="Content" CssClass="content" TextMode="MultiLine" ReadOnly="True"></asp:TextBox>
</asp:Content>
