<%@ Page Title="" Language="C#" MaintainScrollPositionOnPostback="true" Theme="Main_Theme"
    AutoEventWireup="false" MasterPageFile="~/SiteMaster.Master" CodeBehind="RiskRegisterViewPage.aspx.cs"
    Inherits="MKInsight.Online.RRAM2.RiskRegisterView.RiskRegisterViewPage" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="UIWebControls" Namespace="UIWebControls" TagPrefix="cc4" %>
<%@ Register Src="../UIControls/MessageBox.ascx" TagName="MessageBox" TagPrefix="uc1" %>
<%@ Register Src="../UIControls/PopupMessageBox.ascx" TagName="PopupMessageBox" TagPrefix="uc3" %>
<%@ Register Src="../UIControls/RisksControls/EntityTreeScoreItem.ascx" TagName="EntityTreeScoreItem" TagPrefix="uc2" %>
<%@ Register Src="../UIControls/RisksControls/RisksResult.ascx" TagName="RisksResult" TagPrefix="uc4" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script type="text/javascript" src="../scripts/jquery/jquery_min.js"></script>
    <script type="text/javascript" src="../scripts/jquery/jquery.box-min.js"></script>

    <link rel="stylesheet" type="text/css" href="../scripts/jquery/jqbox.css" />
    <style type="text/css">
        .IE8Fix {
            z-index: 100;
        }
    </style>

    <script type="text/javascript">

        try {

            var is_chrome = navigator.userAgent.indexOf('Chrome') > -1;
            var is_firefox = navigator.userAgent.indexOf('Firefox') > -1;

            if (is_firefox || is_chrome) {
                //
            }
            else {
                $(document).bind('cbox_open', function () {
                    $('html').css({ overflow: 'hidden' });
                }).bind('cbox_closed', function () {
                    $('html').css({ overflow: 'auto' });
                });
            }

        }
        catch (err) { }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="c_M" runat="server">

    <div class="divfright">

        <div style="padding-top: 7px; padding-right: -10px;">
            <asp:ImageButton ID="btn_DocExport" runat="server" ImageUrl="../images/word16.png" />
            <asp:ImageButton ID="btn_ExlsExport" runat="server" ImageUrl="../images/excel16.png" />
        </div>

    </div>

    <asp:UpdatePanel ID="up_E" runat="server">
        <ContentTemplate>
            <div>
                <uc1:MessageBox ID="usc_M" runat="server" />
            </div>

        </ContentTemplate>
    </asp:UpdatePanel>
    <%--Tree section --%>
    <div runat="server" id="Div_Session">
        <asp:LinkButton runat="server" ID="btn_Notify" OnClientClick="$.colorbox({ transition: 'none', width: '95%', height: '90%', iframe: true,href:'../ConfigurationPages/AssessmentSessionSendEmails.aspx?clientr=true' });  return false;"></asp:LinkButton>
        <asp:LinkButton ID="btn_ManageInvitaions" runat="server" Text="Manage Inviations" OnClientClick="$.colorbox({ transition: 'none', width: '95%', height: '90%', iframe: true,href:'../OnlineAssessments/RiskAssessmentInvitationsPage.aspx?clientr=true' });return false;"></asp:LinkButton>
        <asp:ImageButton ID="btn_SelfAssessmentInfo" runat="server" ImageUrl="~/images/info24.png" Visible="False" />
        <uc3:PopupMessageBox ID="usc_PopupMessage" runat="server" />
        <div style="height: 10px;"></div>
    </div>

    <asp:UpdatePanel ID="up_FA" runat="server">
        <ContentTemplate>
            <asp:Literal ID="lit_P" runat="server"></asp:Literal>
            <asp:Panel ID="pnl_FrameAHeader" runat="server" CssClass="panelheader"
                Width="100%">
                <div style="padding: 5px; cursor: pointer; vertical-align: middle;">
                    <div style="color: #000000;" class="divfleft">
                        <asp:Label ID="lbl_FameAAS" runat="server" Text="Assessment Sessions"></asp:Label>
                    </div>
                </div>
            </asp:Panel>
            <div class="panelouterlines" runat="server" id="dFA">
                <asp:Panel ID="pnl_FrameAOuter" runat="server" CssClass="panelbody" Width="99%">
                    <table class="divfleft" style="border-spacing: 2px; padding: 4px;">
                        <tr>
                            <td>
                                <table style="border-spacing: 4px; padding: 2px;">
                                    <tr>
                                        <td>
                                            <asp:Label ID="lbl_FrameACu" runat="server" Text="Current Assessment StateStore.Session"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="lbl_FrameASessionName" runat="server">Assessment StateStore.Session Name</asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="lbl_FrameACreatedDate" runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="lbl_FrameASuggestedEndDate" runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:LinkButton ID="btn_InvitationChart" runat="server" Text="InvitationStatusPerActiveAssessmentSession" OnClientClick="$.colorbox({ transition: 'none', width: '98%', height: '90%', iframe: true,href:'AssessmentSessionOnlineInvitationsChart.aspx?clientr=true' });return false;"></asp:LinkButton>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </div>
        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="tbl_RSA" />
        </Triggers>
    </asp:UpdatePanel>
    <%--Data, charts & tables --%>
    <div style="height: 2px;"></div>
    <asp:UpdatePanel ID="up_FB" runat="server">
        <ContentTemplate>

            <asp:Panel ID="Pnl_FrameBHeader" runat="server" CssClass="panelheader"
                Width="100%">
                <div style="padding: 5px; cursor: pointer; vertical-align: middle;">
                    <div style="color: #000000;" class="divfleft">
                        <asp:Label ID="lbl_FrameBTitle" runat="server" Text="2. Process Universe"></asp:Label>
                    </div>
                    <div style="margin-left: 20px;" class="divfleft">
                        <asp:Label ID="lbl_PR" runat="server">(Show Details...)</asp:Label>
                    </div>

                </div>
            </asp:Panel>
            <div class="panelouterlines" runat="server" id="dFB">
                <asp:Panel ID="pnl_PR" runat="server" Width="99%">

                    <asp:Panel ID="tbM" runat="server" CssClass="w-bar">

                        <asp:LinkButton runat="server" ID="tbl_AuditUniverse" CssClass="w-button" Style="background: url(../images/tree32.png); ">
                            <asp:Label ID="tbl_AuditUniverseLabel" runat="server"></asp:Label>
                        </asp:LinkButton>

                        
                        <asp:LinkButton runat="server" ID="tbl_ProcessUniverse" CssClass="w-button" Style="background: url(../images/tree32.png); ">
                            <asp:Label ID="tbl_ProcessUniverseLabel" runat="server"></asp:Label>
                        </asp:LinkButton>
                                                
                        <asp:LinkButton runat="server" ID="tbl_DepartmensSections" CssClass="w-button" Style="background: url(../images/tree32.png); ">
                            <asp:Label ID="tbl_DepartmensSectionsLabel" runat="server"></asp:Label>
                        </asp:LinkButton>

                    </asp:Panel>
                    
                    <table>
                        <tr>
                            <td style="vertical-align: top;">
                                
                                <asp:TreeView ID="tr" runat="server" OnSelectedNodeChanged="OnTreeNodeChanged"
                                    OnTreeNodePopulate="PopulateNode"
                                    NodeWrap="True" Width="800px">
                                </asp:TreeView>
                            </td>
                            <td style="vertical-align: top;">
                                <table style="border: solid 1px whitesmoke;" id="tb_weightScore" runat="server" visible="false">
                                    <tr>
                                        <td>
                                            <h3>
                                                <asp:Label ID="lbl_EntityName" runat="server"></asp:Label></h3>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div>
                                                <table>


                                                    <tr>
                                                        <td style="vertical-align: top;">
                                                            <uc2:EntityTreeScoreItem ID="u_EntityScore" runat="server" />
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                            <table id="tb_Weight" runat="server">

                                                <tr>
                                                    <td style="vertical-align: top;">
                                                        <asp:Label ID="lbl_FrameBChangeWeightTitle" runat="server" Text="Change Weighting:"></asp:Label>
                                                    </td>
                                                    <td style="width: 200px;">
                                                        <table>
                                                            <tr>
                                                                <td>
                                                                    <asp:TextBox ID="txt_FrameBImpactWeight" runat="server"></asp:TextBox>
                                                                </td>
                                                                <td>
                                                                    <asp:Label ID="lbl_FrameBImpactWeight" runat="server" Font-Bold="True"></asp:Label>
                                                                    <asp:TextBox ID="lbl_FrameBWeightChanged" runat="server" Font-Bold="True" Width="25"></asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="2">
                                                                    <asp:Button ID="btn_WeightingOk" runat="server" />
                                                                </td>
                                                            </tr>
                                                        </table>
                                                        <cc1:SliderExtender ID="FrameBexS" runat="server" BehaviorID="txt_FrameBImpactWeight" BoundControlID="lbl_FrameBWeightChanged" Decimals="0" EnableHandleAnimation="true" HandleImageUrl="~/images/slider.png" Maximum="100" Minimum="0" TargetControlID="txt_FrameBImpactWeight">
                                                        </cc1:SliderExtender>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>

                </asp:Panel>
            </div>
            <asp:Button ID="btn_partialPostback" runat="server"  OnClick="btn_partialPostback_Click" style="display:none;"  />
        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="tr" />
            <asp:PostBackTrigger ControlID="btn_partialPostback" />
        </Triggers>
    </asp:UpdatePanel>
    <%--Data, charts & tables --%>
    <br />
    <asp:UpdatePanel ID="up_FC" runat="server">
        <ContentTemplate>
            <cc1:CollapsiblePanelExtender ID="cpe_FrameC" runat="server" CollapseControlID="pnl_FrameCHeader"
                CollapsedImage="~/images/expand16.png" ExpandControlID="pnl_FrameCHeader"
                ExpandedImage="~/images/collapse16.png" ImageControlID="img_FrameC" SuppressPostBack="true"
                TargetControlID="pnl_FrameCBody" TextLabelID="lbl_FrameC" Collapsed="false">
            </cc1:CollapsiblePanelExtender>
            <asp:Panel ID="pnl_FrameCHeader" runat="server" CssClass="panelheader"
                Width="100%">
                <div style="padding: 5px; cursor: pointer; vertical-align: middle;">
                    <div style="color: #000000;" class="divfleft">
                        <asp:Label ID="lbl_FrameCTitle" runat="server" Text="3. Synthetic data views"></asp:Label>
                    </div>
                    <div style="margin-left: 20px;" class="divfleft">
                        <asp:Label ID="lbl_FrameC" runat="server">(Show Details...)</asp:Label>
                    </div>
                    <div style="vertical-align: middle;" class="divfright">
                        <asp:Image ID="img_FrameC" runat="server" ImageUrl="~/images/expand16.png" />
                    </div>
                </div>
            </asp:Panel>
            <div class="FrameBOuterDiv" runat="server" id="dFC">
                <table style="border-spacing: 0px; padding: 0px; width: 100%;">
                    <tr>
                        <td class="left">

                            <asp:Panel ID="tbFrameCActions" runat="server" CssClass="w-bar" Visible="false">
                                <asp:LinkButton runat="server" ID="tbl_New" CssClass="w-button" Style="background: url(../images/add32.png); " OnClientClick="$.colorbox({ transition: 'none', width: '98%', height: '98%', iframe: true,href:'../RiskView/ClearRiskDataBeforeAddingNewRisk.aspx?new=1&clientr=true&popup=1' });return false;">
                                    <asp:Label ID="tbl_NewLabel" runat="server"></asp:Label>
                                </asp:LinkButton>

                                <asp:LinkButton runat="server" ID="tbl_HeatMap" Enabled="false" CssClass="w-button" Style="background: url(../images/heatmap32.png); " OnClientClick="$.colorbox({ transition: 'none', width: '98%', height: '90%', iframe: true,href:'../Reports/HeatMaps/HeatMapReports.aspx?clientr=true&popup=1' });return false;">
                                    <asp:Label ID="tbl_HeatMapLabel" runat="server"></asp:Label>
                                </asp:LinkButton>

                                <asp:LinkButton runat="server" ID="tbl_Chart" Enabled="false" CssClass="w-button" Style="background: url(../images/pie32.png); " OnClientClick="$.colorbox({ transition: 'none', width: '98%', height: '90%', iframe: true,href:'../Reports/ChartReports/ChartsSearchPage.aspx?clientr=true&rv=1&ID=1' });return false;">
                                    <asp:Label ID="tbl_ChartLabel" runat="server"></asp:Label>
                                </asp:LinkButton>

                                <asp:LinkButton runat="server" ID="tbl_AssessmentScore" Enabled="false" CssClass="w-button" Style="background: url(../images/colorLabels32.png); " OnClientClick="$.colorbox({ transition: 'none', width: '98%', height: '90%', iframe: true,href:'RiskRegisterViewRiskAssessmentsChart.aspx?clientr=true' });return false;">
                                    <asp:Label ID="tbl_AssessmentScoreLabel" runat="server"></asp:Label>
                                </asp:LinkButton>

                                <asp:LinkButton runat="server" ID="tbl_RSA" CssClass="w-button" Style="background: url(../images/email32.png); " OnClientClick="$.colorbox({ transition: 'none', width: '98%', height: '90%', iframe: true,href:'../OnlineAssessments/DefaultMethodologies/DefaultMethodologiesSearchANDSendInvitationsPage.aspx?clientr=true&s=1&rv=1' });return false;">
                                    <asp:Label ID="tbl_RSALabel" runat="server"></asp:Label>
                                </asp:LinkButton>

                            </asp:Panel>

                            <div style="padding-top: 5px;">
                                <asp:Label ID="lbl_FrameCName" runat="server" Font-Bold="true"></asp:Label>
                            </div>

                            <div>
                                <asp:Panel ID="pnl_HeatMap" runat="server">
                                </asp:Panel>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                    </tr>
                </table>
                <asp:Panel ID="pnl_FrameCBody" runat="server" CssClass="panelbody">
                </asp:Panel>
                <uc4:RisksResult ID="u_r" runat="server" Visible="false" />
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
