<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EPA_Index.aspx.cs" Inherits="EPA_WebSite.EPA_Index" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        #body1{
            margin: 0;
            padding: 0;
            background-color: #ebebeb;
        }
        #form1 {
            width: 1065px;
            font-family: Arial, Helvetica, sans-serif;
            font-size: x-large;
            margin-left: 7px;
            margin-right: 7px;
            margin-top: 8px;
            margin-bottom: 7px;
            background-color: white;
            -ms-user-select: none;
        }

        .MainHeaderStyle
        {
            border: solid 1px Black;
            background-color: #b4b4b4;
            font-weight: bold;
        }

        .GroupHeaderStyle
        {
            border: solid 1px Black;
            background-color: #d7d7d7;
            font-weight: bold;
        }

        .TopicCellStyle
        {
            background-color:white;
            padding-left: 2em;
        }
        .auto-style1 
        {
            width: 228px;
            text-align: left;
            vertical-align: top;
            font-family: Arial, Helvetica, sans-serif;
            font-size: x-large;
            -ms-user-select: none;
        }
        
   </style>
    <script type = "text/javascript">
        function SetSource(SourceID) {
            var hidSourceID = document.getElementById("<%=hidSourceID.ClientID%>")
            hidSourceID.value = SourceID;
        }
    </script> 
    <script type = "text/javascript">
        // This sets the cursor to the end of the text when if recieves focus
        function SetCursorToEnd(SourceID) {
            SourceID.value = SourceID.value;
            var len = SourceID.value.length;
            SourceID.setSelectionRange(len, len);
        }
    </script> 
</head>

<!-- disable context menu -->
<body 
    id="body1" 
    oncontextmenu="return false;" 
    width: 1075px;
    margin-top: 10px;
    margin-bottom: 10px;
    margin-left: 10px;
    margin-right: 10px;">

    <form 
        id="form1" 
        runat="server"
    >
    <div>
    
        <asp:SqlDataSource 
            ID="SqlDataSource1" 
            runat="server" 
            ConnectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\EPA_Content.accdb;Persist Security Info=True;Jet OLEDB:Database Password=PT10RMX" 
            ProviderName="<%$ ConnectionStrings:DatabaseConnectionString.ProviderName %>" EnableCaching="True" 
            >
        </asp:SqlDataSource>
    
    </div>
        <table border="1" style="table-layout:fixed; ">
        <tr style="vertical-align:top">
        <td>
            <div style="overflow-x:auto; width:685px; vertical-align:top; height:568px; "> 
            <asp:GridView 
                ID="GridView1" 
                runat="server" 
                AutoGenerateColumns="False" 
                CellPadding="5" 
                CellSpacing="3" 
                DataSourceID="SqlDataSource1" 
                Font-Names="Arial" 
                Font-Size="X-Large" 
                Width="666px" 
                OnRowCreated="GridView1_RowCreated" ShowHeaderWhenEmpty="True"
                >
                <Columns>
                    <asp:HyperLinkField 
                        DataTextField="ContentFolder" 
                        HeaderText="All Topics" DataNavigateUrlFields="ID" DataNavigateUrlFormatString="TopicView.aspx?TopicID={0}" 
                    >
                    <ItemStyle CssClass="TopicCellStyle" />
                    </asp:HyperLinkField>
                </Columns>
                <HeaderStyle Font-Bold="False" Font-Italic="False" CssClass="MainHeaderStyle" />
                <RowStyle CssClass="TopicRowStyle" />
            </asp:GridView>
             </div>
        </td>
        <td class="auto-style1">
           <div style="width:350px; vertical-align:top"> </div>
           <table style="width: 350px; padding:6px">
                <tr>
                    <td>
                        <asp:Label ID="Label2" runat="server" Text="Search Text" Width="240px" Font-Bold="True" ></asp:Label>
                    </td>
                </tr>
                <tr >
                    <td >
                        <asp:TextBox 
                            ID="txtSearchText" 
                            runat="server" 
                            Width="300px" 
                            CssClass="auto-style1" 
                            onfocus="SetCursorToEnd(this)"
                            style="-ms-user-select:text"></asp:TextBox>

                        <asp:Button 
                            ID="cmdClearSearchText" 
                            OnClientClick = "SetSource(this.id)"
                            runat="server" 
                            Height="34px" Text="X" Width="34px" 
                            Font-Names="Tahoma" 
                            Font-Size="X-Large" UseSubmitBehavior="False" />
                        <asp:HiddenField ID="hidSourceID" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td style="padding-top:15px">
                        <asp:Label ID="Label3" runat="server" Text="Featured Topics" Width="217px" Font-Bold="True"></asp:Label>
                        <asp:CheckBox ID="chkShowAllTopics" runat="server" AutoPostBack="True" Text="All Topics " />
                    </td>
                </tr>
                <tr>
                    <td>
                        <div style="overflow-x:auto; width:350px; vertical-align:top; height:440px"> 
                        <asp:CheckBoxList 
                            ID="chklistKeywords" 
                            runat="server"
                            Font-Names="Arial" 
                            Font-Size="X-Large" AutoPostBack="True" CellSpacing="10" 
                            >
                        <asp:ListItem Selected="True">  Item1</asp:ListItem>
                        <asp:ListItem>Item 2</asp:ListItem>

                            <asp:ListItem></asp:ListItem>
                            <asp:ListItem></asp:ListItem>
                            <asp:ListItem></asp:ListItem>
                            <asp:ListItem></asp:ListItem>

                        </asp:CheckBoxList>
                        </div>

                    </td>
                </tr>
            </table>

        </td>

        </tr>
        </table>

    </form>
</body>
</html>
