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


<%
' ********************************************************************
' File:		/NR/System/WBC/Internal/WBCFuncPages/PageOperation/AuthoringMode/PageSave
'			/NewPageSaveDlg/NewPageSaveDlg.inc
' Author:	Microsoft Corporation.
' Purpose:	Display a dlg to get the Name and display Name. Entry pt is the Authoring Form
'			Exit pt is the NewPageSave.asp for saving the page using ROM calls.
'
' Query String Parameters:
'	IDS_QSTR_PAGEOPERATIONAUTHORING_CONTINUEAUTHORING: Indicate what is the return URL mode
' ********************************************************************

' ---- Initialize the ASPPageManager
Dim g_pASPPageManager
Set g_pASPPageManager = New CNCASPPageManager_NewPageSaveDlg
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 page that gets the page Name and displayName">
<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/PageOperation/AuthoringMode/PageAuthoring.js"
			type="text/javascript"></script>

<script language="JavaScript"
		type="text/javascript">
<!--
	function WBC_CopyNameToDisplayName(strNameID, strDisplayNameID)
	{
		var pfrmNewPageSaveDlg;
		pfrmNewPageSaveDlg = document.forms["NC_NewPageSaveDlgForm"]
		pfrmNewPageSaveDlg[strDisplayNameID].value = pfrmNewPageSaveDlg[strNameID].value;
		return false;
	}

//-->
</script>
</head>

<!-- call on WBC_onLoadHandler to initialize some global settings in PageAuthoring.js -->

<body <%= IDS_BODYSETTING %>
	onload='self.focus();WBC_onLoadHandler();'>

<!-- onsubmit is set to return false to prevent form from submitting by hitting the enter key -->
<form name="NC_NewPageSaveDlgForm"
	  action=""
	  method="post"
	  enctype="multipart/form-data"
	  onsubmit="return false;">

<!--
	WARNING:
	========
	For the following HTML that has <td><img src=...></td>,
	do NOT break them into separate lines as it will alter
	the layout of the rendered page
-->

<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">
<%	If g_pASPPageManager.IsConnectedPage Then %>
			<%= IDS_UI_CREATE_CONNECTED_PAGE %>
<%	Else %>
			<%= IDS_UI_CREATE_SIMPLE_PAGE %>
<%	End If %>
		</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">
<%	If g_pASPPageManager.IsConnectedPage Then %>
			<%= IDS_UI_SAVE_NEW_CONNECTED_PAGE %>
<%	Else %>
			<%= IDS_UI_SAVE_NEW_PAGE %>
<%	End If %>
		</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.ErrorString <> IDS_E_NO_ERROR) Then %>

	<!-- Display the fact that there is an error  -->
	<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_styclsFuncPageContextLabelText"><%= IDS_UI_ERROR %>:</span>&nbsp;&nbsp;
<%		If g_pASPPageManager.ErrorString() = IDS_E_PAGE_DOES_NOT_EXIST Then %>
						<span class="WBC_styclsTextColor1"><%= IDS_UI_PAGE_DOES_NOT_EXIST %></span>
<%		ElseIf g_pASPPageManager.ErrorString() = IDS_E_ERR_SOURCE_PAGE_NOT_FOUND Then %>
						<span class="WBC_styclsTextColor1"><%= IDS_UI_ERR_SOURCE_PAGE_NOT_FOUND %></span>
<%		Else %>
						<span class="WBC_styclsTextColor1"><%= IDS_UI_ERR_UNKNOWN %></span>
<%		End If %>
					</td>
				</tr>
			</table>
		</td>
	</tr>

<%	Else %>

	<!-- 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" >

							<!-- Render URL name -->
							<tr valign="top">
								<td class="WBC_styclsHeavyTextColor1" width="30%"><%= IDS_UI_LABEL_NAME%></td>
								<td class="WBC_styclsTextColor1" width="30%">
									<% Call WritePostingNameField(g_pASPPageManager.PostingCanSetName, g_pASPPageManager.CurrentNode, g_pASPPageManager.SourceNode, g_pASPPageManager.CodePage) %>
								</td>
								<td>&nbsp;</td>
							</tr>

							<!-- Render Display name -->
							<tr valign="top">
								<td class="WBC_styclsHeavyTextColor1"><%= IDS_UI_LABEL_DISPLAY_NAME %></td>
								<td class="WBC_styclsTextColor1">
									<% Call WritePostingDisplayNameField(g_pASPPageManager.CurrentNode, g_pASPPageManager.SourceNode, g_pASPPageManager.CodePage) %></td>
								<td>
									<a href="#" onclick="return WBC_CopyNameToDisplayName('<%=IDS_FORM_POSTING_NAME%>','<%=IDS_FORM_POSTING_DISPLAYNAME%>')">
									<img name="NC_Reset" alt="" border="0" src="<%=IDS_PAGEOPERATIONAUTHORING_IMG_PATH%><%=IDS_IMG_BTN_OFF_RESET%>"></a>
								</td>
							</tr>
							<tr>
								<td colspan="2">&nbsp;</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>

<%	End If %>

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

	<tr>
		<td  align="right">
			<a href="#" onclick="WBC_onOkayClick(<%=Bool2LCaseStr(g_pASPPageManager.ContinueAuthoring)%>); return false;">
				<img name="NCImg_Confirm" src="<%=IDS_PAGEOPERATIONAUTHORING_IMG_PATH%><%=IDS_IMG_BTN_OKAY%>" border="0" alt="OK"></a>
				&nbsp;&nbsp;&nbsp;
			<a href="#" onclick="window.close(); return false;">
				<img name="NCImg_Cancel" src="<%=IDS_PAGEOPERATIONAUTHORING_IMG_PATH%><%=IDS_IMG_BTN_CANCEL%>" border="0" alt="Cancel"></a>
		</td>
	</tr>

</table>

</form>

</body>
</html>

