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

<%
' **************************************************************************************
' File:		/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/ResourceBrowser/Management/ResourceReplace.asp
' Author:	Microsoft Corporation.
' Purpose:
'	Obtaining Query String parameters
'
' Query String Parameters:
'   IDS_QPARAM_GALLERY_GUID: Resource Gallery Guid
'	IDS_QPARAM_RESOURCE_GUID: Resource Guid
'***************************************************************************************


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

Dim pASPUtils
Set pASPUtils = g_pASPPageManager.ASPUtilsObject
%>

<!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 selection of local resource and its properties">
<meta name="robots" content="NOINDEX,NOFOLLOW">
<meta http-equiv="Content-Type" content="text/html;charset=<%= g_pASPPageManager.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/Management/ResourceProperties.js"
		type="text/javascript"></script>
<script language="JavaScript"
		type="text/javascript">
<!--
	function WBC_onPreview(strResType)
	{
		WBC_previewLocalResource(strResType);
		return false;
	}

	function WBC_onCancel()
	{
		window.close();
		return false;
	}
//-->
</script>
</head>

<body <%= IDS_BODYSETTING %>>

<%	If (g_pASPPageManager.Error <> "") Then %>

<form name="NC_LocalForm" method="post" enctype="multipart/form-data">

<%	Else %>

<form name="NC_LocalForm" method="post"
		action="<%= g_pASPPageManager.URLFormPostAction %>"
		enctype="multipart/form-data"
		onsubmit='return WBC_validateResource(false)'>

<%	End If %>


