<!--#include file="CNCASPPageManager_ImageLocalProperties.inc" -->

<%
'************************************************************************************
' File:		/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/Authoring/
'			ImageBrowser/ImageProperties/ImagePropertiesBrowse.asp
' Author:	Microsoft Corporation.
' Purpose:	Display a list of image from local resources.  Entry point will be the
'			the Console UI. Exit pt is ImagePropertiesBrowse.asp
'
' Query String Parameters:
'	[API-Generated-Query-Params]: This set of parameters is generated by
'								invoking the API method Posting.QueryString
'								in the previous ASP page. It contains all the
'								necessary information to be interpreted by the
'								API to set the AutoSession.This object in this
'								ASP page.
'	IDS_QPARAM_PHNAME: Placeholder Name.
'	IDS_QPARAM_PHTYPE: Placeholder Type.
'	                   Valid values are IDS_PHTYPE_MULTIPURPOSE,
'	                   IDS_PHTYPE_SINGLEATTACHMENT, IDS_PHTYPE_SINGLEIMAGE,
'	                   IDS_PHTYPE_SINGLELINETEXT, IDS_PHTYPE_MULTILINETEXT and
'	                   IDS_PHTYPE_THINEDITIE.
'	IDS_QPARAM_RESTYPE: Resource Type.
'	                    Valid values are IDS_RESTYPE_ATTACHMENT, IDS_RESTYPE_IMAGE
'	                    and IDS_RESTYPE_VIDEO.
'*************************************************************************************

' we can only run in unpublished mode
if AutoSession.IsModeUnpublished = false then
	Response.End
end if

' ---- Initialize the ASPPageManager
Dim g_pASPPageManager
Set g_pASPPageManager = New CNCASPPageManager_ImageLocalProperties
Call g_pASPPageManager.InitManager()

%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="expires" content="-1">
	<meta name="Author" content="Microsoft Corporation.">
	<meta name="Description" content="Display a list of image from local resources">
	<meta name="robots" content="NOINDEX,NOFOLLOW">
	<meta http-equiv="Content-Type" content="text/html;charset=<%= g_pASPPageManager.CurrentPosting.Charset %>">
	<title><%= IDS_UI_BROWSER_TITLE %></title>

	<% Call EmbedWBCHeadSection %>
	<script language="JavaScript"
		src="/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/ResourceBrowser/Common/ResourceBrowserCommon.js"
		type="text/javascript"></script>
	<script language="JavaScript"
		src="/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/ResourceBrowser/Authoring/ResourceBrowserClient.js"
		type="text/javascript"></script>
</head>

<% If (g_pASPPageManager.PlaceholderType = IDS_PHTYPE_SINGLEIMAGE) Then %>
<body <%= IDS_BODYSETTING %> class="WBC_styclsTextColor0" onload="WBC_loadImageProperties('<%= g_pASPPageManager.PlaceholderName %>')">
<% Else %>
<body <%= IDS_BODYSETTING %> class="WBC_styclsTextColor0">
<% End If %>

