<%@ Page language="c#" Codebehind="FileUpload.aspx.cs" AutoEventWireup="false" Inherits="Mediachase.UI.Web.FileStorage.FileUpload" %>
<%@ Register TagPrefix="ibn" TagName="DirectoryTreeView" src="..\Modules\DirectoryTreeView.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > 

<html>
 <head>
    <title>
			<%= LocRM.GetString("tAddDoc")%>
    </title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name=vs_defaultClientScript content="JavaScript">
    <meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
    <script src="../Scripts/browser.js"></script>
		<script src="../Scripts/buttons.js"></script>
		<script src="../Scripts/AjaxFU.js"></script>				
		<LINK href="../layouts/styles/windows.css" type="text/css" rel="stylesheet">
		<link href="../Themes/<%=Mediachase.UI.Web.Util.CommonHelper.GetTheme()%>/theme.css" rel="stylesheet">
		<link href="../Themes/<%=Mediachase.UI.Web.Util.CommonHelper.GetTheme()%>/color1.css" rel="stylesheet">
		<LINK href='<%=Mediachase.UI.Web.Util.CommonHelper.GetAbsolutePath("/layouts/styles/mcCalendClient.css")%>' rel="stylesheet">
  </head>
   <body class="UserBackground" id="pT_body" leftMargin="0" topMargin="0" marginwidth="0" marginheight="0">
	
    <form id="frmMain" method="post" runat="server" enctype="multipart/form-data">
			<table class="text" cellSpacing="0" cellPadding="5" width="100%" border="0" style="margin:10 20 10 20;">
				<tr height="40px" id="trUploadFrame">
					<td>
						<span><%=LocRM.GetString("tBrowse")%></span><br>
						<iframe name="uploadFrame" id="uploadFrame" border="0" marginheight="0" frameborder="0" height="30px" width="100%" src='UploadHandler.aspx?FolderId=<%=ParentFolderId%>&ContainerKey=<%=ContainerKey%>&ContainerName=<%=ContainerName%>'></iframe>
					</td>
				</tr>
				<tr>
					<td>
						<div id="pGlobalTree" runat=server><div id="pTreeControl" style='display:<%=( (ParentFolderId>0)? "none":"block" )%>'><span><%=LocRM.GetString("tSelectFolder")%></span><br><ibn:DirectoryTreeView id="ctrlDirView" runat=server Width="400px" Height="250px"></ibn:DirectoryTreeView></div></div>
						<p id="psaveButton"><span><%=LocRM.GetString("tClickUpload")%></span><br><br><input type=button id="saveButton" class="text" onclick="javascript:startUpload()" value='<%=LocRM.GetString("tUpload")%>'/>
						<br><input type="checkbox" ID="cbNewFile" /><label for="cbNewFile" class="text"><%=LocRM.GetString("tAnotherOne")%></label>
						</p>
						<div id="progressDisplay" style="display:none">
							<%=LocRM.GetString("tUploadStatus")%>: <i id="uploadStatus"></i>
							<table id="progressDisplayTable" border="0" cellpadding="6" width="300" class="text" style="display:none;font-size:90%;">
								<tr>
									<td><b><%=LocRM.GetString("tSize")%>:</b>
										<span id="uploadSize"></span>
										&nbsp;<%=LocRM.GetString("tOf")%>&nbsp;
										<span id="uploadTotalSize"></span></td>
								</tr>
								<tr>
									<td><b><%=LocRM.GetString("tTime")%>:</b>
										<br><%=LocRM.GetString("tEstimatedTime")%>&nbsp;<span id="uploadTime"></span><br><%=LocRM.GetString("tRemainingTime")%>&nbsp;<span id="uploadRemainingTime"></span></td>
								</tr>
								<tr><td><b><%=LocRM.GetString("tCompleted")%>:</b>&nbsp;<span id="percValue"></span></td></tr>
								<tr>
									<td>
										<div id="progressContainer" style="border:solid 1px #008000;height:20px;width:100%;"><div id="progressBar" style="background-color:#00aa00;margin:1px;height:18px;display:block;"></div>
										</div>
									</td>
								</tr>
							</table>
							<p><input class="text" type=button id="cancelButton" onclick="javascript:cancelUpload()" value='<%=LocRM.GetString("Cancel")%>'/></p>
						</div>
						<div id="uploadError" style="display:none">
						</div>
						<div id="uploadSuccess" style="display:none">
							<%=LocRM.GetString("tUploadSuccess")%>
						</div>
					</td>
				</tr>
				<tr id="trRe" style="display:none">
					<td>
						<%=LocRM.GetString("tFileExists")%><br><br>
						<nobr><input class="text" type=button id="rePlace" onclick="javascript:continueUpload()" value='<%=LocRM.GetString("tReplace")%>'/>
						<input class="text" type=button id="reNew" onclick="javascript:continueUpload()" value='<%=LocRM.GetString("tReNewVer")%>'/>&nbsp;&nbsp;
						<input class="text" type=button id="reName" onclick="javascript:showRename()" value='<%=LocRM.GetString("tRename")%>'/>&nbsp;&nbsp;
						<input class="text" type=button id="reCancel" onclick="javascript:window.close()" value='<%=LocRM.GetString("Cancel")%>'/></nobr>
					</td>
				</tr>
				<tr id="trReName" style="display:none">
					<td>
						<input style="width:400px" type=text id="txtNewName" class="text"/><br><br>
						<input class="text" type=button id="reNName" onclick="javascript:startUpload()" value='<%=LocRM.GetString("tUpload")%>'/>&nbsp;&nbsp;
					</td>
				</tr>
			</table>
			<input type=hidden id="hidInitializingValue" value='<%=LocRM.GetString("tInitializing")%>' />
			<input type=hidden id="hidWaitingValue" value='<%=LocRM.GetString("tWaitForUploading")%>' />
			<input type=hidden id="hidCName" value='<%=ContainerName%>' />
			<input type=hidden id="hidCKey" value='<%=ContainerKey%>' />
			<input type=hidden id="hidPFolderId" value='<%=ParentFolderId%>' />
     </form>
	
  </body>
</html>