<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<!-- Show the Top Title -->
	<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_RESOURCE_MANAGER %>
		</td>
		<td><img src="<%=IDS_TRANSPARENT_GIF%>"
					width="<%= C_INT_MAIN_MARGIN %>" height="<%=C_INT_HEADER_HEIGHT%>" border="0"></td>
	</tr>

	<!-- Show the breadcrumb trail -->
	<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">
			<%= IDS_UI_RESOURCE_REPLACE %>
		</td>
		<td><img src="<%=IDS_TRANSPARENT_GIF%>"
			width="<%= C_INT_MAIN_MARGIN %>" height="<%=C_INT_SUBHEAD_HEIGHT%>" 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>


	<tr>
		<td><img src="<%=IDS_TRANSPARENT_GIF%>"
			width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
	</tr>

	<%	If (g_pASPPageManager.Error = IDS_ERR_RESOURCE_NOT_FOUND) Then %>

		<!-- Display the fact that Resource Is Nothing -->
		<tr>
			<td class="WBC_styclsBackground1">
				<table width="100%" border="0" cellspacing="<%= C_INT_THICK_BORDER %>" cellpadding="5">
					<tr class="WBC_styclsBackground2">
						<td>
							<span class="WBC_styclsHeavyTextColor1"><%= IDS_UI_RESOURCE %>:</span>&nbsp;&nbsp;
							<span class="WBC_styclsTextColor1"><%= IDS_UI_RESOURCE_NOT_FOUND %></span>
						</td>
					</tr>
				</table>
			</td>
		</tr>

	<%	Else %>

		<!-- Show area displaying info about current object -->
		<tr>
			<td class="WBC_styclsBackground1">
				<table width="100%" border="0" cellspacing="<%= C_INT_THICK_BORDER %>" cellpadding="5">
					<tr class="WBC_styclsBackground2">
						<td>
							<span class="WBC_styclsHeavyTextColor1"><%= IDS_UI_RESOURCE %>:</span>&nbsp;&nbsp;
							<span class="WBC_styclsTextColor1">
								<%
									Call pASPUtils.MBCSWrite( pASPUtils.HTMLEncode(g_pASPPageManager.Resource.Parent.Path), g_pASPPageManager.CodePage)
									Call pASPUtils.MBCSWrite( pASPUtils.HTMLEncode(g_pASPPageManager.Resource.DisplayName), g_pASPPageManager.CodePage)
								%>
							</span>
						</td>
					</tr>
				</table>
			</td>
		</tr>

		<!-- Show the Content area -->
		<tr>
			<td><img src="<%=IDS_TRANSPARENT_GIF%>"
				width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
		</tr>
		<tr>
			<td valign="top" class="WBC_styclsBackground1">
				<table width="100%" border="0" cellspacing="2" cellpadding="5" >
					<tr class="WBC_styclsBackground2">
						<td valign="top" >
							<table width="100%" border="0" cellspacing="0" cellpadding="5" >

								<!-- Show the mime-type -->
								<tr valign="top">
									<td class="WBC_styclsHeavyTextColor1"><%= IDS_UI_LABEL_TYPE %></td>
									<td class="WBC_styclsTextColor1"><%= g_pASPPageManager.Resource.MIMEType %>
								</tr>

								<!-- Show the file upload UI -->
								<tr>
									<td valign="top" class="WBC_styclsHeavyTextColor1"><%= IDS_UI_RESOURCE_LOCAL %></td>
									<td>
										<input type="file" name="NC_FileData" size="30">
										<br>
										<a href="#" onclick="return WBC_onPreview('<%= IDS_RESTYPE_ATTACHMENT %>')">
											<img src="<%=IDS_RESOURCEBROWSER_IMG_PATH%><%=IDS_IMG_ICON_PREVIEW%>" border="0"></a>
									</td>
								</tr>

								<!-- Show the separator for the Propertie section -->
								<tr valign="middle">
									<td colspan="2">
										<table width=100% border=0 cellspacing=0 cellpadding=0>
											<tr>
												<td width="250"><hr></td>
												<td width="150" align="Center" valign="top" class="WBC_styclsHeavyTextColor1">
													<nobr><%= IDS_UI_RESOURCE_PROPERTIES %></nobr>
												</td>
												<td width="250"><hr></td>
											</tr>
										</table>
									</td>
								</tr>

								<!-- Render Display name -->
								<tr valign="top">
									<td class="WBC_styclsHeavyTextColor1"><%= IDS_UI_LABEL_DISPLAYNAME %></td>
									<td class="WBC_styclsTextColor1"><% Call WriteResourceDisplayNameDataHTML(g_pASPPageManager.Resource.CanSetProperties, g_pASPPageManager.Resource.Parent, g_pASPPageManager.Resource) %></td>
								</tr>

								<!-- Render Description -->
								<tr valign="top">
									<td class="WBC_styclsHeavyTextColor1"><%= IDS_UI_LABEL_DESCRIPTION %></td>
									<td class="WBC_styclsTextColor1"><% Call WriteResourceDescriptionDataHTML(g_pASPPageManager.Resource.CanSetProperties, g_pASPPageManager.Resource.Parent, g_pASPPageManager.Resource) %></td>
								</tr>

								<tr>
									<td colspan="2">&nbsp;</td>
								</tr>

							</table>
						</td>
					</tr>
				</table>
			</td>
		</tr>

	<%	End If %>

	<!-- Show Ok & Cancel buttons -->
	<tr>
		<td><img src="<%=IDS_TRANSPARENT_GIF%>"
			width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
	</tr>
	<tr>
		<td align=right>
			<input type="Image" alt="<%=IDS_UI_TOOLTIP_REPLACE_LOCAL_RESOURCE%>" border="0"
				src="<%=IDS_RESOURCEBROWSER_IMG_PATH%><%=IDS_IMG_BTN_OKAY%>">&nbsp;&nbsp;
			<a href="#" onclick="return WBC_onCancel()">
				<img name="NCRes_Cancel" alt="<%=IDS_UI_TOOLTIP_CANCEL%>" border="0"
				src="<%=IDS_RESOURCEBROWSER_IMG_PATH%><%=IDS_IMG_BTN_CANCEL%>"></a>
		</td>
	</tr>

</table>
</form>


</body>
</html>