<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="documentmul.aspx.cs" Inherits="School_Web.admin.document.documentmul" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>文件选择</title>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8,chrome=1" />
    <link href="../style/green/skin.css" rel="stylesheet" type="text/css">

    <script language="javascript" src="../js/SystemPage.js"></script>
    <script language="javascript">
		var k=document.location.href;
		k=unescape(k)
		//alert(k)
		ss = k.split("=");
		var MBJY=ss[1];
		//alert(MBJY)
		var txt="m";
		var ok;
		var alli;
		function addgo()
		{
			ShowTxt(ok,"#")
			ok=ok+1;
		}
		function go()
		{
				
				var s, ss;
				var s = MBJY;
				ss = s.split("|");
				var allI,i;
				allI=ss.length;
				ok=allI;
				//alert(allI);
						for(i=0;i<allI;i++)
						{
							//alert(i);
							ShowTxt(i,ss[i])
						}
						

		}
		
		function ShowTxt(i,t)
		{
							
							var s,ok;
							s=document.getElementById("showinfo");
							ok=("信息"+(i+1)+"的内容;")
							ok+=("<input type=text name=txt" + i + " class=xcinput value=" + t + " style='WIDTH: 200px; HEIGHT: 20px'>");
							ok+=("<input type=button value=上传 class=SkyButtonFocus onClick=upJs('txt" + i + "');>");
							ok+=("<input type=button value=查看 class=SkyButtonFocus onClick=upJsShow('txt" + i + "');>");
							ok+=("<br>");
							s.innerHTML=s.innerHTML+ok;
		}
		function HLJgo()
		{
		//------------------------
		var i,allI;
		allI=ok;
		var t;
		var m,f;
		f="";
		s=document.getElementById("showinfo");
		//alert(s.innerHTML);
		for(i=0;i<allI;i++)
						{
							//alert(i);
							t=document.getElementById("txt"+i);
							m=t.value;
							//alert(m)
							if(m!="")
							{
								f=f+m+"|";	
							}
										
						}
		//------------------------
			f=f.substring(0,f.length-1);
			//alert(f);
			window.returnValue =f;
			window.close();
		}
		function upJsShow(txt)
		{
		  var s;
		  s=document.getElementById(txt)
		 // alert(s.value);
		  if(s.value!="#")
		  {
		  	openWindow(s.value);
		  }
		  
		}
		function openWindow(theURL) { //v2.0
  var s;
  s="toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=700,height=700";
  window.open(theURL,"查看",s);
}
    </script>

</head>
<body>
    <form name="Form1" method="post" id="Form1">
      <div id="tbMain">
          <div class="divTbg">
            <div class="divTbgL"></div>
            <div class="divTbgInfo">
              <div class="divTbgTitle">文件选择</div>
            </div>
          </div>
          <div class="divTbgF"></div>
          <div id="mypanel">
            <div class="divInfo" id="ddiv1">
              
              <div class="divInfoContext">
                <table width="100%" border="0" align="center" cellPadding="2" cellSpacing="1" class="SkyTDLine">
										<tr class="MeNewTDLine">
											
											<td align="left" class="SkyTDLine"><div id="showinfo">
                                        </div>
												</td>
										</tr>
										
										
									</table>
              </div>
            </div>
          </div>
          <div class="divSave">
          
          <input type="button" value="确认返回" onclick="HLJgo();" class="SkyButtonFocus"><input type="button"
                                                value="增加一个" onclick="addgo();" class="SkyButtonFocus">
          
          </div>
        </div>
    </form>

    <script language="javascript">go();</script>

</body>
</html>
