<%@ page language="VB" masterpagefile="~/MasterPage.master" autoeventwireup="false" inherits="Horariospessoal, App_Web_fzicym0g" title="Cronos - Módulo web" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
        <tr>
            <td align="left" colspan="34" style="height: 20px; background-color: #5d7b9d; text-align: center">
            <asp:Label ID="NomeForm" runat="server" Font-Bold="True" Font-Size="X-Small" ForeColor="Yellow" Text="Horários de Pessoal / Grelha"></asp:Label></td>
        </tr>
        <tr>
            <td colspan="20" style="height: 20px; background-color: #5d7b9d; text-align: left" >
                <asp:Label ID="RotuloFiltro" runat="server" Text="Filtro:" ForeColor= "White" ></asp:Label>
                <asp:DropDownList ID="txtFiltro" runat="server" BackColor="#D6E0EE" Font-Size="X-Small"  AutoPostBack="True">
                <asp:ListItem></asp:ListItem></asp:DropDownList>&nbsp;
                <asp:Label ID="LabelValor1" runat="server" Text="Valor: " ForeColor="White" Visible="False"></asp:Label>
                <asp:TextBox ID="txtFiltroValor1" runat="server" Font-Size="X-Small" Visible="False" Width="55px"></asp:TextBox>
                <asp:DropDownList ID="cboCampo1" runat="server" AutoPostBack="True" Font-Size="X-Small" Visible="False"></asp:DropDownList>
                <asp:ImageButton ID="btnPesquisarCampo1" runat="server" ImageUrl="~/Imagens/LupaMais.png" ToolTip="Pesquisar" Visible="False" />
                <asp:ImageButton ID="btnOcultarPesquisarCampo1" runat="server" ImageUrl="~/Imagens/LupaMenos.png" ToolTip="Ocultar pesquisa" Visible="False" />&nbsp;
                <asp:ImageButton ID="btnEditPesquisaCampo1" runat="server" ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar Ordenação Pesquisa" Visible="False" />
                <asp:TextBox ID="txtFiltroData1" runat="server" Font-Size="X-Small" Visible="False" Width="55px"></asp:TextBox>
                <asp:Label ID="LabelValor2" runat="server" Text="Valor: " ForeColor="White" Visible="False"></asp:Label>
                <asp:TextBox ID="txtFiltroValor2" runat="server" Font-Size="X-Small" Width="55px" Visible="False"></asp:TextBox>
                <asp:DropDownList ID="cboCampo2" runat="server" AutoPostBack="True" Font-Size="X-Small" Visible="False"> </asp:DropDownList>
                <asp:ImageButton ID="btnPesquisarCampo2" runat="server" ImageUrl="~/Imagens/LupaMais.png" ToolTip="Pesquisar" Visible="False" />
                <asp:ImageButton ID="btnOcultarPesquisarCampo2" runat="server" ImageUrl="~/Imagens/LupaMenos.png" ToolTip="Ocultar pesquisa" Visible="False" />&nbsp;
                <asp:ImageButton ID="btnEditPesquisaCampo2" runat="server" ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar Ordenação Pesquisa" Visible="False" />
                <asp:TextBox ID="txtFiltroData2" runat="server" Font-Size="X-Small"  Width="55px" Visible="False"></asp:TextBox>
                <asp:Label ID="LabelValor3" runat="server" Text="Valor: " ForeColor="White" Visible="False"></asp:Label>
                <asp:TextBox ID="txtFiltroValor3" runat="server" Font-Size="X-Small" Width="55px" Visible="False"></asp:TextBox>
                <asp:DropDownList ID="cboCampo3" runat="server" AutoPostBack="True" Font-Size="X-Small" Visible="False"></asp:DropDownList>
                <asp:ImageButton ID="btnPesquisarCampo3" runat="server" ImageUrl="~/Imagens/LupaMais.png" ToolTip="Pesquisar" Visible="False" />
                <asp:ImageButton ID="btnOcultarPesquisarCampo3" runat="server" ImageUrl="~/Imagens/LupaMenos.png" ToolTip="Ocultar pesquisa" Visible="False" />&nbsp;
                <asp:ImageButton ID="btnEditPesquisaCampo3" runat="server" ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar Ordenação Pesquisa" Visible="False" />
                <asp:TextBox ID="txtFiltroData3" runat="server" Font-Size="X-Small" Visible="False" Width="55px"></asp:TextBox>
                <asp:ImageButton ID="Pesquisar3" runat="server" ImageUrl="~/Imagens/Lupa2.png" ToolTip="Executar filtro" OnClientClick="target=''" Width="24px" Visible="False"/>
                <asp:Label ID="LabelValor4" runat="server" Text="Valor: " ForeColor="White" Visible="False"></asp:Label>
                <asp:TextBox ID="txtFiltroValor4" runat="server" Font-Size="X-Small" Width="55px" Visible="False"></asp:TextBox>
                <asp:DropDownList ID="cboCampo4" runat="server" AutoPostBack="True" Font-Size="X-Small" Visible="False"></asp:DropDownList>
                <asp:ImageButton ID="btnPesquisarCampo4" runat="server" ImageUrl="~/Imagens/LupaMais.png" ToolTip="Pesquisar" Visible="False" />
                <asp:ImageButton ID="btnOcultarPesquisarCampo4" runat="server" ImageUrl="~/Imagens/LupaMenos.png" ToolTip="Ocultar pesquisa" Visible="False" />&nbsp;
                <asp:ImageButton ID="btnEditPesquisaCampo4" runat="server" ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar Ordenação Pesquisa" Visible="False" />
                <asp:TextBox ID="txtFiltroData4" runat="server" Font-Size="X-Small" Visible="False" Width="55px"></asp:TextBox>
                <asp:ImageButton ID="Pesquisar4" runat="server" ImageUrl="~/Imagens/Lupa2.png" ToolTip="Executar filtro" OnClientClick="target=''" Width="24px" Visible="False"/>
                <asp:Label ID="LabelValor5" runat="server" Text="Valor: " ForeColor="White" Visible="False"></asp:Label>
                <asp:TextBox ID="txtFiltroValor5" runat="server" Font-Size="X-Small" Width="55px" Visible="False"></asp:TextBox>
                <asp:DropDownList ID="cboCampo5" runat="server" AutoPostBack="True" Font-Size="X-Small" Visible="False"></asp:DropDownList>
                <asp:ImageButton ID="btnPesquisarCampo5" runat="server" ImageUrl="~/Imagens/LupaMais.png" ToolTip="Pesquisar" Visible="False" />
                <asp:ImageButton ID="btnOcultarPesquisarCampo5" runat="server" ImageUrl="~/Imagens/LupaMenos.png" ToolTip="Ocultar pesquisa" Visible="False" />&nbsp;
                <asp:ImageButton ID="btnEditPesquisaCampo5" runat="server" ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar Ordenação Pesquisa" Visible="False" />
                <asp:TextBox ID="txtFiltroData5" runat="server" Font-Size="X-Small" Visible="False" Width="55px"></asp:TextBox>
                <asp:ImageButton ID="Pesquisar5" runat="server" ImageUrl="~/Imagens/Lupa2.png" ToolTip="Executar filtro" OnClientClick="target=''" Width="24px" Visible="False"/>
                <asp:Label ID="LabelValor6" runat="server" Text="Valor: " ForeColor="White"  Visible="False"></asp:Label>
                <asp:TextBox ID="txtFiltroValor6" runat="server" Font-Size="X-Small" Width="55px" Visible="False"></asp:TextBox>
                <asp:DropDownList ID="cboCampo6" runat="server" AutoPostBack="True" Font-Size="X-Small" Visible="False"></asp:DropDownList>
                <asp:ImageButton ID="btnPesquisarCampo6" runat="server" ImageUrl="~/Imagens/LupaMais.png" ToolTip="Pesquisar" Visible="False" />
                <asp:ImageButton ID="btnOcultarPesquisarCampo6" runat="server" ImageUrl="~/Imagens/LupaMenos.png" ToolTip="Ocultar pesquisa" Visible="False" />&nbsp;
                <asp:ImageButton ID="btnEditPesquisaCampo6" runat="server" ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar Ordenação Pesquisa" Visible="False" />
                <asp:TextBox ID="txtFiltroData6" runat="server" Font-Size="X-Small" Visible="False" Width="55px"></asp:TextBox>
                <asp:ImageButton ID="Pesquisar6" runat="server" ImageUrl="~/Imagens/Lupa2.png" ToolTip="Executar filtro" OnClientClick="target=''" Width="24px" Visible="False"/>
            </td>
            <td colspan="14" style="height: 20px; background-color: #5d7b9d; text-align: Right" >
                <asp:ImageButton ID="lnkActualizar" runat="server" ImageUrl="~/Imagens/Proc.Ico" EnableTheming="False" ToolTip="Actualizar." Width="30px" OnClientClick="target=''"/>
                <asp:ImageButton ID="lnkInserir" runat="server" ImageUrl="~/Imagens/Add.png" ToolTip="Inserir novo horário ou ausência." Width="30px" Visible="True" OnClientClick="target=''"/>
                <%--<asp:ImageButton ID="btnTurnoDataGrelhaTeorico" runat="server" ImageUrl="~/Imagens/Escalas.png" ToolTip="Gestão de turnos / escalas" Width="30px" Visible="True"/>--%>
                <asp:ImageButton ID="btnControlo2CentroCustoCategoria" runat="server" ImageUrl="~/Imagens/Calendario1.png" PostBackUrl="~/Controlo2CentroCustoCategoria.aspx" ToolTip="Controlo por centro de custo / categoria" Width="30px" OnClientClick="target=''"/>
                <asp:ImageButton ID="btnHorariosDataVigor" runat="server" ImageUrl="~/Imagens/PessoalHorario.png" ToolTip="Horários Pessoal - Data em Vigor" Width="30px" OnClientClick="target=''"/>
                <asp:ImageButton ID="btnTurnoDataGrelha" runat="server" ImageUrl="~/Imagens/Escalas.png" ToolTip="Gestão de turnos / escalas" Width="30px" Visible="True" OnClientClick="target=''"/>
                <asp:ImageButton ID="btnHorariosPontoComparar" runat="server" ImageUrl="~/Imagens/Calendario1.png" PostBackUrl="HorariosPessoalPonto.aspx" ToolTip="Horário / Ponto" Width="30px" OnClientClick="target=''"/>
                <asp:ImageButton ID="btnTabelasAuxiliares" runat="server" ImageUrl="~/Imagens/Tabelas.png" ToolTip="Configurar tabelas auxiliares" Width="30px" Visible="True" OnClientClick="target=''"/>
                <asp:ImageButton ID="btnOpenOffice" runat="server" ImageUrl="~/Imagens/OpenOffice.png" ToolTip="Exportar para Csv / Open Office" Width="30px" OnClientClick="target=''"/>
                <asp:ImageButton ID="btnExcel" runat="server" ImageUrl="~/Imagens/Excel.png" ToolTip="Exportar para Excel" Width="30px" OnClientClick="target=''"/>
                <asp:ImageButton ID="btnWord" runat="server" ImageUrl="~/Imagens/Word.png" ToolTip="Exportar para Word" Width="30px" OnClientClick="target=''"/>
                <asp:ImageButton ID="lnkMail" runat="server" ImageUrl="~/Imagens/Mail.png" ToolTip="Enviar Impressão por E-Mail" Width="30px" Visible="False" OnClientClick="target=''"/>
                <asp:ImageButton ID="btnImprimir" runat="server" ImageUrl="~/Imagens/print.gif" ToolTip="Imprimir" Width="30px" OnClientClick="target=''"/>
            </td>
        </tr>
        <tr>
            <td colspan="34" style="height: 20px; background-color: White; text-align: center"> 
                <asp:Label ID="lblMsg" runat="server" Visible="False"></asp:Label>&nbsp;&nbsp;
                <asp:Label ID="lblFiltroContador" runat="server" Visible="False" BackColor="White"></asp:Label>&nbsp;
                <asp:Label ID="lblIndex" runat="server" Visible="False">NumeroEmpregado</asp:Label>
                <asp:Label ID="lblAccao" runat="server" Visible="False"></asp:Label>
                <%--<asp:Label ID="lblSqlFiltro" runat="server" Visible="False" BackColor="White"></asp:Label>&nbsp;--%>
                <%--<asp:Label ID="lblSqlFiltroRegisto" runat="server" Visible="False" BackColor="White"></asp:Label>&nbsp;--%>
                <asp:Label ID="lblNumeroEmpregado" runat="server" Visible="False" BackColor="White"></asp:Label>&nbsp;
                <asp:Label ID="lblTodosHorarios" runat="server" Visible="False" BackColor="White"></asp:Label>&nbsp;
                <asp:Label ID="lblTodosTurnos" runat="server" Visible="False" BackColor="White"></asp:Label>&nbsp;
                <asp:Label ID="lblFiltroHorario" runat="server" Visible="False" BackColor="White"></asp:Label>&nbsp;
                <asp:Label ID="lblAno" runat="server" Visible="False"></asp:Label> 
                <asp:Label ID="lblDataMesesIni" runat="server" Visible="False"></asp:Label> 
                <asp:Label ID="lblDataMesesFim" runat="server" Visible="False"></asp:Label> 
                <asp:Label ID="lblDataInicio" runat="server" Visible="False"></asp:Label> 
                <asp:Label ID="lblDataFim" runat="server" Visible="False"></asp:Label> 
                <asp:Label ID="lblPessoalCentrosCusto" runat="server" Visible="False"></asp:Label>&nbsp;
                <asp:Label ID="lblEsta_Opcao" runat="server" Visible="False"></asp:Label> 
                <asp:Label ID="lblSqlFiltroOpcao19" runat="server" Visible="False" BackColor="White"></asp:Label>&nbsp;
                <asp:Label ID="lblCentrosCusto" runat="server" Visible="False"></asp:Label>&nbsp;
                <asp:Label ID="lblCampoCor" runat="server" Visible="False"></asp:Label>&nbsp;
                <%--<asp:Label ID="lblHorariosPeriodosRegistos" runat="server" Visible="False"></asp:Label>&nbsp;--%>
            </td>
        </tr>
        <tr>
            <td colspan="34" style="text-align: center">
            <asp:Panel ID="pnlEdit" runat="server" Visible="False" Width="100%">
                <table border="0" cellpadding="0" cellspacing="0" style="border-right: black 1px solid;
                        border-top: black 1px solid; border-left: black 1px solid; width: 100%; border-bottom: black 1px solid;
                        background-color: #d6e0ee">
                    <tr>
                        <td colspan="34" style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <asp:Label ID="Label8" runat="server" Text="Empregado:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="cboNumeroEmpregado" runat="server" AutoPostBack="True" Enabled="False" Font-Size="X-Small">
                            </asp:DropDownList>&nbsp;
                            <asp:ImageButton ID="btnIndex" runat="server" 
                                ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar ordenação." Width="16px" />&nbsp;
                            <%--<asp:DropDownList ID="cboNome" runat="server" Enabled="False" 
                                Font-Size="X-Small" Visible="False" >
                            </asp:DropDownList>&nbsp;&nbsp;--%>
                            <asp:Label ID="RotuloDataVigor" runat="server" Text="Data em Vigor:"></asp:Label>&nbsp;
                            <asp:TextBox ID="txtDataVigor" runat="server" BorderColor="Black" 
                                BorderWidth="1px" Enabled="False" Font-Size="X-Small" Width="60px" Wrap="False"></asp:TextBox>&nbsp;&nbsp;
                            <asp:Label ID="RotuloHorario_1" runat="server" Text="Horário:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="cboHorario_1" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" >
                            </asp:DropDownList>&nbsp;
                            <asp:Label ID="RotuloHorario_2" runat="server" Text="2º Horário:" 
                                Visible="False"></asp:Label>&nbsp;
                            <asp:DropDownList ID="cboHorario_2" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" Visible="False">
                            </asp:DropDownList>&nbsp;
                            <asp:Label ID="RotuloHorario_3" runat="server" Text="3º Horário:" 
                                Visible="False"></asp:Label>&nbsp;
                            <asp:DropDownList ID="cboHorario_3" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" Visible="False">
                            </asp:DropDownList>&nbsp;
                            <asp:ImageButton ID="btnActivarHorario_2" runat="server" 
                                ImageUrl="~/Imagens/Edit2.png" ToolTip="activar 2º horário" />
                            <asp:ImageButton ID="btnActivarHorario_3" runat="server" 
                                ImageUrl="~/Imagens/Edit2.png" ToolTip="activar 3º horário" />&nbsp;
                            <asp:ImageButton ID="btnHorariosEmpregado" runat="server" ImageUrl="~/Imagens/LupaMenos.png" ToolTip="Horários já associados." Visible="False" />
                            <asp:ImageButton ID="btnTodosHorarios" runat="server" ImageUrl="~/Imagens/LupaMais.png" ToolTip="Todos os horários activos." />&nbsp;&nbsp;&nbsp;
                            <asp:Label ID="RotuloFalta" runat="server" Text="Ausência:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="cboFalta" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" Width="130px">
                            </asp:DropDownList>&nbsp;
                            <asp:Label ID="RotuloHoras" runat="server" Text="Horas / dia:" Visible="True"></asp:Label>&nbsp;
                            <asp:TextBox ID="txtHoras" runat="server" BorderColor="Black" BorderWidth="1px" Font-Size="X-Small"
                                Width="38px" Visible="True"></asp:TextBox>&nbsp;&nbsp;
                            <asp:LinkButton ID="lnkSair" runat="server">Sair</asp:LinkButton>
                            <br /> <br />
                        </td>
                        </tr>
                        <tr align="center">
                            <td colspan="10" style="height: 3px; text-align: center">
                            </td>
                        </tr>
                </table>
            </asp:Panel>
            <asp:Panel ID="pnlEdit2" runat="server" Width="100%" Visible="False">
                <table border="0" cellpadding="0" cellspacing="0" style="border-right: black 1px solid;
                        border-top: black 1px solid; border-left: black 1px solid; width: 100%; border-bottom: black 1px solid;
                        background-color: #d6e0ee">
                    <tr>
                        <td colspan="34" style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <asp:Label ID="RotuloCentroCusto" runat="server" Text="Centro Custo:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="cboCentroCusto" runat="server" AutoPostBack="True" 
                                Enabled="True" Font-Size="X-Small" Visible="True">
                            </asp:DropDownList>&nbsp;&nbsp;
                            <asp:Label ID="RotuloOficina" runat="server" Text="Oficina:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="cboOficina" runat="server" AutoPostBack="True" 
                                Enabled="True" Font-Size="X-Small" Visible="True">
                            </asp:DropDownList>&nbsp;&nbsp;
                            <asp:Label ID="RotuloEmpregados2" runat="server" Text="Empregados:" 
                                Visible="False"></asp:Label>&nbsp;
                            <asp:TextBox ID="TxtEmpregados2" runat="server" BorderColor="Black" 
                                BorderWidth="1px" Font-Size="X-Small"
                                Width="200px" Visible="False" AutoPostBack="True"></asp:TextBox>
                            <asp:Label ID="RotuloEmpregado2" runat="server" Text="Empregado:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="cboNumeroEmpregado2" runat="server" AutoPostBack="True" Enabled="False" Font-Size="X-Small">
                            </asp:DropDownList>&nbsp;&nbsp;
                            <asp:ImageButton ID="btnIndex2" runat="server" ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar ordenação." Width="16px" />&nbsp;
                            <asp:ImageButton ID="btnEmpregados2" runat="server" ImageUrl="~/Imagens/EditMais.png" ToolTip="Activar / desactivar. Inserir vários empregados, separados por ','" Width="16px" />&nbsp;
                            <%--<asp:CheckBox ID="ChkHorarios" runat="server" Text="Horários: " TextAlign="Left" Width="90px" />&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkAusencias" runat="server" Text="Ausências: " TextAlign="Left" Width="90px" />&nbsp;&nbsp;
                            <asp:ImageButton ID="btnGravarOpoes2" runat="server" ImageUrl="~/Imagens/Edit2.png" ToolTip="Gravar." />&nbsp;&nbsp;&nbsp;&nbsp;--%>

                            <asp:Label ID="RotuloHorario2_1" runat="server" Text="Horário:"></asp:Label>&nbsp;&nbsp;
                            <asp:DropDownList ID="cboHorario2_1" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" Width="130px">
                            </asp:DropDownList>&nbsp;
                            <asp:Label ID="RotuloHorario2_2" runat="server" Text="2º Horário:" 
                                Visible="False"></asp:Label>&nbsp;&nbsp;
                            <asp:DropDownList ID="cboHorario2_2" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" Width="130px" Visible="False">
                            </asp:DropDownList>&nbsp;
                            <asp:Label ID="RotuloHorario2_3" runat="server" Text="3º Horário:" 
                                Visible="False"></asp:Label>&nbsp;&nbsp;
                            <asp:DropDownList ID="cboHorario2_3" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" Width="130px" Visible="False">
                            </asp:DropDownList>&nbsp;
                            <asp:ImageButton ID="btnActivarHorario2_2" runat="server" 
                                ImageUrl="~/Imagens/Edit2.png" ToolTip="activar 2º horário" 
                                Visible="False" />&nbsp;&nbsp;
                            <asp:ImageButton ID="btnActivarHorario2_3" runat="server" 
                                ImageUrl="~/Imagens/Edit2.png" ToolTip="activar 3º horário" 
                                Visible="False" />&nbsp;&nbsp;
                            <asp:ImageButton ID="btnHorariosEmpregado2" runat="server" 
                                ImageUrl="~/Imagens/LupaMenos.png" ToolTip="Horários empregado." Visible="False" />
                            <asp:ImageButton ID="btnTodosHorarios2" runat="server" ImageUrl="~/Imagens/LupaMais.png" ToolTip="Todos os horários activos." />&nbsp;&nbsp;&nbsp;
                            <asp:Label ID="RotuloTurno2" runat="server" Text="Turno:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="cboTurno2" runat="server" AutoPostBack="True" Font-Size="X-Small" Width="130px">
                            </asp:DropDownList>&nbsp;
                            <asp:ImageButton ID="btnTurnosEmpregado2" runat="server" 
                                ImageUrl="~/Imagens/LupaMenos.png" ToolTip="Turnos empregado." Visible="False" />
                            <asp:ImageButton ID="btnTodosTurnos2" runat="server" ImageUrl="~/Imagens/LupaMais.png" ToolTip="Todos os turnos activos." />&nbsp;&nbsp;&nbsp;
                            <asp:Label ID="RotuloFalta2" runat="server" Text="Ausência:"></asp:Label>&nbsp;&nbsp;
                            <asp:DropDownList ID="cboFalta2" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" Width="130px">
                            </asp:DropDownList>&nbsp;&nbsp;
                            <asp:Label ID="RotuloHoras2" runat="server" Text="Horas / dia:" Visible="False"></asp:Label>&nbsp;
                            <asp:TextBox ID="txtHoras2" runat="server" BorderColor="Black" BorderWidth="1px" Font-Size="X-Small"
                                Width="38px" Visible="False"></asp:TextBox>&nbsp;&nbsp;
                            <asp:ImageButton ID="btnEliminarFalta" runat="server" 
                                ImageUrl="~/Imagens/Delete2.png" ToolTip="Eliminar Falta." />
                        </td>
                    </tr>
                    <tr>
                    <td colspan="34" style="height: 20px; background-color: #d6e0ee; text-align: left ">
                    <asp:Label ID="RotuloDiadeSemana" runat="server" Text="Activar/desactivar dia da semana:"></asp:Label>&nbsp;
                    <asp:CheckBox ID="ChkDom" runat="server" Text="Dom" TextAlign="Left" Width="10px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:CheckBox ID="ChkSeg" runat="server" Text="Seg" TextAlign="Left" Width="10px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:CheckBox ID="ChkTer" runat="server" Text="Ter" TextAlign="Left" Width="10px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:CheckBox ID="ChkQua" runat="server" Text="Qua" TextAlign="Left" Width="10px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:CheckBox ID="ChkQui" runat="server" Text="Qui" TextAlign="Left" Width="10px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:CheckBox ID="ChkSex" runat="server" Text="Sex" TextAlign="Left" Width="10px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:CheckBox ID="ChkSab" runat="server" Text="Sab" TextAlign="Left" Width="10px" AutoPostBack="True" />&nbsp;&nbsp;&nbsp;&nbsp;
                    </td>
                    </tr>
                    <tr>
                        <td colspan="34" 
                            style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <asp:Label ID="RotuloAno" runat="server" Text="Ano:"></asp:Label>&nbsp;
                            <asp:TextBox ID="txtAno" runat="server" BorderColor="Black" 
                                BorderWidth="1px" Enabled="False" Font-Size="X-Small" Width="30px" Wrap="False"></asp:TextBox>&nbsp;&nbsp;
                            <asp:Label ID="RotuloMes" runat="server" Text="Mês:"></asp:Label>&nbsp;
                            <asp:DropDownList ID="cboMes2" runat="server" AutoPostBack="True" 
                                Enabled="True" Font-Size="X-Small" Visible="True">
                            </asp:DropDownList>
                            &nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia1" runat="server" AutoPostBack="True" 
                                Text="&nbsp;&nbsp;1" TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia2" runat="server" AutoPostBack="True" 
                                Text="&nbsp;&nbsp;2" TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia3" runat="server" AutoPostBack="True" 
                                Text="&nbsp;&nbsp;3" TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia4" runat="server" AutoPostBack="True" 
                                Text="&nbsp;&nbsp;4" TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia5" runat="server" AutoPostBack="True" 
                                Text="&nbsp;&nbsp;5" TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia6" runat="server" AutoPostBack="True" 
                                Text="&nbsp;&nbsp;6" TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia7" runat="server" AutoPostBack="True" 
                                Text="&nbsp;&nbsp;7" TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia8" runat="server" AutoPostBack="True" 
                                Text="&nbsp;&nbsp;8" TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia9" runat="server" AutoPostBack="True" 
                                Text="&nbsp;&nbsp;9" TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia10" runat="server" AutoPostBack="True" Text="&nbsp;10" 
                                TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia11" runat="server" AutoPostBack="True" Text="&nbsp;11" 
                                TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia12" runat="server" AutoPostBack="True" Text="&nbsp;12" 
                                TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia13" runat="server" AutoPostBack="True" Text="&nbsp;13" 
                                TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia14" runat="server" AutoPostBack="True" Text="&nbsp;14" 
                                TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia15" runat="server" AutoPostBack="True" Text="&nbsp;15" 
                                TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia16" runat="server" AutoPostBack="True" Text="&nbsp;16" 
                                TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia17" runat="server" AutoPostBack="True" Text="&nbsp;17" 
                                TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia18" runat="server" AutoPostBack="True" Text="&nbsp;18" 
                                TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia19" runat="server" AutoPostBack="True" Text="&nbsp;19" 
                                TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia20" runat="server" AutoPostBack="True" Text="&nbsp;20" 
                                TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia21" runat="server" AutoPostBack="True" Text="&nbsp;21" 
                                TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia22" runat="server" AutoPostBack="True" Text="&nbsp;22" 
                                TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia23" runat="server" AutoPostBack="True" Text="&nbsp;23" 
                                TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia24" runat="server" AutoPostBack="True" Text="&nbsp;24" 
                                TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia25" runat="server" AutoPostBack="True" Text="&nbsp;25" 
                                TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia26" runat="server" AutoPostBack="True" Text="&nbsp;26" 
                                TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia27" runat="server" AutoPostBack="True" Text="&nbsp;27" 
                                TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia28" runat="server" AutoPostBack="True" Text="&nbsp;28" 
                                TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia29" runat="server" AutoPostBack="True" Text="&nbsp;29" 
                                TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia30" runat="server" AutoPostBack="True" Text="&nbsp;30" 
                                TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:CheckBox ID="ChkDia31" runat="server" AutoPostBack="True" Text="&nbsp;31" 
                                TextAlign="Left" Width="10px" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:ImageButton ID="btnActivarDias" runat="server" 
                                ImageUrl="~/Imagens/Edit2.png" ToolTip="Activar/Desactivar todos os dias" />
                            &nbsp;&nbsp;
                            <asp:LinkButton ID="btnGravar2" runat="server">Gravar</asp:LinkButton>
                            &nbsp;&nbsp;
                            <asp:LinkButton ID="btnSair2" runat="server">Sair</asp:LinkButton>
                            <br /> <br />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            </td>
        </tr>

        <tr>
        <td colspan="34" style="text-align: center">
            <asp:Panel ID="pnlTabelasAuxiliares" runat="server" Visible="False" Width="100%">
            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; background-color: #d6e0ee">
                <tr>
                    <td style="height: 20px; background-color: #d6e0ee; text-align: center">
                        <asp:Label ID="RotuloTabela" runat="server" Font-Size="X-Small" Text="Tabela:"></asp:Label>&nbsp;&nbsp;
                        <asp:DropDownList ID="cboTabela" runat="server" AutoPostBack="True" 
                            Font-Size="X-Small" Width="200px" Height="20px"> </asp:DropDownList>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Label ID="RotuloAbreviaturaExcelLimites" runat="server" 
                            Text="Limites abreviatura na exportação para excel:" Visible="False"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtAbreviaturaExcelLimites" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Width="10px" Visible="False"></asp:TextBox>&nbsp;
                    </td>
                </tr> 
                <tr>
                    <td style="height: 30px; background-color: #d6e0ee; text-align: center">
                        <br /> 
                        <asp:Label ID="RotuloCodigoTabelaAuxiliar" runat="server" Text="Código:"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtCodigoTabelaAuxiliar" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Width="47px"></asp:TextBox>&nbsp;
                        <asp:Label ID="RotuloDescricaoTabelaAuxiliar" runat="server" Text="Descrição:"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtDescricaoTabelaAuxiliar" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Width="235px"></asp:TextBox>&nbsp;
                        <asp:Label ID="RotuloAbreviaturaTabelaAuxiliar" runat="server" Text="Abreviatura:"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtAbreviaturaTabelaAuxiliar" runat="server" BorderColor="Black" BorderWidth="1px" Font-Size="X-Small" Width="80px"></asp:TextBox>&nbsp;
                        <asp:Label ID="RotuloCorTextoTabelaAuxiliar" runat="server" Text="Cor Texto:" ></asp:Label>&nbsp;
                        <asp:TextBox ID="txtCorTextoTabelaAuxiliar" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Width="40px" ></asp:TextBox>&nbsp;&nbsp;
                        <asp:ImageButton ID="btnCorTextoTabelaAuxiliar" runat="server" 
                                ImageUrl="~/Imagens/Edit2.png" ToolTip="Escolher cor" Width="16px" />&nbsp;&nbsp;
                        <asp:Label ID="RotuloCorFundoTabelaAuxiliar" runat="server" Text="Cor Fundo:" ></asp:Label>&nbsp;
                        <asp:TextBox ID="txtCorFundoTabelaAuxiliar" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Width="40px" ></asp:TextBox>&nbsp;&nbsp;
                        <asp:ImageButton ID="btnCorFundoTabelaAuxiliar" runat="server" 
                                ImageUrl="~/Imagens/Edit2.png" ToolTip="Escolher cor" Width="16px" />&nbsp;&nbsp;

                        <asp:Label ID="RotuloCpo3" runat="server" Text="" Visible="False"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtcpo3" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Width="60px" Visible="False" ></asp:TextBox>&nbsp;&nbsp;
                        <%--<asp:Label ID="RotuloCpo4" runat="server" Text="" Visible="False" ></asp:Label>&nbsp;
                        <asp:TextBox ID="txtcpo4" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Width="60px" Visible="False" ></asp:TextBox>&nbsp;&nbsp;--%>
                        <%--<asp:ImageButton ID="btnCor" runat="server" 
                                ImageUrl="~/Imagens/Edit2.png" ToolTip="Escolher cor" Width="16px" />&nbsp;&nbsp;--%>
                        <asp:Label ID="RotuloCpo5" runat="server" Text="" Visible="False" ></asp:Label>&nbsp;
                        <asp:TextBox ID="txtcpo5" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Width="60px" Visible="False" ></asp:TextBox>&nbsp;&nbsp;
                        <asp:Label ID="RotuloCpo6" runat="server" Visible="False"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtcpo6" runat="server" BorderColor="Black" BorderWidth="1px" 
                            Font-Size="X-Small" Visible="False" Width="60px"></asp:TextBox>&nbsp;&nbsp;
                        <asp:LinkButton ID="lnkTabelaAuxiliarGravar" runat="server">Gravar</asp:LinkButton>&nbsp;&nbsp;
                            <asp:ImageButton ID="btnTabelaAuxiliarNovoFiltro" runat="server" 
                                ImageUrl="~/Imagens/Add2.png" ToolTip="Novo registo." />&nbsp;&nbsp;
                            <asp:ImageButton ID="btnTabelaAuxiliarAlterarFiltro" runat="server" 
                                ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar registo." Width="16px" />&nbsp;&nbsp;
                        <asp:LinkButton ID="lnkTabelaAuxiliarSair" runat="server">Sair</asp:LinkButton>
                        <br />  <br />
                        <asp:GridView ID="grdDadosTabelasAuxiliares" runat="server" CellPadding="4" HorizontalAlign="Center" 
                                AllowPaging="True" PageSize="12" Width="702px" AutoGenerateColumns="False" RowStyle-HorizontalAlign="Left"> 
                            <Columns>
                                <asp:CommandField SelectText="" ShowSelectButton="True" ButtonType="Image" 
                                    SelectImageUrl="~/Imagens/Edit2.png" 
                                    DeleteImageUrl="~/Imagens/Delete2.png" ShowDeleteButton="True" />
                                <asp:BoundField DataField="Codigo" HeaderText="Código" />
                                <asp:BoundField DataField="Descricao" HeaderText="Descrição" />
                                <asp:TemplateField HeaderText="Tipo de horas">
                                <ItemTemplate>
                                    <asp:DropDownList ID="dropTipoHoras" runat="server" AutoPostBack="True" 
                                        Font-Size="X-Small" CssClass="drop" Height="19px" onload="dropTipoHoras_Load" 
                                        onselectedindexchanged="dropTipoHoras_SelectedIndexChanged" >
                                    </asp:DropDownList>
                                    </span>
                                </ItemTemplate>                            
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Descanso / Trabalho">
                                    <ItemTemplate>
                                        <asp:DropDownList ID="DropDescanso" runat="server" AutoPostBack="True" 
                                            onselectedindexchanged="DropDescanso_SelectedIndexChanged" 
                                            SelectedValue='<%# Bind("Descanso") %>' Font-Size="X-Small" Height="19px">
                                            <asp:ListItem></asp:ListItem>
                                            <asp:ListItem Value="-1">Descanso</asp:ListItem>
                                            <asp:ListItem Value="0">Trabalho</asp:ListItem>
                                        </asp:DropDownList>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Activo">
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkTurnoActivo" runat="server" AutoPostBack="True" OnCheckedChanged="chkTurnoActivo_Clicked" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="TipoHoras" HeaderText="" />
                                <asp:BoundField DataField="Descanso" HeaderText="" />
                                <asp:BoundField DataField="Activo" HeaderText="" />
                            </Columns>
                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                            <EditRowStyle BackColor="#999999" />
                            <PagerSettings Visible="true"  Position="Bottom" Mode="NextPreviousFirstLast" FirstPageImageUrl="Imagens/SetaPrimeiro.png" PreviousPageImageUrl="Imagens/SetaEsquerda.png" NextPageImageUrl="Imagens/SetaDireita.png" LastPageImageUrl="Imagens/SetaUltimo.png" />
                            <PagerStyle BackColor="#F7F6F3" ForeColor="#5D7B9D" Font-Size="Small" HorizontalAlign="Center" />
                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                        </asp:GridView>

                        <asp:GridView ID="grdDadosTabelaFaltas" runat="server" 
                        AutoGenerateColumns="False" CellPadding="4" HorizontalAlign="Center" 
                            PageSize="4" Width="1400px">
                        <Columns>
                            <asp:CommandField SelectText="" ShowSelectButton="True" ButtonType="Image" 
                                SelectImageUrl="~/Imagens/Edit2.png" 
                                DeleteImageUrl="~/Imagens/Delete2.png" ShowDeleteButton="True" 
                                HeaderText="      " />
                            <asp:BoundField DataField="CodigoFalta" HeaderText="Código" />
                            <asp:BoundField DataField="Descricao" HeaderText="Descrição" />
                            <asp:BoundField DataField="Abreviatura" HeaderText="Abreviatura" />
                            <asp:TemplateField HeaderText="Tipo">
                                <ItemTemplate>
                                <asp:DropDownList ID="DropTipoFalta" runat="server" AutoPostBack="True" 
                                    Font-Size="X-Small" CssClass="drop" Height="19px" onload="DropTipoFalta_Load" 
                                    onselectedindexchanged="DropTipoFalta_SelectedIndexChanged">
                                </asp:DropDownList>
                                </span>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <%--<asp:TemplateField HeaderText="Unidades">
                                <ItemTemplate>
                                <asp:DropDownList ID="DropUnidadesTempo" runat="server" AutoPostBack="True" 
                                    Font-Size="X-Small" CssClass="drop" Height="19px" onload="DropUnidadesTempo_Load" 
                                    onselectedindexchanged="DropUnidadesTempo_SelectedIndexChanged">
                                </asp:DropDownList>
                                </span>
                                </ItemTemplate>
                            </asp:TemplateField>--%>
                            <%--<asp:BoundField DataField="Funcao" HeaderText="Função" />
                            <asp:TemplateField HeaderText="Absentismo">
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkAbsentismo" runat="server" AutoPostBack="True" OnCheckedChanged="chkAbsentismo_Clicked" />
                                </ItemTemplate>
                            </asp:TemplateField>--%>
                            <%--<asp:TemplateField HeaderText="Exp. Desc.">
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkDiasDescanso" runat="server" AutoPostBack="True" OnCheckedChanged="chkDiasDescanso_Clicked" />
                                </ItemTemplate>
                            </asp:TemplateField>--%>
                            <%--<asp:TemplateField HeaderText="Serv. Externo">
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkServicoExterno" runat="server" AutoPostBack="True" OnCheckedChanged="chkServicoExterno_Clicked" />
                                </ItemTemplate>
                            </asp:TemplateField>--%>
                            <%--<asp:TemplateField HeaderText="Desc. S. T.">
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkDescSubTransporte" runat="server" AutoPostBack="True" OnCheckedChanged="chkDescSubTransporte_Clicked" />
                                </ItemTemplate>
                            </asp:TemplateField>--%>
                            <%--<asp:TemplateField HeaderText="Activa">
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkWeb" runat="server" AutoPostBack="True" OnCheckedChanged="chkWeb_Clicked" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Prevista">
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkPrevista" runat="server" AutoPostBack="True" OnCheckedChanged="chkPrevista_Clicked" />
                                </ItemTemplate>
                            </asp:TemplateField>--%>
                            <%--<asp:TemplateField HeaderText="Sub. alimentação">
                                <ItemTemplate>
                                    <asp:DropDownList ID="DropSubAlimentacao" runat="server" AutoPostBack="True" 
                                        onselectedindexchanged="DropSubAlimentacao_SelectedIndexChanged" 
                                        SelectedValue='<%# Bind("SubAlimentacao") %>' Font-Size="X-Small" Height="19px">
                                        <asp:ListItem></asp:ListItem>
                                        <asp:ListItem Value="-1">Desconta</asp:ListItem>
                                        <asp:ListItem Value="1">Acrescenta</asp:ListItem>
                                    </asp:DropDownList>
                                </ItemTemplate>
                            </asp:TemplateField>--%>
                            <%--<asp:BoundField DataField="ConversaoCodigos" HeaderText="Conversão Exportação" />
                            <asp:TemplateField HeaderText="Exportar">
                                <ItemTemplate>
                                    <asp:DropDownList ID="DropExportarVencimentos" runat="server" AutoPostBack="True" 
                                        onselectedindexchanged="DropExportarVencimentos_SelectedIndexChanged" 
                                        SelectedValue='<%# Bind("Exportar") %>' Font-Size="X-Small" Height="19px">
                                        <asp:ListItem></asp:ListItem>
                                        <asp:ListItem Value="0">Não</asp:ListItem>
                                        <asp:ListItem Value="1">Sim</asp:ListItem>
                                    </asp:DropDownList>
                                </ItemTemplate>
                            </asp:TemplateField>--%>
                            <asp:BoundField DataField="CorTexto" HeaderText="Cor Texto" />
                            <asp:BoundField DataField="CorFundo" HeaderText="Cor Fundo" />
                            <asp:BoundField DataField="Absentismo" HeaderText="" />
                            <asp:BoundField DataField="DiasDescanso" HeaderText="" />
                            <asp:BoundField DataField="ServicoExterno" HeaderText="" />
                            <asp:BoundField DataField="DescontaSubTransporte" HeaderText="" />
                            <asp:BoundField DataField="Web" HeaderText="" />
                            <asp:BoundField DataField="Prevista" HeaderText="" />
                            <asp:BoundField DataField="TipoFalta" HeaderText="" />
                            <asp:BoundField DataField="UnidadeTempo" HeaderText="" />
                        </Columns>
                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                        <EditRowStyle BackColor="#999999" />
                        <PagerSettings Visible="true"  Position="Bottom" Mode="NextPreviousFirstLast" FirstPageImageUrl="Imagens/SetaPrimeiro.png" PreviousPageImageUrl="Imagens/SetaEsquerda.png" NextPageImageUrl="Imagens/SetaDireita.png" LastPageImageUrl="Imagens/SetaUltimo.png" />
                        <PagerStyle BackColor="#F7F6F3" ForeColor="#5D7B9D" Font-Size="Small" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    </asp:GridView>

                    </td>
                </tr>
            </table>
            </asp:Panel>
        </td>
        </tr>


        <tr>
        <td colspan="34" style="text-align: center">
        <asp:Panel ID="pnlCores" runat="server" Visible="False" Width="100%">
                <asp:ImageButton ID="btnCoresActivas" runat="server" ImageUrl="~/Imagens/LupaMenos.png" ToolTip="Cores activas." Visible="False" />
                <asp:ImageButton ID="btnCoresDesactivas" runat="server" ImageUrl="~/Imagens/LupaMais.png" ToolTip="Cores não activas." />&nbsp;&nbsp;
                <asp:LinkButton ID="lnkCoresOcular" runat="server">Ocultar</asp:LinkButton>
                <br /><br />
                <asp:GridView ID="grdDadosCores" runat="server" CellPadding="4" HorizontalAlign="Center" 
                        PageSize="4" Width="702px" AutoGenerateColumns="False" 
                    Visible="True" >
                    <Columns>
                        <asp:CommandField SelectText="" ShowSelectButton="True" ButtonType="Image" 
                            SelectImageUrl="~/Imagens/Edit2.png" />
                        <asp:BoundField DataField="ID" HeaderText="ID" />
                        <asp:BoundField DataField="Cor" HeaderText="Cor" />
                        <asp:BoundField DataField="Codigo" HeaderText="Código" />
                        <asp:TemplateField HeaderText="Activa">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkActiva" runat="server" AutoPostBack="True" OnCheckedChanged="chkActiva_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="Activa" HeaderText="CpoActiva" />
                    </Columns>
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <EditRowStyle BackColor="#999999" />
                    <PagerSettings Visible="true"  Position="Bottom" Mode="NextPreviousFirstLast" FirstPageImageUrl="Imagens/SetaPrimeiro.png" PreviousPageImageUrl="Imagens/SetaEsquerda.png" NextPageImageUrl="Imagens/SetaDireita.png" LastPageImageUrl="Imagens/SetaUltimo.png" />
                    <PagerStyle BackColor="#F7F6F3" ForeColor="#5D7B9D" Font-Size="Small" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                </asp:GridView>
        </asp:Panel>

        <asp:Panel ID="pnlHorarios" runat="server" Visible="False" Width="100%">
            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%;background-color: #d6e0ee">
            <tr>
            <td style="height: 20px; background-color: #d6e0ee; text-align: center">
                <asp:Label ID="RotuloHorariosHorario" runat="server" Text="Código:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtHorariosHorario" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" AutoPostBack="True"></asp:TextBox>&nbsp;
                <asp:ImageButton ID="btnHorariosAlterarCodigo" runat="server" 
                    ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar código." Width="16px" />&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Label ID="Label10" runat="server" Text="Descrição:"></asp:Label>&nbsp;
                <asp:TextBox ID="txtHorariosHorarioDesc" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="150px"></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloTipoHorario" runat="server" Text="Tipo:" ></asp:Label>&nbsp;
                <asp:DropDownList ID="cboTipoHorario" runat="server" AutoPostBack="True" Enabled="True" Font-Size="X-Small" Visible="True"> </asp:DropDownList>&nbsp;&nbsp;
                <asp:Label ID="RotuloHorariosAbreviatura" runat="server" Text="Abreviatura:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtHorariosAbreviatura" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="60px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloCorTexto" runat="server" Text="Cor Texto:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtCorTextoHorarios" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="50px" ></asp:TextBox>
                <asp:ImageButton ID="btnCorTextoHorarios" runat="server" 
                        ImageUrl="~/Imagens/Edit2.png" ToolTip="Escolher cor" Width="16px" />&nbsp;&nbsp;
                <asp:Label ID="RotuloCorFundo" runat="server" Text="Cor Fundo:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtCorFundoHorarios" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="50px" ></asp:TextBox>
                <asp:ImageButton ID="btnCorFundoHorarios" runat="server" 
                        ImageUrl="~/Imagens/Edit2.png" ToolTip="Escolher cor" Width="16px" />&nbsp;&nbsp;
                <asp:Label ID="RotuloHorasSemanais" runat="server" Text="H. semanais:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtHorariosHorasSemanais" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloToleranciaDia" runat="server" Text="Tolerância dia:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtHorariosToleranciaDia" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" ></asp:TextBox>&nbsp;

                <br /> 
                <asp:Label ID="RotuloActualizarHorario" runat="server" Text="Intervalo p/ Act. Horário:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtHorariosActualizarHorario" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloInicioDia" runat="server" Text="Início do dia:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtHorariosInicioDia" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloFimDia" runat="server" Text="Fim do dia:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtHorariosFimDia" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloHorariosHorasMensais" runat="server" Text="H. mensais:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtHorariosHorasMensais" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloHorasTurno" runat="server" Text="H. turno:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtHorariosHorasTurno" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloCreditoFaltaMensal" runat="server" Text="Crédito falta mensal:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtCreditoFaltaMensal" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloCreditoFaltaAnual" runat="server" Text="Crédito Falta anual:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtCreditoFaltaAnual" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloFaltaMensal" runat="server" Text="Falta mensal:" ></asp:Label>&nbsp;
                <asp:DropDownList ID="cboFaltaMensal" runat="server" AutoPostBack="True" Enabled="True" Font-Size="X-Small" Visible="True"> </asp:DropDownList>&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Label ID="RotuloMaximoBHMensal" runat="server" Text="Máximo BH mensal:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtMaximoBHMensal" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" ></asp:TextBox>&nbsp;
                <asp:Label ID="RotuloToleranciaPontoPrevisto" runat="server" Text="Tolerância Ponto Prev. Almoço:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtToleranciaPontoPrevisto" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" ></asp:TextBox>&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Label ID="RotuloHorasDiaFerias" runat="server" Text="Horas dia em Férias:" ></asp:Label>&nbsp;
                <asp:TextBox ID="txtHorasDiaFerias" runat="server" BorderColor="Black" BorderWidth="1px" 
                    Font-Size="X-Small" Width="30px" ></asp:TextBox>&nbsp;&nbsp;&nbsp;&nbsp;

                <br /> 
                <asp:ImageButton ID="btnImportarHorario" runat="server" 
                    ImageUrl="~/Imagens/Importar3.png" 
                    ToolTip="Importar configuração de outro horário." Width="16px" Visible="False" />&nbsp;&nbsp;
                <asp:DropDownList ID="cboImportarHorario" runat="server" AutoPostBack="False" 
                    Font-Size="X-Small" Visible="False"> </asp:DropDownList>&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Label ID="RotuloInserir" runat="server" Text="Inserir" ForeColor="#336699"></asp:Label>
                <asp:ImageButton ID="btnHorariosNovoRegisto" runat="server" 
                    ImageUrl="~/Imagens/Add2.png" ToolTip="Inserir Novo horário." />&nbsp;&nbsp;
                <asp:Label ID="RotuloAlterar" runat="server" Text="Alterar" ForeColor="#336699" ></asp:Label>
                <asp:ImageButton ID="btnHorariosAlterarRegisto" runat="server" 
                    ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar horário." Width="16px" />&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:LinkButton ID="lnkCancelarHorarios" runat="server">Sair</asp:LinkButton>
                <br />  <br />

                <asp:GridView ID="grdDadosHorarios" runat="server" CellPadding="4" 
                    ForeColor="#333333" GridLines="Vertical" Width="100%" AllowPaging="True" 
                    AutoGenerateColumns="False" Visible="True" >
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <Columns>
                        <asp:CommandField SelectText="" ShowSelectButton="True" ButtonType="Image" 
                            SelectImageUrl="~/Imagens/Edit2.png" 
                            DeleteImageUrl="~/Imagens/Delete2.png" ShowDeleteButton="True" />
                        <asp:BoundField DataField="DescHorario" HeaderText="Horário" />
                        <asp:BoundField DataField="Abreviatura" HeaderText="Abreviatura"/>
                        <asp:TemplateField HeaderText="Tipo">
                        <ItemTemplate>
                            <asp:DropDownList ID="dropTipoHorario" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" CssClass="drop" Height="15px" onload="dropTipoHorario_Load" 
                                onselectedindexchanged="dropTipoHorario_SelectedIndexChanged">
                            </asp:DropDownList>
                            </span>
                        </ItemTemplate>                            
                        </asp:TemplateField>
                        <asp:BoundField DataField="IntervaloActualizarHorario" HeaderText="Int. p/act. Horário"/>
                        <asp:TemplateField HeaderText="Ponto p/ act. horário">
                            <ItemTemplate>
                                <asp:DropDownList ID="DropTipoActualizacaoHorario" runat="server" AutoPostBack="True" 
                                    onselectedindexchanged="DropTipoActualizacaoHorario_SelectedIndexChanged" 
                                    SelectedValue='<%# Bind("TipoActualizacaoHorario") %>' Font-Size="X-Small" Height="19px">
                                    <asp:ListItem></asp:ListItem>
                                    <asp:ListItem Value="0">Entrada</asp:ListItem>
                                    <asp:ListItem Value="1">Saida</asp:ListItem>
                                    <asp:ListItem Value="2">Ent./Sai.</asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="HoraInicioDia" HeaderText="Início Dia"/>
                        <asp:BoundField DataField="HoraFimDia" HeaderText="Fim Dia"/>
                        <asp:TemplateField HeaderText="cálc. autom.">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkInicioFimDiaAutomatico" runat="server" AutoPostBack="True" OnCheckedChanged="chkInicioFimDiaAutomatico_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="ToleranciaDia" HeaderText="Tolerância Dia"/>
                        <asp:BoundField DataField="HorasSemanais" HeaderText="Horas Semana"/>
                        <asp:TemplateField HeaderText="Anular T. Ref.">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkHorariosAnularTempRefeicao" runat="server" AutoPostBack="True" OnCheckedChanged="chkHorariosAnularTempRefeicao_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="ToleranciaAnularTempos" HeaderText="Toler. A.T.R."/>
                        <asp:TemplateField HeaderText="Anular Extras">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkHorariosAnularTemposExtras" runat="server" AutoPostBack="True" OnCheckedChanged="chkHorariosAnularTemposExtras_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="TemposExtrasAnterioresA" HeaderText="Ant. ás"/>
                        <asp:BoundField DataField="TemposExtrasPosterioresA" HeaderText="Post. ás"/>
                        <asp:TemplateField HeaderText="Anular Ex. S.">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkHorariosAnularTemposExtrasSaldo" runat="server" AutoPostBack="True" OnCheckedChanged="chkHorariosAnularTemposExtrasSaldo_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Unidades">
                        <ItemTemplate>
                            <asp:DropDownList ID="dropUnidadeTempo" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" CssClass="drop" Height="15px" onload="dropUnidadeTempo_Load" 
                                onselectedindexchanged="dropUnidadeTempo_SelectedIndexChanged">
                            </asp:DropDownList>
                            </span>
                        </ItemTemplate>                            
                        </asp:TemplateField>
                        <asp:BoundField DataField="HorasTurno" HeaderText="Horas turno"/>
                        <asp:BoundField DataField="CorTexto" HeaderText="Cor"/>
                        <asp:TemplateField HeaderText="Cálc. Obras">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkExportarInicioFimDiaPonto" runat="server" AutoPostBack="True" OnCheckedChanged="chkExportarInicioFimDiaPonto_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Activo">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkHorariosActivo" runat="server" AutoPostBack="True" OnCheckedChanged="chkHorariosActivo_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Interromper Trab. às 00:00">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkHorariosInterromperPeriodoTrab" runat="server" AutoPostBack="True" OnCheckedChanged="chkHorariosInterromperPeriodoTrab_Clicked" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Categoria">
                        <ItemTemplate>
                            <asp:DropDownList ID="dropCategoria" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" CssClass="drop" Height="19px" onload="dropCategoria_Load" 
                                onselectedindexchanged="dropCategoria_SelectedIndexChanged">
                            </asp:DropDownList>
                            </span>
                        </ItemTemplate>                            
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Cód. extra">
                        <ItemTemplate>
                            <asp:DropDownList ID="dropExtras" runat="server" AutoPostBack="True" 
                                Font-Size="X-Small" CssClass="drop" Height="15px" onload="dropExtras_Load" 
                                onselectedindexchanged="dropExtras_SelectedIndexChanged">
                            </asp:DropDownList>
                            </span>
                        </ItemTemplate>                            
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Falha ponto">
                            <ItemTemplate>
                                <asp:DropDownList ID="DropInserirPontosEmFalta" runat="server" AutoPostBack="True" 
                                    onselectedindexchanged="DropInserirPontosEmFalta_SelectedIndexChanged" 
                                    SelectedValue='<%# Bind("InserirPontosEmFalta") %>' Font-Size="X-Small" Height="19px">
                                    <asp:ListItem></asp:ListItem>
                                    <asp:ListItem Value="1">Início/Fim Dia</asp:ListItem>
                                    <asp:ListItem Value="2">Incluir Almoço</asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="Horario" HeaderText=""/>
                        <asp:BoundField DataField="UnidadeTempo" HeaderText=""/>
                        <asp:BoundField DataField="Activo" HeaderText=""/>
                        <asp:BoundField DataField="TipoHorario" HeaderText=""/>
                        <asp:BoundField DataField="InicioFimDiaAutomatico" HeaderText=""/>
                        <asp:BoundField DataField="InterromperPeriodoTrab" HeaderText=""/>
                        <asp:BoundField DataField="Categoria" HeaderText="" />
                        <asp:BoundField DataField="CodigoExtra" HeaderText=""/>
                        <asp:BoundField DataField="CodigoFalta" HeaderText=""/>
                        <asp:BoundField DataField="AnularTempDuranteRefeicao" HeaderText=""/>
                        <asp:BoundField DataField="AnularTemposExtras" HeaderText=""/>
                        <asp:BoundField DataField="AnularTemposExtrasSaldo" HeaderText=""/>
                        <asp:BoundField DataField="ExportarInicioFimDiaPonto" HeaderText=""/>
                        <asp:BoundField DataField="InserirPontosEmFalta" HeaderText=""/>
                        <asp:BoundField DataField="CorFundo" HeaderText="Cor"/>
                    </Columns>
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="left" />
                    <EditRowStyle BackColor="#999999" />
                    <PagerSettings Visible="true"  Position="Bottom" Mode="NextPreviousFirstLast" FirstPageImageUrl="Imagens/SetaPrimeiro.png" PreviousPageImageUrl="Imagens/SetaEsquerda.png" NextPageImageUrl="Imagens/SetaDireita.png" LastPageImageUrl="Imagens/SetaUltimo.png" />
                    <PagerStyle BackColor="#F7F6F3" ForeColor="#5D7B9D" Font-Size="Small" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                </asp:GridView>
            </td>
            </tr>
            <tr>
                <td colspan="34" style="height: 12px" align="right" >
                <asp:Panel ID="Panel1" runat="server" Visible="True" Width="100%" BackColor="#5d7b9d">
                    <asp:ImageButton ID="btnOpcoesCamposHorarios" runat="server"  ImageUrl="~/Imagens/Config.png" ToolTip="Horários - Configurar visualização campos/colunas"/>&nbsp;
                    <asp:Label ID="RotuloLinhasPaginaHorarios" runat="server" Text="Paginação Linhas:" 
                        ForeColor="White"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtLinhasPaginaHorarios" runat="server" BorderColor="White" 
                        BorderWidth="0px" Font-Size="X-Small" Height="12px" Width="30px" 
                        BackColor="#5D7B9D" ForeColor="White" ></asp:TextBox>
                    <asp:ImageButton ID="btnGravarOpcoesHorarios" runat="server"  ImageUrl="~/Imagens/Edit2.png" ToolTip="Gravar opções"/>&nbsp;
                </asp:Panel>
                </td>                 
            </tr>
            </table>
        </asp:Panel>


        <asp:Panel ID="pnlHorariosPeriodos" runat="server" Visible="False" Width="100%">
        <table border="0" cellpadding="0" cellspacing="0" style="border-right: black 1px solid;
                border-top: black 1px solid; border-left: black 1px solid; width: 100%; border-bottom: black 1px solid;
                background-color: #d6e0ee">
        <tr>
        <td colspan="34">

            <br />  
            <asp:Label ID="RotuloDiaSemana" runat="server" Text="Dia:"></asp:Label>&nbsp;
            <asp:CheckBox ID="CheckBox_1" runat="server" Text="Fer" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:CheckBox ID="CheckBox1" runat="server" Text="Dom" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:CheckBox ID="CheckBox2" runat="server" Text="Seg" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:CheckBox ID="CheckBox3" runat="server" Text="Ter" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:CheckBox ID="CheckBox4" runat="server" Text="Qua" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:CheckBox ID="CheckBox5" runat="server" Text="Qui" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:CheckBox ID="CheckBox6" runat="server" Text="Sex" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:CheckBox ID="CheckBox7" runat="server" Text="Sab" TextAlign="Left" Width="10px" />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:ImageButton ID="btnActivarSeg_Sex" runat="server" ImageUrl="~/Imagens/Edit2.png" ToolTip="Activar/Desactivar Seg a Sex" />
            <asp:Label ID="RotuloTipoPeriodo" runat="server" Text="Tipo Período:"></asp:Label>&nbsp;&nbsp;
            <asp:DropDownList ID="cboTipoPeriodo" runat="server" AutoPostBack="True" 
                Font-Size="X-Small" Width="120px">
            </asp:DropDownList>&nbsp;
            <asp:Label ID="RotuloInicio" runat="server" Text="Início:"></asp:Label>&nbsp;
            <asp:TextBox ID="txtInicio" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                        Width="30px" ></asp:TextBox>&nbsp;
            <asp:Label ID="RotuloProcessamentoInicio" runat="server" Text="Processamento:"></asp:Label>&nbsp;&nbsp;
            <asp:DropDownList ID="cboProcessamentoInicio" runat="server" AutoPostBack="True" 
                Font-Size="X-Small" >
            </asp:DropDownList>&nbsp;
            <asp:Label ID="RotuloToleranciaInicio" runat="server" Text="Tolerância:" ></asp:Label>&nbsp;
            <asp:TextBox ID="txtToleranciaInicio" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                        Width="30px" ></asp:TextBox>&nbsp;
            <asp:Label ID="RotuloFim" runat="server" Text="Fim:" ></asp:Label>&nbsp;
            <asp:TextBox ID="txtFim" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                        Width="30px" ></asp:TextBox>&nbsp;
            <asp:Label ID="RotuloProcessamentoFim" runat="server" Text="Processamento:"></asp:Label>&nbsp;&nbsp;
            <asp:DropDownList ID="cboProcessamentoFim" runat="server" AutoPostBack="True" 
                Font-Size="X-Small" >
            </asp:DropDownList>&nbsp;
            <asp:Label ID="RotuloToleranciaFim" runat="server" Text="Tolerância:" ></asp:Label>&nbsp;
            <asp:TextBox ID="txtToleranciaFim" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                        Width="30px" ></asp:TextBox>&nbsp;
            <br /> 
            <asp:Label ID="RotuloMinHoras" runat="server" Text="Mín. Horas:" ></asp:Label>&nbsp;
            <asp:TextBox ID="txtMinHoras" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                        Width="30px" ></asp:TextBox>&nbsp;
            <asp:ImageButton ID="btnCalcularHoras" runat="server" ImageUrl="~/Imagens/Edit2.png" ToolTip="Calcular horas" Width="16px"/>&nbsp;&nbsp;                        
            <asp:Label ID="RotuloMaxHoras" runat="server" Text="Máx. Horas:" ></asp:Label>&nbsp;
            <asp:TextBox ID="txtMaxHoras" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                        Width="30px" ></asp:TextBox>&nbsp;
            <asp:ImageButton ID="btnHorariosPeriodosNovoRegisto" runat="server" 
                ImageUrl="~/Imagens/Add2.png" ToolTip="Inserir Novo registo." />&nbsp;
            <asp:ImageButton ID="btnHorariosPeriodosAlterarRegisto" runat="server" 
                ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar registo." Width="16px" />
            <asp:LinkButton ID="lnkCancelarHorariosPeriodos" runat="server">Ocultar</asp:LinkButton>
            <br /> <br />

            <asp:GridView ID="grdDadosHorariosPeriodos" runat="server" CellPadding="4" 
                ForeColor="#333333" GridLines="Vertical" Width="100%" AllowPaging="True" 
                PageSize="16" AutoGenerateColumns="False" >
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <Columns>
                    <asp:CommandField SelectText="" ShowSelectButton="True" ButtonType="Image" 
                        SelectImageUrl="~/Imagens/Edit2.png" 
                        DeleteImageUrl="~/Imagens/Delete2.png" ShowDeleteButton="True" />
                    <asp:BoundField DataField="Horario" HeaderText="Horário"/>
                    <asp:BoundField DataField="DescDiadeSemana" HeaderText="Dia da Semana"/>
                    <asp:TemplateField HeaderText="Tipo Período">
                    <ItemTemplate>
                        <asp:DropDownList ID="dropTipoPeriodo" runat="server" AutoPostBack="True" 
                            Font-Size="X-Small" CssClass="drop" Height="19px" onload="dropTipoPeriodo_Load" 
                            onselectedindexchanged="dropTipoPeriodo_SelectedIndexChanged" >
                        </asp:DropDownList>
                        </span>
                    </ItemTemplate>                            
                    </asp:TemplateField>
                    <asp:BoundField DataField="HoraInicio" HeaderText="Início" DataFormatString="{0:t}" 
                        ApplyFormatInEditMode="True" ReadOnly="True"/>
                    <asp:TemplateField HeaderText="Processamento">
                        <ItemTemplate>
                            <asp:DropDownList ID="DropDiaProcessamentoIni" runat="server" AutoPostBack="True" 
                                onselectedindexchanged="DropDiaProcessamentoIni_SelectedIndexChanged" 
                                SelectedValue='<%# Bind("DiaInicio") %>' Font-Size="X-Small" Height="19px">
                                <asp:ListItem></asp:ListItem>
                                <asp:ListItem Value="-1">Dia Anterior</asp:ListItem>
                                <asp:ListItem Value="0">Próprio Dia</asp:ListItem>
                                <asp:ListItem Value="1">Dia Seguinte</asp:ListItem>
                            </asp:DropDownList>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="ToleranciaInicio" HeaderText="Tolerância"/>
                    <asp:BoundField DataField="HoraFim" HeaderText="Fim" DataFormatString="{0:t}" 
                        ApplyFormatInEditMode="True" ReadOnly="True"/>
                    <asp:TemplateField HeaderText="Processamento">
                        <ItemTemplate>
                            <asp:DropDownList ID="DropDiaProcessamentoFim" runat="server" AutoPostBack="True" 
                                onselectedindexchanged="DropDiaProcessamentoFim_SelectedIndexChanged" 
                                SelectedValue='<%# Bind("DiaFim") %>' Font-Size="X-Small" Height="19px">
                                <asp:ListItem></asp:ListItem>
                                <asp:ListItem Value="-1">Dia Anterior</asp:ListItem>
                                <asp:ListItem Value="0">Próprio Dia</asp:ListItem>
                                <asp:ListItem Value="1">Dia Seguinte</asp:ListItem>
                            </asp:DropDownList>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="ToleranciaFim" HeaderText="Tolerância"/>
                    <asp:BoundField DataField="MinimoHoras" HeaderText="Mín. Horas"/>
                    <asp:BoundField DataField="MaximoHoras" HeaderText="Máx. Horas"/>
                    <asp:TemplateField HeaderText="Cód. Falta" >
                    <ItemTemplate>
                        <asp:DropDownList ID="dropHorariosPeriodosFaltas" runat="server" AutoPostBack="True" 
                            Font-Size="X-Small" CssClass="drop" Height="19px" onload="dropHorariosPeriodosFaltas_Load" 
                            onselectedindexchanged="dropHorariosPeriodosFaltas_SelectedIndexChanged" >
                        </asp:DropDownList>
                        </span>
                    </ItemTemplate>                            
                    </asp:TemplateField>
                    <asp:BoundField DataField="DiadeSemana" HeaderText="DiadeSemana"/>
                    <asp:BoundField DataField="TipoPeriodo" HeaderText=""/>
                    <asp:BoundField DataField="Horario2" HeaderText=""/>
                    <asp:BoundField DataField="CodigoFalta" HeaderText=""/>
                    <asp:BoundField DataField="Tipo" HeaderText=""/>
                    <asp:BoundField DataField="HoraInicio2" HeaderText=""/>
                </Columns>
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                <EditRowStyle BackColor="#999999" />
                <PagerSettings Visible="true"  Position="Bottom" Mode="NextPreviousFirstLast" FirstPageImageUrl="Imagens/SetaPrimeiro.png" PreviousPageImageUrl="Imagens/SetaEsquerda.png" NextPageImageUrl="Imagens/SetaDireita.png" LastPageImageUrl="Imagens/SetaUltimo.png" />
                <PagerStyle BackColor="#F7F6F3" ForeColor="#5D7B9D" Font-Size="Small" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            </asp:GridView>
        </td>
        </tr>
        </table>
        </asp:Panel>
        </td>
        </tr>


        <tr>
        <td colspan="34" style="text-align: center">

            <asp:Panel ID="pnlOpcoesFiltros" runat="server" Visible="False" Width="100%">
            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%;background-color: #d6e0ee">
                <tr>
                    <td>
                        <asp:GridView ID="grdDadosOpcoesFiltros" runat="server"  
                                AutoGenerateColumns="False" CellPadding="4" HorizontalAlign="Center" 
                                    PageSize="4" Width="800px">
                        <Columns>
                            <asp:CommandField SelectText="" ShowSelectButton="True" ButtonType="Image" SelectImageUrl="~/Imagens/Edit2.png" 
                                        DeleteImageUrl="~/Imagens/Delete2.png" ShowDeleteButton="True" />
                            <asp:BoundField DataField="Descricao" HeaderText="Filtro" />
                            <asp:TemplateField HeaderText="Activo">
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkFiltroActivo" runat="server" AutoPostBack="True" OnCheckedChanged="chkFiltroActivo_Clicked" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="Filtro" HeaderText="" />
                            <asp:BoundField DataField="Activo" HeaderText="" />
                        </Columns>
                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                        <EditRowStyle BackColor="#999999" />
                        <PagerSettings Visible="true"  Position="Bottom" Mode="NextPreviousFirstLast" FirstPageImageUrl="Imagens/SetaPrimeiro.png" PreviousPageImageUrl="Imagens/SetaEsquerda.png" NextPageImageUrl="Imagens/SetaDireita.png" LastPageImageUrl="Imagens/SetaUltimo.png" />
                        <PagerStyle BackColor="#F7F6F3" ForeColor="#5D7B9D" Font-Size="Small" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                        </asp:GridView>

                        <br />  
                        <asp:Label ID="RotuloContador" runat="server" Text="Ordem:" Visible="False"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtContador" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                                    Width="25px" Visible="False"></asp:TextBox>&nbsp;
                        <asp:TextBox ID="txtParenteses1" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                                    Width="10px" Visible="False"></asp:TextBox>&nbsp;
                        <asp:Label ID="RotulocboCampos" runat="server" Text="Campo:" Visible="False"></asp:Label>&nbsp;
                        <asp:DropDownList ID="cboCampos" runat="server" Font-Size="X-Small" 
                                    Visible="False"> </asp:DropDownList>&nbsp;
                        <asp:Label ID="RotuloOperador" runat="server" Text="Operador:" Visible="False"></asp:Label>&nbsp;
                        <asp:DropDownList ID="cboOperadores" runat="server" Font-Size="X-Small" 
                                    Visible="False"> </asp:DropDownList>&nbsp;
                        <asp:Label ID="RotuloValor" runat="server" Text="Valor:" Visible="False"></asp:Label>&nbsp;
                        <asp:TextBox ID="txtValor" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                                    Width="80px" Visible="False"></asp:TextBox>&nbsp;
                        <asp:TextBox ID="txtParenteses2" runat="server" BorderWidth="1px" Font-Size="X-Small" 
                                    Width="10px" Visible="False"></asp:TextBox>&nbsp;
                        <asp:Label ID="RotuloCondicao" runat="server" Text="Condição:" Visible="False"></asp:Label>&nbsp;
                        <asp:DropDownList ID="cboCondicao" runat="server" Font-Size="X-Small" 
                                    Visible="False"> </asp:DropDownList>&nbsp;&nbsp;
                        <asp:ImageButton ID="btnNovoCampo" runat="server" 
                            ImageUrl="~/Imagens/Add2.png" ToolTip="Inserir Novo registo." Visible="False" />&nbsp;
                        <asp:ImageButton ID="btnAlterarCampo" runat="server" 
                            ImageUrl="~/Imagens/Edit2.png" ToolTip="Alterar filtro." Width="16px" Visible="False" />
                        <br /> <br />
                        <asp:GridView ID="grdDadosOpcoesFiltrosCampos" runat="server"  
                                AutoGenerateColumns="False" CellPadding="4" HorizontalAlign="Center" 
                                    PageSize="4" Width="1000px" Visible="False">
                        <Columns>
                            <asp:CommandField SelectText="" ShowSelectButton="True" ButtonType="Image" SelectImageUrl="~/Imagens/Edit2.png" 
                                        DeleteImageUrl="~/Imagens/Delete2.png" ShowDeleteButton="True" />
                            <asp:BoundField DataField="Descricao" HeaderText="Filtro" />
                            <asp:BoundField DataField="Contador" HeaderText="Ordem"/>
                            <asp:BoundField DataField="Parenteses1" HeaderText=" " />
                            <asp:TemplateField HeaderText="Campo">
                            <ItemTemplate>
                                <asp:DropDownList ID="dropOpcoesCampos" runat="server" AutoPostBack="True" 
                                    Font-Size="X-Small" CssClass="drop" Height="15px" onload="dropOpcoesCampos_Load" 
                                    onselectedindexchanged="dropOpcoesCampos_SelectedIndexChanged" >
                                </asp:DropDownList>
                                </span>
                            </ItemTemplate>                            
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Operador">
                                <ItemTemplate>
                                <asp:DropDownList ID="DropOperacao" runat="server" AutoPostBack="True" 
                                    Font-Size="X-Small" CssClass="drop" Height="15px" onload="DropOperacao_Load" 
                                    onselectedindexchanged="DropOperacao_SelectedIndexChanged">
                                </asp:DropDownList>
                                </span>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="Valor" HeaderText="Valor" />
                            <asp:BoundField DataField="Parenteses2" HeaderText=" " />
                            <asp:TemplateField HeaderText="Condição">
                                <ItemTemplate>
                                <asp:DropDownList ID="DropConjuncao" runat="server" AutoPostBack="True" 
                                    Font-Size="X-Small" CssClass="drop" Height="15px" onload="DropConjuncao_Load" 
                                    onselectedindexchanged="DropConjuncao_SelectedIndexChanged">
                                </asp:DropDownList>
                                </span>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="Tipo" HeaderText="" />
                            <asp:BoundField DataField="Filtro2" HeaderText="" />
                            <asp:BoundField DataField="Opcao2" HeaderText=""/>
                            <asp:BoundField DataField="Campo2" HeaderText=""/>
                            <asp:BoundField DataField="Contador2" HeaderText=""/>
                            <asp:BoundField DataField="NumeroEmpregado2" HeaderText=""/>
                            <asp:BoundField DataField="Condicao" HeaderText=""/>
                            <asp:BoundField DataField="Conjuncao" HeaderText=""/>
                        </Columns>
                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                        <EditRowStyle BackColor="#999999" />
                        <PagerSettings Visible="true"  Position="Bottom" Mode="NextPreviousFirstLast" FirstPageImageUrl="Imagens/SetaPrimeiro.png" PreviousPageImageUrl="Imagens/SetaEsquerda.png" NextPageImageUrl="Imagens/SetaDireita.png" LastPageImageUrl="Imagens/SetaUltimo.png" />
                        <PagerStyle BackColor="#F7F6F3" ForeColor="#5D7B9D" Font-Size="Small" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                        </asp:GridView>
                        <br />
                    </td>
                </tr>
            </table>
            </asp:Panel>

        </td>
        </tr>

            <tr>
            <td colspan="34" style="text-align: center">
                <asp:Panel ID="pnlOpcoesCampos" runat="server" Visible="False" Width="100%">
                <table border="0" cellpadding="0" cellspacing="0" style="border-right: black 1px solid;
                        border-top: black 1px solid; border-left: black 1px solid; width: 100%; border-bottom: black 1px solid;
                        background-color: #d6e0ee">
                    <tr align="center">
                        <td style="height: 3px; text-align: center">
                            <asp:LinkButton ID="lnkSairOpcoesCampos" runat="server">Sair</asp:LinkButton>
                        </td>
                    </tr>
                    <tr>
                        <td 
                            style="height: 20px; background-color: White; text-align: center" 
                            align="left"> 
                            <asp:Label ID="lblMsg3" runat="server" Visible="False" BackColor="White"></asp:Label> 
                        </td>
                    </tr>
                    <tr>
                        <td style="height: 20px; background-color: #d6e0ee; text-align: center">
                            <asp:Label ID="RotuloTitulo" runat="server" Font-Size="X-Small" Text="Visualizar / ocultar campos"></asp:Label>&nbsp;&nbsp;
                            </td>
                    </tr> 
                    <tr>
                        <td style="height: 30px; background-color: #d6e0ee; text-align: center">
                            <asp:GridView ID="grdDadosOpcoesCampos" runat="server" CellPadding="4" HorizontalAlign="Center" 
                                    PageSize="4" Width="582px" AutoGenerateColumns="False">
                                <Columns>
                                    <asp:BoundField DataField="Descricao" HeaderText="Campo / coluna" />
                                    <asp:TemplateField HeaderText="Visualizar">
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkVisualizarOpcoesCampos" runat="server" AutoPostBack="True" OnCheckedChanged="chkVisualizarOpcoesCampos_Clicked" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="Campo" HeaderText="" />
                                    <asp:BoundField DataField="Visualizar" HeaderText="" />
                                </Columns>
                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                <EditRowStyle BackColor="#999999" />
                                <PagerSettings Visible="true"  Position="Bottom" Mode="NextPreviousFirstLast" FirstPageImageUrl="Imagens/SetaPrimeiro.png" PreviousPageImageUrl="Imagens/SetaEsquerda.png" NextPageImageUrl="Imagens/SetaDireita.png" LastPageImageUrl="Imagens/SetaUltimo.png" />
                                <PagerStyle BackColor="#F7F6F3" ForeColor="#5D7B9D" Font-Size="Small" HorizontalAlign="Center" />
                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                            </asp:GridView>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            </td>
            </tr>

        <tr>
        <td colspan="34">
        <asp:GridView ID="grdDados" runat="server" CellPadding="4" ForeColor="#333333" GridLines="Vertical" Width="100%" AllowPaging="True" PageSize="16">
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <Columns>
            <asp:CommandField SelectText="" ShowSelectButton="True" ButtonType="Image" 
                SelectImageUrl="~/Imagens/Edit2.png" />
        </Columns>
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <EditRowStyle BackColor="#999999" />
        <PagerSettings Visible="true"  Position="Bottom" Mode="NextPreviousFirstLast" FirstPageImageUrl="Imagens/SetaPrimeiro.png" PreviousPageImageUrl="Imagens/SetaEsquerda.png" NextPageImageUrl="Imagens/SetaDireita.png" LastPageImageUrl="Imagens/SetaUltimo.png" />
        <PagerStyle BackColor="#F7F6F3" ForeColor="#5D7B9D" Font-Size="Small" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        </asp:GridView>
            </td>
        </tr>
        <tr> <td style="height: 10px; background-color: White;"> </td> </tr>
        <tr>
            <td colspan="34" style="height: 12px" align="right" >
            <asp:Panel ID="pnlOpcoesRodape" runat="server" Visible="True" Width="100%" BackColor="#5d7b9d">
                <asp:ImageButton ID="btnOpcoesCampos" runat="server"  ImageUrl="~/Imagens/Config.png" ToolTip="Configurar ocultação campos/colunas"/>&nbsp;
                <asp:Label ID="RotuloGrelha" runat="server" Text="Grelha: " 
                    ForeColor="White"></asp:Label>&nbsp;
                <asp:DropDownList ID="cboGrelha" runat="server" Font-Size="X-Small" 
                    BackColor="White" ForeColor="Black">
                    <asp:ListItem Value="0">Vertical</asp:ListItem>
                    <asp:ListItem Value="1">Horizontal</asp:ListItem>
                    <asp:ListItem Value="2">Ambos</asp:ListItem>
                </asp:DropDownList>&nbsp;
                <asp:Label ID="RotuloLinhasPagina" runat="server" Text="Paginação Linhas:" 
                    ForeColor="White"></asp:Label>&nbsp;
                <asp:TextBox ID="txtLinhasPagina" runat="server" BorderColor="White" 
                    BorderWidth="0px" Font-Size="X-Small" Height="18px" Width="30px" 
                    BackColor="#5D7B9D" ForeColor="White" ></asp:TextBox>
                <asp:Label ID="Label4" runat="server" Text="Posição: " 
                    ForeColor="White"></asp:Label>&nbsp;
                <asp:DropDownList ID="cboPaginacaoPosicao" runat="server" Font-Size="X-Small" 
                    BackColor="White" ForeColor="Black">
                    <asp:ListItem Value="0">Em baixo</asp:ListItem>
                    <asp:ListItem Value="1">Em cima</asp:ListItem>
                    <asp:ListItem Value="2">Em ambos</asp:ListItem>
                </asp:DropDownList>&nbsp;
                <asp:Label ID="Label6" runat="server" Text="Tipo: " 
                    ForeColor="White"></asp:Label>&nbsp;
                <asp:DropDownList ID="cboPaginacaoTipo" runat="server" Font-Size="X-Small" 
                    BackColor="White" ForeColor="Black">
                    <asp:ListItem Value="2">Botões</asp:ListItem>
                    <asp:ListItem Value="3">Nº pág.</asp:ListItem>
                </asp:DropDownList>&nbsp;
                <asp:ImageButton ID="btnGravarOpoes" runat="server"  ImageUrl="~/Imagens/Edit2.png" ToolTip="Gravar opções"/>&nbsp;
            </asp:Panel>
            </td>                 
        </tr>
    </table>
</asp:Content>

