<%@ Page Language="C#" MasterPageFile="~/masterpages/eDashboard.master" AutoEventWireup="True" ValidateRequest="false"  
    CodeBehind="DynamicComponentSettings.aspx.cs" Inherits="site_HITS_Organization_DynamicComponentSettings"
    Culture="auto" UICulture="auto" Theme="eMain" %>

<%@ Register TagPrefix="eSecuritelHITSControls" Namespace="WebSite.Controls" Assembly="WebSite" %>
<%@ Register Src="~/Controls/PersistNav.ascx" TagName="PersistNav" TagPrefix="uc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="eContent" runat="Server">     

    <link  href="<%=ResolveClientUrl("~/style/ModelMatrixForCarriers/css/jquery-ui-1.8.18.custom.css")%>" rel="stylesheet" />
    <link  href="<%=ResolveClientUrl("~/style/ModelMatrixForCarriers/css/style.css")%>" rel="stylesheet" />

    <style>
        .ui-widget-overlay {
            position: fixed;
        }

    </style>

    <script type="text/javascript" src="<%=ResolveClientUrl("~/script/ModelMatrixForCarriers/js/jquery-ui.js")%>"></script>

    <script language="javascript" type="text/javascript">
        function ConfirmDelete() {
            return confirm("Are you sure you want to delete the Record?.");
        }

        function SelectDynamicComponent() {
            $("#loading_dialog").loading();
        }

        function CloseLoader() {
            $("#loading_dialog").loading("loadStop");

            setTimeout(function () { ScrollToBottom(); }, 500);
        }

        function ScrollToBottom() {
            document.getElementById('<%= lblDynamicCoponentSettingMessage.ClientID %>').scrollIntoView(true);
        }

        (function ($) {

            $.widget("artistan.loading", $.ui.dialog, {
                options: {
                    // your options
                    spinnerClassSuffix: 'spinner',
                    spinnerHtml: "<%= Resources.ModelMatrixManagement.LabelLoading %>",// allow for spans with callback for timeout...
                    maxHeight: true,
                    maxWidth: false,
                    minHeight: 80,
                    minWidth: 220,
                    height: 80,
                    width: 220,
                    modal: true

                },
                _create: function () {
                    $.ui.dialog.prototype._create.apply(this);
                    // constructor
                    $(this.uiDialog).children('*').hide();
                    var self = this,
                    options = self.options;
                    self.uiDialogSpinner = $('.ui-dialog-content', self.uiDialog).html(options.spinnerHtml).addClass('ui-dialog-' + options.spinnerClassSuffix);
                },
                _setOption: function (key, value) {
                    var original = value;
                    $.ui.dialog.prototype._setOption.apply(this, arguments);
                    // process the setting of options
                    var self = this;

                    switch (key) {
                        case "innerHeight":
                            // remove old class and add the new one.
                            self.uiDialogSpinner.height(value);
                            break;
                        case "spinnerClassSuffix":
                            // remove old class and add the new one.
                            self.uiDialogSpinner.removeClass('ui-dialog-' + original).addClass('ui-dialog-' + value);
                            break;
                        case "spinnerHtml":
                            // convert whatever was passed in to a string, for html() to not throw up
                            self.uiDialogSpinner.html("" + (value || '&#160;'));
                            break;
                    }
                },
                _size: function () {
                    $.ui.dialog.prototype._size.apply(this, arguments);
                },
                // other methods
                loadStart: function (newHtml) {
                    if (typeof (newHtml) != 'undefined') {
                        this._setOption('spinnerHtml', newHtml);
                    }
                    this.open();
                },
                loadStop: function () {
                    this._setOption('spinnerHtml', this.options.spinnerHtml);
                    this.close();
                }
            });
        })(jQuery);


        function setModalWindowsStyle() {
            var rv = -1; // Return value assumes failure.
            if (navigator.appName == 'Microsoft Internet Explorer') {
                var ua = navigator.userAgent;
                var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
                if (re.exec(ua) != null)
                    rv = parseFloat(RegExp.$1);
                if (rv == 7.0) {
                    $('[id$=txtSettingValueModal]').attr('cols', '40');
                    $('[id$=txtSettingValue]').attr('cols', '30');
                }
            }
        }




    </script>
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td>
                <h1>
                    <asp:Literal ID="m_litOrganizationDetails" runat="server"
                        Text="<%$ Resources: AdministrationManagement, DynamicComponentSettingHeaderLabel %>" />
                    <asp:Label ID="lblOrgName" runat="server"></asp:Label>
                </h1>
            </td>
            <td valign="top">
                <uc:PersistNav ID="PersistNav" runat="server" />
            </td>
        </tr>
    </table>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <div id="divDynamicComponentAndSettings">
                <h2>
                    <asp:Literal ID="litDynamicComponent" runat="server" Text="<%$ Resources: AdministrationManagement, DynamicComponent %>" />
                </h2>
                <div class="greyblock">
                    <asp:GridView ID="grdAllComponents" OnRowDataBound="grdAllComponents_OnRowDataBound" runat="server" AutoGenerateColumns="False" RowStyle-VerticalAlign="Top" Width="100%">
                        <Columns>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <div class="gridLabelItem" style="width:70px">
                                        <asp:Literal ID="m_litDynamicComponentId" Text="<%$ Resources: AdministrationManagement, DynamicComponentId %>" runat="server" />
                                        <br />
                                    </div>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <div class="gridLabelItem" style="width:70px">
                                        <asp:LinkButton ID="m_lblDynamicComponentId" runat="server"
                                            OnClick="m_lblDynamicComponentId_OnClick" OnClientClick="SelectDynamicComponent()">
                                        </asp:LinkButton>
                                    </div>
                                </ItemTemplate>
                                <ItemStyle Width="100" Wrap="false" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <div class="gridLabelItem" style="width:110px"></div>
                                        <asp:Literal ID="m_litSystemName" Text="<%$ Resources: AdministrationManagement, SystemName %>" runat="server" />
                                        <br />
                                    </div>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <div class="gridLabelItem" style="width:110px"></div>
                                        <asp:Label ID="m_lblSystemName" runat="server"></asp:Label>
                                    </div>
                                </ItemTemplate>
                                <ItemStyle Width="100" Wrap="false" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <div class="gridLabelItem" style="width:220px">
                                        <asp:Literal ID="m_litDllPath" Text="<%$ Resources: AdministrationManagement, DllPath %>" runat="server" />
                                        <br />
                                    </div>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <div class="gridLabelItem" style="width:220px">
                                        <asp:Label ID="m_lblDllPath" runat="server"></asp:Label>
                                    </div>
                                </ItemTemplate>
                                <ItemStyle Width="100" Wrap="false" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <div class="gridLabelItem" style="width:220px">
                                        <asp:Literal ID="m_litTypeName" Text="<%$ Resources: AdministrationManagement, TypeName %>" runat="server" />
                                        <br />
                                    </div>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <div class="gridLabelItem" style="width:220px">
                                        <asp:Label ID="m_lblTypeName" runat="server"></asp:Label>
                                    </div>
                                </ItemTemplate>
                                <ItemStyle Width="100" Wrap="false" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <div class="gridLabelItem" style="width:220px">
                                        <asp:Literal ID="m_litTypeNamespace" Text="<%$ Resources: AdministrationManagement, TypeNamespace %>" runat="server" />
                                        <br />
                                    </div>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <div class="gridLabelItem" style="width:220px">
                                        <asp:Label ID="m_lblTypeNamespace" runat="server"></asp:Label>
                                    </div>
                                </ItemTemplate>
                                <ItemStyle Width="100" Wrap="false" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <div class="gridLabelItem" style="width:70px">
                                        <asp:Literal ID="m_litEnabled" Text="<%$ Resources: AdministrationManagement, Enabled %>" runat="server" />
                                        <br />
                                    <div>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="m_chkEnabled" runat="server" Enabled="false"></asp:CheckBox>                                    
                                </ItemTemplate>
                                <ItemStyle Width="100" Wrap="false" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <div class="gridLabelItem" style="width:70px">
                                        <asp:Literal ID="m_litIsDefault" Text="<%$ Resources: AdministrationManagement, IsDefault %>" runat="server" />
                                        <br />
                                    </div>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="m_chkIsDefault" runat="server" Enabled="false"></asp:CheckBox>                                    
                                </ItemTemplate>
                                <ItemStyle Width="100" Wrap="false" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <br />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:LinkButton ID="lblDynComponentUpdate" Text="<%$ Resources: Default, LinkButtonUpdate %>" Width="20px" runat="server"
                                        OnClick="lblDynComponentUpdate_OnClick">
                                    </asp:LinkButton>
                                </ItemTemplate>
                                <ItemStyle Width="100" Wrap="false" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <br />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:LinkButton ID="lblDynComponentDelete" Text="<%$ Resources: Default, DeleteButtonLabel %>" OnClientClick="return ConfirmDelete()" Width="20px" runat="server"
                                        OnClick="lblDynComponentDelete_OnClick">
                                    </asp:LinkButton>
                                </ItemTemplate>
                                <ItemStyle Width="100" Wrap="false" />
                            </asp:TemplateField>
                        </Columns>
                        <RowStyle VerticalAlign="Top" />
                    </asp:GridView>
                </div>
                <div style="text-align: center">
                    <asp:Button ID="lblDynComponentInsert" Text="<%$ Resources: Default, ButtonAdd %>" Width="100px" runat="server"
                        OnClick="lblDynComponentInsert_OnClick"></asp:Button>
                    <br />
                    <asp:Label runat="server" ID="lblDynamicComponentMessage" CssClass="failuremessage"></asp:Label>
                </div>
                <h2>
                    <asp:Literal ID="litDynamicComponentSettings" runat="server" Text="<%$ Resources: AdministrationManagement, DynamicComponentSettings %>" />
                </h2>
                <div class="greyblock">
                    <asp:GridView ID="grdDynamicComponentSetting" OnRowDataBound="grdDynamicComponentSetting_OnRowDataBound" runat="server" AutoGenerateColumns="False" RowStyle-VerticalAlign="Top" Width="100%">
                        <Columns>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <div class="gridLabelItem" style="width:70px">
                                        <asp:Literal ID="m_litSettingId" Text="<%$ Resources: AdministrationManagement, DynamicComponentSettingId %>" runat="server" />
                                        <br />
                                    </div>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <div class="gridLabelItem" style="width:70px">
                                        <asp:Label ID="m_lblSettingId" runat="server"></asp:Label>
                                    </div>
                                </ItemTemplate>
                                <ItemStyle Width="100" Wrap="false"/>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <div class="gridLabelItem" style="width:100px">
                                        <asp:Literal ID="m_litSettingComponentId" Text="<%$ Resources: AdministrationManagement, DynamicComponentSettingComponentId %>" runat="server" />
                                        <br />
                                    </div>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <div class="gridLabelItem" style="width:100px">
                                        <asp:Label ID="m_lblSettingComponentId" runat="server"></asp:Label>
                                    </div>
                                </ItemTemplate>
                                <ItemStyle Width="100" Wrap="false" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <div class="gridLabelItem" style="width:180px">
                                        <asp:Literal ID="m_litSettingEnvironment" Text="<%$ Resources: AdministrationManagement, SettingEnvironment %>" runat="server" />
                                        <br />
                                    </div>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <div class="gridLabelItem" style="width:180px">
                                        <asp:Label ID="m_lblSettingEnvironment" runat="server"></asp:Label>
                                    </div>
                                </ItemTemplate>
                                <ItemStyle Width="100" Wrap="false" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <div class="gridLabelItem" style="width:180px">
                                        <asp:Literal ID="m_litSettingName" Text="<%$ Resources: AdministrationManagement, SettingName %>" runat="server" />
                                        <br />
                                    </div>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <div class="gridLabelItem" style="width:180px">
                                        <asp:Label ID="m_lblSettingName" runat="server"></asp:Label>
                                    </div>
                                </ItemTemplate>
                                <ItemStyle Width="100" Wrap="false" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <div class="gridLabelItem" style="width:490px">
                                        <asp:Literal ID="m_litSettingValue" Text="<%$ Resources: AdministrationManagement, SettingValue %>" runat="server" />
                                        <br />
                                    </div>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <div class="gridLabelItem" style="width:490px">
                                        <asp:LinkButton ID="m_lblSettingValue"  runat="server" OnClick="m_lblSettingValue_OnClick">
                                        </asp:LinkButton>
                                    </div>
                                </ItemTemplate>
                                <ItemStyle Width="100" Wrap="false" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <br />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:LinkButton ID="lblDynComponentSettingUpdate" Text="<%$ Resources: Default, LinkButtonUpdate %>" Width="20px" runat="server"
                                        OnClick="lblDynComponentSettingUpdate_OnClick">
                                    </asp:LinkButton>
                                </ItemTemplate>
                                <ItemStyle Width="100" Wrap="false" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <br />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:LinkButton ID="lblDynComponentSettingDelete" Text="<%$ Resources: Default, DeleteButtonLabel %>" OnClientClick="return ConfirmDelete()" Width="20px" runat="server"
                                        OnClick="lblDynComponentSettingDelete_OnClick">
                                    </asp:LinkButton>
                                </ItemTemplate>
                                <ItemStyle Width="100" Wrap="false" />
                            </asp:TemplateField>
                        </Columns>
                        <RowStyle VerticalAlign="Top" />
                    </asp:GridView>
                </div>
                <div style="text-align: center">
                    <asp:Button ID="lblDynComponentSettingInsert" Text="<%$ Resources: Default, ButtonAdd %>" Width="100px" runat="server"
                        OnClick="lblDynComponentSettingInsert_OnClick"></asp:Button>
                    <br />
                    <asp:Label runat="server" ID="lblDynamicCoponentSettingMessage" CssClass="failuremessage"></asp:Label>
                </div>

                <!-- Dynamic Component Modal window -->
                <div>
                    <asp:Panel ID="pnlPopupWindow" runat="server" CssClass="pnlInventoryPopup">
                        <asp:Panel ID="pnlPopupWindowHeader" runat="server" EnableViewState="false" CssClass="modalHeader">
                            <table cellpadding="0" cellspacing="0" width="90%" style="margin: 0px;">
                                <tr>
                                    <td style="margin: 0px; padding: 2px;">
                                        <asp:Label ID="lblHeaderText" runat="server" EnableViewState="false" Text="<%$ Resources:AdministrationManagement, DynamicComponent%>" />
                                    </td>

                                    <td align="right" style="text-align: right; margin: 0px; padding: 2px;">
                                        <asp:ImageButton ID="imgCloseTerm" runat="server" Height="18px" CausesValidation="false" ImageUrl="~/images/closeButton.png"
                                            ToolTip="<%$ Resources: Default, ToolTipClose %>" Width="18px" CssClass="modalClose" OnClick="imgCloseTerm_OnClick" />
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                        <asp:Panel ID="pnlBody" runat="server" CssClass="modalContent">
                            <table>
                                <tr>
                                    <td colspan="4"></td>
                                </tr>
                                <tr>
                                    <td style="text-align: right">
                                        <asp:Literal ID="litDynamicComponentId" runat="server" Text="<%$ Resources: AdministrationManagement, DynamicComponentId %>" Visible="false"></asp:Literal></td>
                                    <td style="text-align: left" colspan="3">
                                        <asp:TextBox ID="txtDynamicComponentId" MaxLength="100" runat="server" Width="150px" Enabled="false" Visible="false"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: right">
                                        <asp:Literal ID="litSystemName" runat="server" Text="<%$ Resources: AdministrationManagement, SystemName %>"></asp:Literal></td>
                                    <td style="text-align: left" colspan="3">
                                        <asp:TextBox ID="txtSystemName" MaxLength="100" runat="server" Width="150px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: right">
                                        <asp:Literal ID="litDllPath" runat="server" Text="<%$ Resources: AdministrationManagement, DllPath %>"></asp:Literal></td>
                                    <td style="text-align: left" colspan="3">
                                        <asp:TextBox ID="txtDllPath" MaxLength="300" runat="server" Width="150px"></asp:TextBox>
                                </tr>
                                <tr>
                                    <td style="text-align: right">
                                        <asp:Literal ID="litTypeName" runat="server" Text="<%$ Resources: AdministrationManagement, TypeName %>"></asp:Literal></td>
                                    <td style="text-align: left" colspan="3">
                                        <asp:TextBox ID="txtTypeName" MaxLength="120" runat="server" Width="150px"></asp:TextBox>
                                </tr>
                                <tr>
                                    <td style="text-align: right">
                                        <asp:Literal ID="litTypeNamespace" runat="server" Text="<%$ Resources: AdministrationManagement, TypeNamespace %>"></asp:Literal></td>
                                    <td style="text-align: left" colspan="3">
                                        <asp:TextBox ID="txtTypeNamespace" MaxLength="300" runat="server" Width="150px"></asp:TextBox>
                                </tr>
                                <tr>
                                    <td style="text-align: right">
                                        <asp:Literal ID="litEnabled" runat="server" Text="<%$ Resources: AdministrationManagement, Enabled %>"></asp:Literal></td>
                                    <td style="text-align: left" colspan="3">
                                        <asp:CheckBox ID="chkEnabled" runat="server" ></asp:CheckBox>
                                </tr>
                                <tr>
                                    <td style="text-align: right">
                                        <asp:Literal ID="litIsDefault" runat="server" Text="<%$ Resources: AdministrationManagement, IsDefault %>"></asp:Literal></td>
                                    <td style="text-align: left" colspan="3">
                                        <asp:CheckBox ID="chkIsDefault" runat="server" ></asp:CheckBox>
                                </tr>
                                <tr>
                                    <td>&nbsp;</td>
                                    <td>
                                        <asp:Button ID="btnUpdateDynComponent" runat="server" Text="<%$ Resources: Default, ButtonUpdate %>" OnClick="btnUpdateDynComponent_OnClick" />
                                        <asp:Button ID="btnInsertDynComponent" runat="server" Text="<%$ Resources: Default, ButtonInsert %>" OnClick="btnInsertDynComponent_OnClick" /></td>
                                    <td>
                                        <asp:Button ID="btnDynComponentClose" runat="server" ValidationGroup="UpdateCC" CausesValidation="false" Text="<%$ Resources: Default, ButtonClose %>" OnClick="btnDynComponentClose_OnClick"></asp:Button></td>
                                    <td>&nbsp;</td>

                                </tr>
                                <tr>
                                    <td colspan="4">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td colspan="4">

                                        <asp:Literal ID="ltlResults" runat="server"></asp:Literal>
                                    </td>

                                </tr>
                            </table>
                        </asp:Panel>
                    </asp:Panel>
                    <asp:Button runat="server" EnableViewState="false" ID="hiddenTargetControlForModalPopup_New"
                        Style="display: none" />
                    <esecuritelhitscontrols:hitsmodalpopupextender runat="server" id="modalPopupWindow" targetcontrolid="hiddenTargetControlForModalPopup_New"
                        popupcontrolid="pnlPopupWindow" backgroundcssclass="modalBackground"
                        popupdraghandlecontrolid="pnlPopupWindowHeader" />
                </div>                

                <!-- Dynamic Component Setting Modal window -->
                <div>
                    <asp:Panel ID="pnlPopupWindowForSettings" runat="server" CssClass="pnlInventoryPopup">
                        <asp:Panel ID="pnlPopupWindowForSettingsHeader" runat="server" EnableViewState="false" CssClass="modalHeader">
                            <table cellpadding="0" cellspacing="0" width="90%" style="margin: 0px;">
                                <tr>
                                    <td style="margin: 0px; padding: 2px;">
                                        <asp:Label ID="lblSettingHeaderText" runat="server" EnableViewState="false" Text="<%$ Resources:AdministrationManagement, DynamicComponentSettings%>" />
                                    </td>

                                    <td align="right" style="text-align: right; margin: 0px; padding: 2px;">
                                        <asp:ImageButton ID="imgCloseSettingTerm" runat="server" Height="18px" CausesValidation="false" ImageUrl="~/images/closeButton.png"
                                            ToolTip="<%$ Resources: Default, ToolTipClose %>" Width="18px" CssClass="modalClose" OnClick="imgCloseSettingTerm_OnClick" />
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                        <asp:Panel ID="pnlSettingBody" runat="server" CssClass="modalContent">
                            <table>
                                <tr>
                                    <td colspan="4"></td>
                                </tr>
                                <tr>
                                    <td style="text-align: right">
                                        <asp:Literal ID="litSettingId" runat="server" Text="<%$ Resources: AdministrationManagement, DynamicComponentSettingId %>" Visible="false"></asp:Literal></td>
                                    <td style="text-align: left" colspan="3">
                                        <asp:TextBox ID="txtSettingId" MaxLength="100" runat="server" Width="150px" Enabled="false" Visible="false"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: right">
                                        <asp:Literal ID="litSettingComponentId" runat="server" Text="<%$ Resources: AdministrationManagement, DynamicComponentSettingComponentId %>"></asp:Literal></td>
                                    <td style="text-align: left" colspan="3">
                                        <asp:TextBox ID="txtSettingComponentId" MaxLength="9" runat="server" Width="150px" Enabled="false"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: right">
                                        <asp:Literal ID="litSettingEnvironment" runat="server" Text="<%$ Resources: AdministrationManagement, SettingEnvironment %>"></asp:Literal></td>
                                    <td style="text-align: left" colspan="3">
                                        <asp:TextBox ID="txtSettingEnvironment" MaxLength="200" runat="server" Width="150px"></asp:TextBox>
                                </tr>
                                <tr>
                                    <td style="text-align: right">
                                        <asp:Literal ID="litSettingName" runat="server" Text="<%$ Resources: AdministrationManagement, SettingName %>"></asp:Literal></td>
                                    <td style="text-align: left" colspan="3">
                                        <asp:TextBox ID="txtSettingName" MaxLength="400" runat="server" Width="150px"></asp:TextBox>
                                </tr>
                                <tr>
                                    <td style="text-align: right">
                                        <asp:Literal ID="litSettingValue" runat="server" Text="<%$ Resources: AdministrationManagement, SettingValue %>"></asp:Literal></td>
                                    <td style="text-align: left" colspan="3">
                                        <asp:TextBox ID="txtSettingValue" TextMode="multiline" Columns="80" Rows="30" runat="server"></asp:TextBox>
                                </tr>
                                <tr>
                                    <td>&nbsp;</td>
                                    <td>
                                        <asp:Button ID="btnUpdateDynComponentSetting" runat="server" Text="<%$ Resources: Default, ButtonUpdate %>" OnClick="btnUpdateDynComponentSetting_OnClick" />
                                        <asp:Button ID="btnInsertDynComponentSetting" runat="server" Text="<%$ Resources: Default, ButtonInsert %>" OnClick="btnInsertDynComponentSetting_OnClick" /></td>
                                    <td>
                                        <asp:Button ID="btnDynComponentSettingClose" runat="server" ValidationGroup="UpdateCC" CausesValidation="false" Text="<%$ Resources: Default, ButtonClose %>" OnClick="btnDynComponentSettingClose_OnClick"></asp:Button></td>
                                    <td>&nbsp;</td>

                                </tr>
                                <tr>
                                    <td colspan="4">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td colspan="4">

                                        <asp:Literal ID="ltlSettingResults" runat="server"></asp:Literal>
                                    </td>

                                </tr>
                            </table>
                        </asp:Panel>
                    </asp:Panel>
                    <asp:Button runat="server" EnableViewState="false" ID="hiddenTargetControlForModalPopupSetting_New"
                        Style="display: none" />
                    <esecuritelhitscontrols:hitsmodalpopupextender runat="server" id="modalPopupWindowForSettings" targetcontrolid="hiddenTargetControlForModalPopupSetting_New"
                        popupcontrolid="pnlPopupWindowForSettings" backgroundcssclass="modalBackground"
                        popupdraghandlecontrolid="pnlPopupWindowForSettingsHeader" />
                </div>

                <!-- Dynamic Component Setting Value window -->
                <div>
                    <asp:Panel ID="pnlPopupWindowForSettingValue" runat="server" CssClass="pnlInventoryPopup">
                        <asp:Panel ID="pnlPopupWindowForSettingValueHeader" runat="server" EnableViewState="false" CssClass="modalHeader">
                            <table cellpadding="0" cellspacing="0" width="90%" style="margin: 0px;">
                                <tr>
                                    <td style="margin: 0px; padding: 2px;">
                                        <asp:Label ID="lblSettingValueHeaderText" runat="server" EnableViewState="false" Text="<%$ Resources:AdministrationManagement, SettingValue%>"  />
                                    </td>

                                    <td align="right" style="text-align: right; margin: 0px; padding: 2px;">
                                        <asp:ImageButton ID="imgCloseSettingValueTerm" runat="server" Height="18px" CausesValidation="false" ImageUrl="~/images/closeButton.png"
                                            ToolTip="<%$ Resources: Default, ToolTipClose %>" Width="18px" CssClass="modalClose" OnClick="imgCloseSettingValueTerm_OnClick" />
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                        <asp:Panel ID="pnlPopupWindowForSettingValueBody" runat="server" CssClass="modalContent" >
                            <table>                                                               
                                <tr>
                                    <td>
                                        <asp:TextBox ID="txtSettingValueModal" TextMode="multiline" Columns="80" Rows="30" runat="server" ReadOnly="true"></asp:TextBox>
                                    </td>                                    
                                </tr>
                                <tr>                                      
                                    <td>
                                        <asp:Button ID="btnDynComponentSettingValueClose" runat="server" ValidationGroup="UpdateCC" CausesValidation="false" Text="<%$ Resources: Default, ButtonClose %>" OnClick="btnDynComponentSettingValueClose_OnClick"></asp:Button>
                                    </td>
                                </tr>                             
                            </table>
                        </asp:Panel>
                    </asp:Panel>
                    <asp:Button runat="server" EnableViewState="false" ID="hiddenTargetControlForModalPopupSettingValue"
                        Style="display: none" />
                    <esecuritelhitscontrols:hitsmodalpopupextender runat="server" id="modalPopupWindowForSettingValue" targetcontrolid="hiddenTargetControlForModalPopupSettingValue"
                        popupcontrolid="pnlPopupWindowForSettingValue" backgroundcssclass="modalBackground"
                        popupdraghandlecontrolid="pnlPopupWindowForSettingValueHeader" />
                </div>                
            </div>

        </ContentTemplate>
    </asp:UpdatePanel>
    <div id="loading_dialog"></div>

    <script language="javascript" type="text/javascript">

        (function setStyle() {
            var rv = -1; // Return value assumes failure.
            if (navigator.appName == 'Microsoft Internet Explorer') {
                var ua = navigator.userAgent;
                var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
                if (re.exec(ua) != null)
                    rv = parseFloat(RegExp.$1);
                if (rv == 7.0) {
                    $('[id$=pnlPopupWindowForSettings]').css('width', '50%');
                    $('[id$=pnlPopupWindowForSettingValue]').css('width', '50%');
                }
            }

        })();

    </script>
</asp:Content>
