<%@ Page language="c#" Codebehind="AttachmentLocalBrowse.aspx.cs" AutoEventWireup="false" Inherits="Microsoft.ContentManagement.WebAuthor.AttachmentLocalBrowse" %>
<%@ Register tagprefix="WebAuthor" Tagname="DialogTitle" Src="..\..\..\Controls\DialogTitle.ascx" %>
<%@ Register TagPrefix="WebAuthor" Namespace="Microsoft.ContentManagement.WebAuthor" Assembly="Microsoft.ContentManagement.WebAuthor" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
  <HEAD>
		<title> <%= IDS_UI_BROWSER_TITLE %>
		</title>
		<meta name="GENEfRATOR" Content="Microsoft Visual Studio 7.0">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		<%= EmbedHeadSection() %>
		<script language="JavaScript"
			src="../ResourceBrowserCommon.js"
			type="text/javascript"></script>
		<script language="JavaScript"
			src="ResourceBrowserClient.js"
			type="text/javascript"></script>
		
	</HEAD>

	<BODY class=WBC_styclsTextColor0 bgColor="<%=IDS_BODYSETTING_BGCOLOR %>" 
                                    leftMargin="<%=IDS_BODYSETTING_LEFTMARGIN%>" 
                                    topMargin="<%= IDS_BODYSETTING_TOPMARGIN %>">                                    
		<FORM id="NC_LocalForm" 
            method="post"
            enctype="multipart/form-data" 
            onsubmit='return WBC_validateLocalAttachment("<%# AttachIcon %>")'
            runat="server">
		
			<table cellSpacing="0" cellPadding="0" width="100%" border="0">
				<!-- Set Dialog Title-->
				<tr>
					<td colspan="3">
						<WebAuthor:DialogTitle ID="title" runat="server"></WebAuthor:DialogTitle>
					</td>
				</tr>
				<!-- Define a margin -->
				<tr>
					<td colspan="3"><img src="<%=IDS_TRANSPARENT_GIF%>"   width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
				</tr>
				<!-- Set the margin width for the rest of the page -->
				<tr>
					<td rowSpan="999"><img height=1 src="<%=IDS_TRANSPARENT_GIF%>" width="<%= C_INT_MAIN_MARGIN %>" border=0></td>
					<td><img height=1  src="<%=IDS_TRANSPARENT_GIF%>" width="100%" border=0 ></td>
					<td rowSpan="999"><img height=1  src="<%=IDS_TRANSPARENT_GIF%>" width="<%= C_INT_MAIN_MARGIN %>"  border=0></td>
				</tr>
				<!-- Write the status box -->
				<tr>
					<td>
						<WebAuthor:StatusBox ID="statusbox" runat="server"></WebAuthor:StatusBox>
					</td>
				</tr>
				<!-- Define a margin -->
				<tr>
					<td><img src="<%=IDS_TRANSPARENT_GIF%>"   width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
				</tr>

				<!-- Show the Content area -->
				<asp:PlaceHolder ID="ContentHolder" Runat="server">				
				<tr>
					<td>
						<table class="WBC_styclsbackground1" width="70%" border="0" cellspacing="0" cellpadding="2">
							<TR>
								<td>
									<table class="WBC_styclsbackground2" width="100%" border="0" cellspacing="0" cellpadding="8">
										<!-- Show the file upload UI -->
										<tr>
											<td class="WBC_styclsHeavyTextColor1"><nobr><%= IDS_UI_LABEL_LOCAL_ATTACHMENT %>:</nobr></td>
											<td align="right" valign=middle>
												<a href="#" onclick="WBC_onPreview('<%= IDS_RESTYPE_ATTACHMENT %>')">
													<img id="hlPreview" src="<%= IDS_PATH_IMAGES_COMMON_ICONS %><%= IDS_IMG_ICON_PREVIEW %>" ALT="<%=IDS_UI_TOOLTIP_PREVIEW%>" border="0"></a>&nbsp;</td>
											<td colspan="2">
												<input type="file" id="NC_FileData" runat="server"
														size="<%# ID_INPUTBOX_SIZE %>"
														class="WBC_styclsInputField" />
											</td>
										</tr>
										<!-- Show small space -->
										<tr>
											<td colspan="3"><img src="<%= IDS_TRANSPARENT_GIF %>"
													width="15" height="<%= C_INT_XSMALL_SPACING %>" border="0"></td>
										</tr>

										<!-- Show the mime type selection list -->
										<tr>
											<td valign="top">
												<span class="WBC_styclsHeavyTextColor1"><%= IDS_UI_LABEL_FILE_TYPE %>:</span>
											</td>

											<td>&nbsp;</td>
											<td>
												<span class="WBC_styclsTextColor1">
												<%= IDS_UI_LABEL_FILE_TYPE_DESC %>
												</span>
											</td>
										</tr>
										<tr>
											<td>&nbsp;</td>
											<td>&nbsp;</td>

											<td class="WBC_styclsTextColor0" colspan="2">
												<asp:DropDownList ID="MimeTypeList" autopostback="false" Runat="server" />
											</td>
										</tr>

										<!-- Show small space -->
										<tr>
											<td colspan="3"><img src="<%= IDS_TRANSPARENT_GIF %>"
													width="15" height="<%= C_INT_XSMALL_SPACING %>" border="0"></td>
										</tr>

										<!-- show display field -->
										<tr>
											<td class="WBC_styclsHeavyTextColor1">
												<%= IDS_UI_LABEL_DISPLAY_TEXT %>:
											</td>
											<td>&nbsp;</td>
											<td>
												<asp:TextBox id="NC_DispText"
												size=<%# ID_INPUTBOX_SIZE %>
												cssclass="WBC_styclsInputField" text="" Runat="server" />
											</td>
										</tr>

										<!-- Show the small space -->
										<tr>
											<td colspan="3"><img src="<%= IDS_TRANSPARENT_GIF %>"
													width="15" height="<%= C_INT_XSMALL_SPACING %>" border="0"></td>
										</tr>
									</table>
								</td></TR>
						</table>
						<!-- Show the Okay & Cancel buttons -->
						<table border="0" width="70%" cellspacing="0" cellpadding="0">
							<tr>
								<td colspan="3"><img src="<%= IDS_TRANSPARENT_GIF %>"
												width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
							</tr>
							<tr align="right">
								<td colspan="3" align="right">
									<asp:ImageButton id="NCImg_Insert" src='<%# IDS_PATH_IMG_BTN_INSERT %>' OnClick="UploadFile" Runat="server" />
									&nbsp; 
									<a id="NCImg_Cancel" href="#" onclick="window.close(); return false;"><img border="0"
													src="<%= IDS_PATH_IMAGES_COMMON_BUTTONS %><%= IDS_IMG_BTN_CANCEL %>"></a>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				</asp:PlaceHolder>				
				
			</table>
	
		</FORM>

	
	<asp:PlaceHolder ID="UploadSuccessScript" Visible="False" Runat="server">
		<script language="JavaScript" type="text/javascript">
		<!--
			WBC_procsAttachment("<%= PlaceholderName %>", "<%= PlaceholderType %>", "<%= BlobUrl %>", <%= AttachIcon %>, "<%= Server.HtmlEncode(NC_DispText.Text) %>");
		// -->
	</script>

	</asp:PlaceHolder>
	
	</BODY>
</HTML>
