<%@ Page Language="C#" AutoEventWireup="true" Codebehind="selectFile.aspx.cs" Inherits="ZYDN.Web.system.Label.selectFile" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="../skins/css/main.css" />
    <link rel="stylesheet" type="text/css" href="../skins/css/Sys.css" />

    <script language="javascript" src="../js/JFramework.js"></script>

    <script language="javascript" src="../js/Sys.js"></script>

    <title>选择文件</title>

    <script language="javascript" type="text/javascript">
        var fileName="";
        function ok(){
            if (fileName==""){
                alert("请选择你要打开的文件");
                return;
            }
          window.returnValue= fileName;
		  window.close();
        }
        
        function sel(obj){
            fileName=obj.value;
        }
        
        function selBBS(obj){
            fileName="bbs/"+obj.value;
        }
        function loadPage(){
            var option=new optionClass();
        	option.titleObj=document.getElementsByName("optionTitle");
			var objBody=document.getElementsByName("optionBody");
			option.bodyObj=objBody;
			//document.getElementById("div2").style.top="-339px";
			option.create(); 
			for (var i=0;i<objBody.length;i++){
			    objBody[i].style.height="278px";
			    objBody[i].style.overflow="auto";
			}
        }
        
    </script>

</head>
<body onload="loadPage();">
    <form id="form1" runat="server">
        <div style="position: absolute; top: 0px; left: 0px; width: 100%; height: 90%" id="div1">
            <div style="width: 100%; position: absolute; left: 10px; top: 0px; z-index: 2; overflow:auto;" id="div2">
                <div name="optionTitle" id="optionTitle">
                    根目录</div>
                <div name="optionTitle" id="optionTitle">
                    论坛</div>
                <div name="optionTitle" id="optionTitle">
                    子站</div>
                   <div  style=" float:left; width:auto;padding-left:20px;">
                       <input style="height:20px; " type="button" value="确定" onclick="ok()" />
                   </div>
            </div>
            <div style="overflow: hidden; width: 100%; height: auto; position: absolute; top: 21px;
                z-index: 1;" id="div5">
                <div name="optionBody" id="optionBody">
                    <div>
                        <asp:Repeater ID="fileList" runat="server">
                            <ItemTemplate>
                                <div style="width: 170px; float: left;">
                                    <input onclick="sel(this)" type="radio" value="<%#   Container.DataItem   %>  " name="fileName"
                                        id="fileName">
                                    <%#   Container.DataItem   %>
                                </div>
                            </ItemTemplate>
                        </asp:Repeater>
                    </div>
                </div>
                <div name="optionBody" id="optionBody">
                     <asp:Repeater ID="bbsFileList" runat="server">
                            <ItemTemplate>
                                <div style="width: 170px; float: left;">
                                    <input onclick="selBBS(this)" type="radio" value="<%#   Container.DataItem   %>  " name="fileName"
                                        id="fileName">
                                    <%#   Container.DataItem   %>
                                </div>
                            </ItemTemplate>
                                </asp:Repeater>
                </div>
                <div name="optionBody" id="optionBody">
                </div>
            </div>
        </div>
    </form>
</body>
</html>
