<%@ Page Language="vb" AutoEventWireup="true" CodeBehind="DirectoryBrowser.aspx.vb" Inherits="FinIQWebApp.DirectoryBrowser"  %>


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">

      <base target="_self"></base>
		<title >Browse Directory</title>
    	<style>
		    .errorMsg{FONT-SIZE: 8.25pt; COLOR: red; FONT-FAMILY: Verdana, Arial; TEXT-DECORATION: none }
			.hilite { BACKGROUND-COLOR: #dfe5ff }
			.nohilite { BACKGROUND-COLOR: #ffffff }
			.text { FONT-SIZE: 8.25pt; COLOR: black; FONT-FAMILY: Verdana, Arial; TEXT-DECORATION: none }
			.tableOutlineWt { BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #666666 1px solid; MARGIN-TOP: 0px; OVERFLOW: auto; BORDER-LEFT: #333333 1px solid; PADDING-TOP: 0px; BORDER-BOTTOM: #cccccc 1px solid }
		</style>
</head>
<body>
    <form id="form1" runat="server">
        <script type="text/javascript">

    function SelectAndClose()
    {
        txtValue = document.getElementById('_browseTextBox');
        window.returnValue = txtValue.value;
        window.close();
        return false;
    }

   
    function SetFolder(value) {
        alert(value)
       // 
        //if (window.opener != null && !window.opener.closed) {
        //    var hdnPath = window.opener.document.getElementById('hdnPath');
        //    hdnPath.value = value;
        //}
        var hdnPath = window.parent.document.getElementById('txtField2D2');
        hdnPath.value = value;
        alert(hdnPath.value)
        window.close();
    }

   

         </script>
    <div>
    <%--<asp:TreeView runat="server" ID="tvDirectories" ></asp:TreeView>--%>
      
           <%--    <tr>
                    <td><asp:Label ID="lblError" runat="server" CssClass="errorMsg" ></asp:Label>
                       </td>
                </tr>
                <tr>
                    <td>
                        <asp:TextBox ID="_browseTextBox" runat="server" CssClass="toolbar" Width="300px" /><asp:ImageButton ID="_browseButton" runat="server" OnClick="_browseButton_Click" />
                    </td>
                </tr>--%>

           <table style="width:100%; border:0">
             
                <tr>
                    <td>
                       <%-- <div class="tableOutlineWt" style="width: 313px; height: 371px; background-color: white">--%>
                           <%-- <table cellspacing="0" cellpadding="4" width="100%" bgcolor="#ffffff" border="0">
                                <tr>
                                    <td>--%>
                                         
                                            <asp:TreeView ID="TreeView1" runat="server" Height="326px" ImageSet="XPFileExplorer"  xmlns:asp="#unknown"
                                                NodeIndent="15" Width="292px">
                                                <ParentNodeStyle Font-Bold="False" />
                                                <HoverNodeStyle Font-Underline="True" ForeColor="#6666AA" />
                                                <SelectedNodeStyle BackColor="#B5B5B5" Font-Underline="False" HorizontalPadding="0px"
                                                    VerticalPadding="0px" />
                                                <NodeStyle Font-Names="Tahoma" Font-Size="8pt" ForeColor="Black" HorizontalPadding="2px"
                                                    NodeSpacing="0px" VerticalPadding="2px" />
                                          </asp:TreeView>
                                     <%--</td>
                                </tr>
                            </table>--%>
                        <%--</div>--%>
                    </td>
                </tr>
                 <tr>                              
                   <%--    <td align=left>
            <asp:Button ID="btnOpen" runat="server" Text="Open" />--%>
                      <%--  <asp:ImageButton ID="_selectButton" OnClientClick="SelectAndClose();"
                            runat="server" />
                        </td>--%>
            
                   
                </tr>
            </table>
    </div>
    </form>
</body>
</html>