<form name="NC_LocalForm" method="post"
		action="<%= g_pASPPageManager.URLFormAction %>" enctype="multipart/form-data"
		onsubmit='return WBC_validateLocalPath("<%= IDS_RESTYPE_IMAGE %>")'>

	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<!-- Show the Main Header -->
		<tr class="WBC_styclsBackground1">
			<td align="right"><img border="0" src="<%=IDS_PATH_IMAGE_LOGO %>"></td>
			<td width="100%" valign="middle"  class="WBC_styclsHeaderText">
				<%= IDS_UI_LABEL_INSERT_IMAGE %>
			</td>
			<td><img src="<%=IDS_TRANSPARENT_GIF%>"
						width="<%= C_INT_MAIN_MARGIN %>" height="<%=C_INT_HEADER_HEIGHT%>" border="0"></td>
		</tr>

		<!-- Show the Sub Header -->
		<tr class="WBC_styclsBackground2">
			<td><img src="<%= IDS_TRANSPARENT_GIF %>"
				width="<%= C_INT_MAIN_MARGIN %>" height="<%=C_INT_SUBHEAD_HEIGHT%>" border="0"></td>
			<td class="WBC_styclsSubheadText">
				<a href='<%= g_pASPPageManager.URLSelectImage %>'><%= IDS_UI_LABEL_SELECT_SOURCE %></a> > <%= IDS_UI_LABEL_INSERT_IMAGE %>
			</td>
			<td><img src="<%= IDS_TRANSPARENT_GIF %>"
				width="<%= C_INT_MAIN_MARGIN %>" height="<%= C_INT_SUBHEAD_HEIGHT %>" border="0"></td>
		</tr>
		<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 src="<%= IDS_TRANSPARENT_GIF %>"
						width="<%= C_INT_MAIN_MARGIN %>" height="1" border="0"></td>
			<td><img src="<%= IDS_TRANSPARENT_GIF %>"
						width="100%" height="1" border="0"></td>
			<td rowspan="999"><img src="<%= IDS_TRANSPARENT_GIF %>"
						width="<%= C_INT_MAIN_MARGIN %>" height="1" border="0"></td>
		</tr>

		<!-- Write the Placeholder information -->
		<tr>
			<td>
				<table class="WBC_styclsbackground1" width="70%" border="0" cellspacing="0" cellpadding="2">
					<td>
						<table class="WBC_styclsbackground2" width="100%" border="0" cellspacing="0" cellpadding="5">
							<tr class="WBC_styclsBackground2">
							<td>
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td valign="middle" align="left">
											<span class="WBC_styclsHeavyTextColor1">
												<%= IDS_UI_LABEL_IMAGE_SOURCE %>:
											</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
											<span class="WBC_styclsTextColor1" >
												<%= IDS_UI_LABEL_LOCAL_IMAGE %>
											</span>
										</td>
									</tr>
								</table>
							</td>
							</tr>
						</table>
					</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td><img src="<%= IDS_TRANSPARENT_GIF %>"
				width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
		</tr>

		<tr>
			<td>
				<table class="WBC_styclsbackground1" width="70%" border="0" cellspacing="0" cellpadding="2">
					<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_IMAGE %>:</nobr></td>
								<td align="right">
									<a href="#" onclick="WBC_onPreview('<%= IDS_RESTYPE_IMAGE %>')">
										<img src="<%= IDS_PATH_IMAGES_COMMON & IDS_IMG_ICON_PREVIEW %>" border="0"></a>&nbsp;
								</td>
								<td>
									<input type="file" name="NC_FileData"
										size="<%= ID_INPUTBOX_SIZE %>"
										class="WBC_styclsInputField">
								</td>
							</tr>

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

								<td colspan=2>&nbsp;</td>
								<td class="WBC_styclsTextColor0" colspan="2">
									<% Call ShowMimeTypeSel( IDS_RESTYPE_IMAGE ) %>
								</td>
							</tr>

							<!-- Show the input field for image properties -->
							<tr>
								<td class="WBC_styclsHeavyTextColor1" colspan="3">
									<%= IDS_UI_LABEL_OPTIONAL_PROPERTIES %>
								</td>
							</tr>

					<%	If g_pASPPageManager.CanHyperlinks Then %>

							<tr>
								<td class="WBC_styclsTextColor1">
									<%= IDS_UI_LABEL_HYPERLINK %>:
								</td>
								<td>&nbsp;</td>
								<td>
									<!-- show hyperlink browse field -->
									<table cellpadding=0 cellspacing=0>
									<tr>
									<td valign=top>
									<input name="NC_HRef" type="text"
										size="<%= ID_INPUTBOX_SIZE %>"
										class="WBC_styclsInputField" value="http://">
									</td>
									<td valign=top>
								<%
									' The InternalLinks.asp dialog does not work under IE4, so we
									' need to mask out the "Browse..." button here which is the
									' entry point to that dialog

									If ( isMSIE() And Left(GetBrowserVerFull(),3) = "4.0" ) Then
								%>
									&nbsp;
								<% Else %>
									<a href="#" onclick="return WBC_onBrowse()">
									<img border="0" src="<%= IDS_PATH_IMAGES_COMMON & IDS_IMG_BTN_BROWSE %>">
									</a>
								<% End If %>
									</td>
									</tr>
									</table>
								</td>
							</tr>
					<%	End If %>

							<tr>
								<td class="WBC_styclsTextColor1" >
									<nobr><%= IDS_UI_LABEL_ALTERNATE_TEXT %>:</nobr>
								</td>
								<td>&nbsp;</td>
								<td>
									<input name="NC_AltText" type="text"
										size="<%= ID_INPUTBOX_SIZE %>"
										class="WBC_styclsInputField" value="">
								</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>
				</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">
							<input type="image" src="<%= IDS_PATH_IMAGES_COMMON & IDS_IMG_BTN_INSERT %>" border="0" id=image1 name=image1>
							&nbsp;
							<a href="#" onclick="window.close(); return false;">
								<img name="NCImg_Cancel" border="0"
									src="<%= IDS_PATH_IMAGES_COMMON & IDS_IMG_BTN_CANCEL %>"></a>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>

</form>
</body>
</html>