<%@ Page Language="C#" MasterPageFile="~/masterpages/eDashboard.master" AutoEventWireup="true"
    Inherits="site_HITS_ModelMatrix_Default" Title="Brightstar Device Protection: Model Matrices" Theme="eMain"
    Culture="auto" UICulture="auto" CodeBehind="Default.aspx.cs" %>

<%@ Register Src="~/Controls/ScriptingHelper.ascx" TagName="ScriptingHelper" TagPrefix="uc" %>
<%@ Register Src="~/Controls/ModelMatrix/GridOperator.ascx" TagName="GridOperatorHelper"
    TagPrefix="uc" %>
<%@ Register Src="~/Controls/DefaultHeader.ascx" TagName="DefaultHeader" TagPrefix="uc" %>
<%@ Register Src="~/Controls/CustomSorter.ascx" TagName="CustomSorter" TagPrefix="uc" %>
<%@ Register Assembly="eSecuritel.HITS.UI.Components" Namespace="eSecuritel.HITS.UI.Components"  TagPrefix="cc1" %>
<%@ Register src="../../../Controls/ClientCarrierDropDowns.ascx" tagname="ClientCarrierDropDowns" tagprefix="uc1" %>

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

    <script src="../../../script/eSetFormControls.js" type="text/javascript"></script>
    <script src="../../../script/eGridHelper.js" type="text/javascript"></script>
    <script src="../../../script/jquery-1.8.3.js" type="text/javascript"></script>

    <uc:ScriptingHelper ID="ScriptingHelper1" runat="server" />
    <table width="100%">
        <tr>
            <td>
                <h1>
                    <asp:Literal ID="m_litHeader" runat="server" Text="<%$ Resources : ModelMatrixManagement,LabelModelMatrices %>" />
                </h1>
            </td>
        </tr>
    </table>
    <!---------------------------------UC----------------------------------->
    <uc:DefaultHeader ID="DefaultHeader1" runat="server" OnImportClicked="DefaultHeader1_ImportClick" />
    <!---------------------------------T1----------------------------------->
    <div class="mastersearch">
        <table cellspacing="0" cellpadding="0">
            <tr>
                <td style="padding-right: 0px">
                    <img id="Img1" runat="server" src="../../../images/Collapse_13x13.jpg" class="showstate"
                        onclick="expandMasterSearch(this, 'm_pnlMasterSearchCriteria')" alt="contract" />
                </td>
                <td width="100%" valign="middle">
                    <asp:Literal ID="m_litSearchUsersHeader" runat="server" Text="<%$ Resources : Default,LabelSearchCriteria %>" />
                </td>
            </tr>
        </table>
    </div>
    <div id="m_pnlMasterSearchCriteria" style="background-color: #DBDCDE">
        <table border="0" cellpadding="0" cellspacing="0" class="gvTable">
            <tr>
                <td style="height: 69px">
                    <table border="0" cellpadding="0" cellspacing="0" style="table-layout:fixed;width: 1170px;" >
                        <tr>
                            <%--<td style="height: 27px" align="right">
                                <asp:Literal ID="m_litOrganization" runat="server" Text="<%$ Resources : OrganizationManagement,LabelClientColon %>" />
                            </td>
                            <td style="height: 27px">
                                <asp:DropDownList ID="m_ddlOrg" runat="server" Width="172px" 
                                    onselectedindexchanged="m_ddlOrg_SelectedIndexChanged" AutoPostBack="True">
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*"
                                    ControlToValidate="m_ddlOrg"></asp:RequiredFieldValidator>
                            </td>--%>
                            <td colspan="2" align="right">
                                <div id="DivOrganization" style="width:448px" class="mm-client-carrier-dropdown-fix">
                                    <uc1:ClientCarrierDropDowns ID="ClientCarrierDropDowns1" 
                                    runat="server" DropDownWidth="212" LabelWidth="108"   
                                    OnCarrierChanged="ClientCarrierDropDowns1_OnCarrierChanged" 
                                    OnClientChanged="ClientCarrierDropDowns1_OnClientChanged" />
                                    <div style="text-align:left; margin-left:100px" >
                                        <asp:CustomValidator ID="vldClient" runat="server"  style="text-align:left ; " 
                                        ToolTip = "<%$ Resources : ModelMatrixManagement,LabelCarrierUsesVerticalCMMRManageTheMatrixCMMRPage %>"   />
                                    </div>
                                </div>
                            </td>                            
                            <td align="right">
                                <asp:Literal ID="m_litPrimModel" runat="server" Text="<%$ Resources : ModelManagement,LabelPrimaryModelColon %>" />
                            </td>
                            <td>
                                <asp:TextBox ID="m_txtPrimModel" runat="server" Width="200px"></asp:TextBox>
                                <SmartAjaxToolkit:SmartAutoCompleteExtender ID="SmartAutoCompleteExtender1" runat="server"
                                    OnAutoCompleteCallback="SearchPrimaryModels" TargetControlID="m_txtPrimModel"
                                    UpdateMode="Callback" EnableCaching="false" MinimumPrefixLength="2" />
                            </td>
                            <td rowspan="4">
                                <table id="tblLegend" style="border: Solid 1px Black;">
                                    <tr>
                                        <td colspan="3" align="center">
                                            <span style="font-weight: bold; text-decoration: underline;" > <asp:Literal ID="Literal_LabelLegendColonSKUGroup" runat="server" Text="<%$ Resources : ModelMatrixManagement,LabelLegendColonSKUGroup %>" /></span> <!-- Legend: SKU Group -->
                                        </td>
                                    </tr>
                                    <tr>
                                        <td><span>1 = </span></td>
                                        <td>
                                            <asp:Literal ID="Literal_OrganicListItem" runat="server" Text="<%$ Resources : Default,LabelHandsetOnly %>" /><!--Handset Only-->
                                        </td>
                                    </tr>
                                    <tr>
                                        <td><span>2 = </span></td>
                                        <td>
                                            <asp:Literal ID="Literal_LabelRefurbed" runat="server" Text="<%$ Resources : Default,LabelNonNewKit %>" /><!--Non New Kit-->
                                        </td>
                                    </tr>
                                    <tr>
                                        <td><span>3 = </span></td>
                                        <td>
                                            <asp:Literal ID="Literal_HeaderTextNew" runat="server" Text="<%$ Resources : Default,LabelNewKit %>" /><!--New Kit-->
                                        </td>
                                    </tr>                                                                                                                                                
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources : OrganizationManagement,LabelProgramTypeColon %>" />
                            </td>
                            <td>
                                <asp:DropDownList ID="m_ddlProgramType" runat="server" Width="212px" 
                                    Enabled="False">
                                </asp:DropDownList>
                            </td>
                            <td align="right">
                                <asp:Literal ID="m_litSecondaryModel" runat="server" Text="<%$ Resources : ModelManagement,LabelSecondaryModelColon%>" />
                            </td>
                            <td nowrap>
                                <asp:TextBox ID="m_txtSecondaryModel" runat="server" Width="200px"></asp:TextBox>
                                <SmartAjaxToolkit:SmartAutoCompleteExtender ID="SmartAutoCompleteExtender3" runat="server"
                                    OnAutoCompleteCallback="SearchSecondaryModels" TargetControlID="m_txtSecondaryModel"
                                    UpdateMode="Callback" EnableCaching="false" MinimumPrefixLength="2" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Literal ID="m_litMasterModel" runat="server" Text="<%$ Resources : ModelManagement,LabelClaimedModelColon %>" />                                
                            </td>
                            <td>
                                <asp:TextBox ID="m_txtMasterModel" runat="server" Width="200px"></asp:TextBox>
                                <SmartAjaxToolkit:SmartAutoCompleteExtender ID="SmartAutoCompleteExtender2" runat="server"
                                    OnAutoCompleteCallback="SearchClaimedModels" TargetControlID="m_txtMasterModel"
                                    UpdateMode="Callback" EnableCaching="false" MinimumPrefixLength="2" />
                            </td>
                            <td align="right">
                                <asp:Literal ID="m_litTertiaryModel" runat="server" Text="<%$ Resources : ModelManagement,LabelTertiaryModelColon %>" />
                            </td>
                            <td nowrap>
                                <asp:TextBox ID="m_txtTertiaryModel" runat="server" Width="200px"></asp:TextBox>
                                <SmartAjaxToolkit:SmartAutoCompleteExtender ID="SmartAutoCompleteExtender4" runat="server"
                                    OnAutoCompleteCallback="SearchTertiaryModels" TargetControlID="m_txtTertiaryModel"
                                    UpdateMode="Callback" EnableCaching="false" MinimumPrefixLength="2" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Literal ID="m_litPageSize" runat="server" Text="<%$ Resources : HandsetManagement,LabelRecordsPerPageColon %>" />
                            </td>
                            <td>
                                <asp:DropDownList ID="m_ddlPageSize" style="margin-left: auto" runat="server">
                                </asp:DropDownList>
                            </td>
                            <td align="right">
                            </td>
                            <td>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    <div class="mastersearch" style="display: none;">
        <table cellspacing="0" cellpadding="0">
            <tr>
                <td style="padding-right: 0px">
                    <img id="m_imgSearchCriteria" runat="server" src="../../../images/Collapse_13x13.jpg"
                        class="showstate" onclick="expandMasterSearch(this, 'm_pnlAdditionalCriteria')"
                        alt="contract" />
                </td>
                <td width="100%" valign="middle">
                    <asp:Literal ID="m_litAdditionalSearchCriteriaHeader" runat="server" Text="<%$ Resources : Default,AdditionalSearchCriteriaLabel %>"
                        />
                </td>
            </tr>
        </table>
    </div>
    <!-- 
        I intentionally hid this.  If you ever want to unhide it, be sure to go to the code behind
         and remove the lines where I set all the contents of the textboxes to String.Empty 
     -->
    <div id="m_pnlAdditionalCriteria" style="<%=AdditionalCriteriaStyle %>; display: none;">
        <div class="mastersubpanelAddition">
            <table border="0" cellpadding="0" cellspacing="0" class="gvTable">
                <tr>
                    <td align="right">
                        <asp:Literal ID="Literal13" runat="server" Text="<%$ Resources : SubscriberManagement,LabelNewCostColon %>" />
                    </td>
                    <td>
                        <asp:TextBox ID="m_txtNewCost" runat="server" Width="100px"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="m_txtNewCost"
                            ErrorMessage="*" EnableClientScript="true" ValidationGroup="SearchCreateriaGroup"
                            Display="Dynamic" Text="<%$ Resources:Default, ValidatorText %>" ToolTip="<%$ Resources : Default,ValueMustContainFollowedIntegerFloatingPointNumberDot %>"
                            ValidationExpression="^\s*(>|<|=|<=|>=)?\s*0*[0-9]*\.?[0-9]{0,2}$" />
                    </td>
                    <td align="right">
                        <asp:Literal ID="Literal14" runat="server" Text="<%$ Resources : HandsetManagement,LabelMfgRefurbCostColon %>" />
                    </td>
                    <td>
                        <asp:TextBox ID="m_txtMfgRefurbCost" runat="server" Width="100px"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="m_txtMfgRefurbCost"
                            ErrorMessage="*" EnableClientScript="true" ValidationGroup="SearchCreateriaGroup"
                            Display="Dynamic" Text="<%$ Resources:Default, ValidatorText %>" ToolTip="<%$ Resources : Default,ValueMustContainFollowedIntegerFloatingPointNumberDot %>"
                            ValidationExpression="^\s*(>|<|=|<=|>=)?\s*0*[0-9]*\.?[0-9]{0,2}$" />
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Literal ID="Literal15" runat="server" Text="<%$ Resources : ServicePlanManagement,LabelOrganicCostColon %>" />
                    </td>
                    <td>
                        <asp:TextBox ID="m_txtOrganicCost" runat="server" Width="100px"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="m_txtOrganicCost"
                            ErrorMessage="*" EnableClientScript="true" ValidationGroup="SearchCreateriaGroup"
                            Display="Dynamic" Text="<%$ Resources:Default, ValidatorText %>" ToolTip="<%$ Resources : Default,ValueMustContainFollowedIntegerFloatingPointNumberDot %>"
                            ValidationExpression="^\s*(>|<|=|<=|>=)?\s*0*[0-9]*\.?[0-9]{0,2}$" />
                    </td>
                    <td align="right">
                        <asp:Literal ID="Literal16" runat="server" Text="<%$ Resources : ServicePlanManagement,LabelDeductibleColon %>" 
                            Visible="false" />
                    </td>
                    <td>
                        <asp:TextBox ID="m_txtDeductible" runat="server" Width="100px" Visible="false"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="m_txtDeductible"
                            ErrorMessage="*" Display="Dynamic" EnableClientScript="true" Text="<%$ Resources:Default, ValidatorText %>"
                            ValidationGroup="SearchCreateriaGroup" ToolTip="<%$ Resources : Default,ValueMustContainFollowedIntegerFloatingPointNumberDot %>"
                            ValidationExpression="^\s*(>|<|=|<=|>=)?\s*0*[0-9]*\.?[0-9]{0,2}$" Visible="false" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <!--------------------------------Buttons---------------------------------->
    <div style="padding-left: 22%">
        <asp:Button ID="btnSearch" runat="server" Text="<%$ Resources : Default,ButtonSearch %>" ValidationGroup="SearchCreateriaGroup"
            CssClass="pagebutton" Font-Bold="False" OnClick="m_btnSearch_Click" 
            Enabled="False" />
        <input id="btnClear" type="button" runat="server" value="<%$ Resources : Default,ButtonClear %>" class="pagebutton"
            />
    </div>
    
    
    <!---------------------------------T2----------------------------------->
    <asp:Panel ID="m_pnlSearchResults" runat="server">
        <h2>
            <asp:Literal ID="m_litSearchResultsHeader" runat="server" Text="<%$ Resources : Default,LabelSearchResults %>" />
            <asp:Literal ID="lblSuccess" runat="server" Text="<%$ Resources : Default,LabelLabel %>" ></asp:Literal>
        </h2>
    </asp:Panel>
    <!---------------------------------Grid Pnl----------------------------------->
    <asp:Panel ID="m_pnlGrid" Visible="False" runat="server">
        <!-------------------------------------------------------------------->
        <%--<asp:Panel ID = "m_pnlTopGridOperator"  runat = "server" >
             <uc:GridOperatorHelper ID="m_TopGridOperator" runat="server" OnUpdateClicked=grdOperatorModelMatrix_UpdateClicked />
           </asp:Panel>--%>
        <!---------------------------------UC----------------------------------->
        <br />
        <cc1:HitsSearchGridView ID="m_gvModelMatrix" runat="server" AutoGenerateColumns="False"
            AllowPaging="True" OnRowDataBound="m_gvModelMatrix_RowDataBound" OnPageIndexChanged="m_gvModelMatrix_PageIndexChanged"
            OnPageIndexChanging="m_gvModelMatrix_PageIndexChanging" OnMenuItemCommand="m_gvModelMatrix_OnMenuItemCommand"
            ShowMenu="True" ShowSelectField="True" ShowActivateMenu="False" ShowDeActivateMenu="False"
            AutoGenerateDeleteButton="false" ShowEmailMenu="False" ShowPrintMenu="True" ShowHotlineMenu="False"
            ShowDeHotlineMenu="False" CustomPagerID="HitsPager1" ClientFunctionPrint="window.print();"
            OnCustomPageIndexChanged="m_gvModelMatrix_PageIndexChanged" OnCustomPageIndexChanging="m_gvModelMatrix_PageIndexChanging"
            ShowDeSelectMenu="True" ShowExportMenu="True"
            ShowSelectMenu="True" Width="100%" AtlasScriptManagerID="" ClientFunctionActivateSelected=""
            ClientFunctionDeActivateSelected="" ClientFunctionDeHotline="" ClientFunctionDelete=""
            ClientFunctionEmailSelected="" ClientFunctionExportSelected="" ClientFunctionHotline=""
            ClientFunctionSetStatus="" CssClassCustomPaging="" CssClassMenu="" PropagateActionToChildID=""
            ShowDeleteMenu="False" ShowExportCSV="True" ShowExportCSVWithSummary="False"
            ShowExportXML="True" ShowExportXMLWithSummary="False" ShowSetStatus="False">
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal ID="m_litMMXDetails" Text="<%$ Resources : ModelManagement,LabelMapId %>" runat="server" />
                        <uc:CustomSorter ID="m_csModelMatricesId" SortExpression="EMID" runat="server"
                            OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                        <br />
                        <br />
                    </HeaderTemplate>
                    <ItemStyle Width="5%" CssClass="nopadding" />
                    <ItemTemplate>
                        <asp:HyperLink ID="m_hlMMXDetails" runat="server" ToolTip="<%$ Resources : ModelMatrixManagement,LabelGetModelMatriceDetails %>"
                            />
                        <asp:HiddenField ID="m_hfMMXOrgId" runat="server" />
                        <asp:HiddenField ID="m_hfMMXId" runat="server" />
                        <asp:HiddenField ID="m_hfMMXModelId" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal ID="m_litOrganizationHeader" Text="<%$ Resources : OrganizationManagement,HeaderTextClient %>" runat="server" />
                        <br />
                        <uc:CustomSorter ID="m_csOrganization" SortExpression="ORGANIZATION_NAME" runat="server"
                            OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                        <br />
                        <br />
                    </HeaderTemplate>
                    <HeaderStyle Width="100px" />
                    <ItemTemplate>
                        <asp:HyperLink ID="m_linkOrgName" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal ID="m_litProgramTypeHeader" Text="<%$ Resources : OrganizationManagement,LabelProgramType %>" runat="server" />
                        <br />
                        <uc:CustomSorter ID="m_csProgramType" SortExpression="PROGRAM_TYPE_NAME" runat="server"
                            OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                        <br />
                        <br />
                    </HeaderTemplate>
                    <HeaderStyle Width="100px" />
                    <ItemTemplate>
                        <asp:Literal ID="m_litProgramType" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal ID="m_litMasterModelHeader" Text="<%$ Resources : ClaimsManagement,ColumnHeaderClaimedModel %>" runat="server" />
                        <br />
                        <uc:CustomSorter ID="m_csMasterModel" SortExpression="MASTER_MODEL_NAME" runat="server"
                            OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                        <br />
                        <br />
                    </HeaderTemplate>
                    <HeaderStyle Width="100px" />
                    <ItemTemplate>
                        <asp:HyperLink ID="m_linkMasterModel" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal ID="m_litPrimaryModelHeader" Text="<%$ Resources : ServicePlanManagement,LabelPrimaryReplacement %>" runat="server"
                            />
                        <br />
                        <uc:CustomSorter ID="m_csPrimaryModel" SortExpression="PRIMARY_MODEL_NAME" runat="server"
                            OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                    </HeaderTemplate>
                    <HeaderStyle Width="100px" />
                    <ItemTemplate>
                        <asp:HyperLink ID="m_linkPrimaryModel" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <table class="noclass" width="54px">
                            <tr>
                                <td colspan="3" style="font-size: xx-small">
                                    <asp:Literal ID="m_litPrimaryRepOption" Text="<%$ Resources : Default,LabelPrimaryOption %>" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td align="center" class="nopadding">
                                    <asp:Literal ID="m_litPrOptOrganicHeader" Text="1" runat="server" />
                                </td>
                                <td align="center" class="nopadding">
                                    <asp:Literal ID="m_litPrOptRefurbishedHeader" Text="2" runat="server" />
                                </td>
                                <td align="center" class="nopadding">
                                    <asp:Literal ID="m_litPrOptNewHeader" Text="3" runat="server" />
                                </td>
                            </tr>
                        </table>
                    </HeaderTemplate>
                    <HeaderStyle Wrap="True" />
                    <ItemTemplate>
                        <table width="54px">
                            <tr>
                                <td style="font-size: xx-small; width: 18px" align="right" class="nopadding">
                                    <asp:Literal ID="m_litPrOptOrganic" runat="server" />
                                </td>
                                <td style="font-size: xx-small; width: 18px" align="right" class="nopadding">
                                    <asp:Literal ID="m_litPrOptRefurbished" runat="server" />
                                </td>
                                <td style="font-size: xx-small; width: 18px" align="right" class="nopadding">
                                    <asp:Literal ID="m_litPrOptNew" runat="server" />
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal ID="m_litSecondaryModelHeader" Text="<%$ Resources : ServicePlanManagement,LabelSecondaryReplacement %>" runat="server"
                            />
                        <br />
                        <uc:CustomSorter ID="m_csSecondaryModel" SortExpression="SECONDARY_MODEL_NAME" runat="server"
                            OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                    </HeaderTemplate>
                    <HeaderStyle Width="100px" />
                    <ItemTemplate>
                        <asp:HyperLink ID="m_linkSecondaryModel" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <table class="noclass" width="54px">
                            <tr>
                                <td colspan="3" style="font-size: xx-small" class="nopadding">
                                    <asp:Literal ID="m_litSecondaryRepOption" Text="<%$ Resources : Default,LabelSecondaryOption %>" runat="server"
                                        />
                                </td>
                            </tr>
                            <tr>
                                <td align="center" class="nopadding">
                                    <asp:Literal ID="m_litSecOptOrganicHeader" Text="1" runat="server" />
                                </td>
                                <td align="center" class="nopadding">
                                    <asp:Literal ID="m_litSecOptRefurbishedHeader" Text="2" runat="server" />
                                </td>
                                <td align="center" class="nopadding">
                                    <asp:Literal ID="m_litSecOptNewHeader" Text="3" runat="server" />
                                </td>
                            </tr>
                        </table>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <table width="54px">
                            <tr>
                                <td style="font-size: xx-small; width: 18px" align="right" class="nopadding">
                                    <asp:Literal ID="m_litSecOptOrganic" runat="server" />
                                </td>
                                <td style="font-size: xx-small; width: 18px" align="right" class="nopadding">
                                    <asp:Literal ID="m_litSecOptRefurbished" runat="server" />
                                </td>
                                <td style="font-size: xx-small; width: 18px" align="right" class="nopadding">
                                    <asp:Literal ID="m_litSecOptNew" runat="server" />
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal ID="m_litTretiaryModelHeader" Text="<%$ Resources : ServicePlanManagement,LabelTertiaryReplacement %>" runat="server"
                            />
                        <br />
                        <uc:CustomSorter ID="CustomSorter1" SortExpression="TERTIARY_MODEL_NAME" runat="server"
                            OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                    </HeaderTemplate>
                    <HeaderStyle Width="100px" />
                    <ItemTemplate>
                        <asp:HyperLink ID="m_linkTertiaryModel" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <table class="noclass" width="54px">
                            <tr>
                                <td colspan="3" style="font-size: xx-small">
                                    <asp:Literal ID="m_litTertiaryRepOption" Text="<%$ Resources : Default,LabelTertiaryOption %>" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td align="center" class="nopadding">
                                    <asp:Literal ID="m_litTretOptOrganicHeader" Text="1" runat="server" />
                                </td>
                                <td align="center" class="nopadding">
                                    <asp:Literal ID="m_litTretOptRefurbishedHeader" Text="2" runat="server" />
                                </td>
                                <td align="center" class="nopadding">
                                    <asp:Literal ID="m_litTretOptNewHeader" Text="3" runat="server" />
                                </td>
                            </tr>
                        </table>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <table width="54px">
                            <tr>
                                <td style="font-size: xx-small; width: 18px" align="right" class="nopadding">
                                    <asp:Literal ID="m_litTretOptOrganic" runat="server" />
                                </td>
                                <td style="font-size: xx-small; width: 18px" align="right" class="nopadding">
                                    <asp:Literal ID="m_litTretOptRefurbished" runat="server" />
                                </td>
                                <td style="font-size: xx-small; width: 18px" align="right" class="nopadding">
                                    <asp:Literal ID="m_litTretOptNew" runat="server" />
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:TemplateField>
                <%--<asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal ID="m_litOrganicCostHeader" Text="Primary Organic Cost" runat="server"
                            />
                        <br />
                        <uc:CustomSorter ID="m_csOrganicCost" SortExpression="REPAIRED_COST" runat="server"
                            OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Literal ID="m_litOrganicCost" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>--%>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal ID="m_litRefurbedCostHeader" Text="<%$ Resources : ServicePlanManagement,LabelPrimaryNonDashNewCost %>" runat="server"
                            />
                        <br />
                        <uc:CustomSorter ID="m_csRefurbedCost" SortExpression="MFG_REFURBISHED_COST" runat="server"
                            OnSortAscendingClicked="customSorter_SortClicked" OnSortDescendingClicked="customSorter_SortClicked" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Literal ID="m_litRefurbedCost" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Literal ID="m_litNewCostHeader" Text="<%$ Resources : ServicePlanManagement,LabelPrimaryNewCost %>" runat="server" />
                        <br />
                        <uc:CustomSorter ID="m_csNewCost" SortExpression="NEW_SKU" runat="server" OnSortAscendingClicked="customSorter_SortClicked"
                            OnSortDescendingClicked="customSorter_SortClicked" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Literal ID="m_litNewCost" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField  Visible="false">
                    <HeaderTemplate>
                        <asp:Literal ID="m_litDeductibleHeader" Text="<%$ Resources : Default,HeaderTextDeductible %>" runat="server" 
                            Visible="false" />
                        <br />
                        <uc:CustomSorter ID="m_csDeductible" SortExpression="DEDUCTIBLE" runat="server" OnSortAscendingClicked="customSorter_SortClicked"
                            OnSortDescendingClicked="customSorter_SortClicked" Visible="false" />
                        <br />
                        <br />
                    </HeaderTemplate>
                    <HeaderStyle Width="6%" />
                    <ItemTemplate>
                        <asp:Literal ID="m_litDeductible" runat="server" 
                            Visible="false" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <PagerTemplate>
                <cc1:HitsPager ID="HitsPager1" runat="server" />
            </PagerTemplate>
            <PagerSettings Mode="NumericFirstLast" />
            <RowStyle HorizontalAlign="Left" VerticalAlign="Top" Font-Size="XX-Small" />
            <EditRowStyle HorizontalAlign="Left" VerticalAlign="Top" />
            <HeaderStyle Font-Size="XX-Small" />
        </cc1:HitsSearchGridView>
        <br />
    </asp:Panel>
    <asp:Label ID="m_lblNoFound" Font-Bold="True" ForeColor="Red" runat="server" Visible="False"
        Text="<%$ Resources : Default,LabelNoResultsFound %>" />
    <!----------------------------------Data Source---------------------------------->
    <asp:ObjectDataSource ID="m_objOrgDataSource" runat="server" SelectMethod="Select"
        SelectCountMethod="SelectCount" TypeName="ModelMatrixDataSource" EnablePaging="True">
        <SelectParameters>
            <asp:SessionParameter DefaultValue="null" Name="objModelMatrixDataSearch" SessionField="ModelMatrixSearchCriteria_SessionKey"
                Type="Object" />
            <asp:ControlParameter ControlID="m_gvModelMatrix" DefaultValue="" Name="startRowIndex"
                PropertyName="PageIndex" Type="Int32" />
            <asp:Parameter DefaultValue="10" Name="maximumRows" Type="Int32" />
            <asp:SessionParameter Name="strModelMatrixSortExpression" SessionField="ModelMatrixSortExpression_SessionKey"
                Type="Object" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <!-------------------------------------------------------------------->
    <script language="javascript" type="text/javascript">
        Sys.Application.add_load(setStyle);
        $(document).ready(function() {
            $(':input[value=Clear]').click(function() {
                var ddlProgramType = $('#<%= m_ddlProgramType.ClientID %>');
                ddlProgramType.html('<option value="0">All</options>');
                ddlProgramType.val('0');
            });
        });

        function setStyle() {
            var rv = -1; // Return value assumes failure.
            var orgDiv = $('#DivOrganization');
            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 && rv <= 8.0) {
                    orgDiv.attr('style', 'margin-right: 260px; width: 400px; margin-left: 50px;');
                }              
                else {
                    orgDiv.attr('style', 'margin-right: 275px; width: 400px; margin-left: 50px;');

                }
            } else if (navigator.appName == 'Netscape') {
                var usAg = navigator.userAgent;
                var reg = new RegExp("Trident/.*rv:([0-9]{1,}[\.0-9]{0,})");
                if (reg.exec(usAg) != null)
                    rv = parseFloat(RegExp.$1);
                if (rv == 11.0 || rv > 11.0) {
                    orgDiv.attr('style', 'margin-right: 275px; width: 400px; margin-left: 50px;');
                }
            }
        }
    </script>
</asp:Content>
