<%@ Language=VBScript %>
<% Option Explicit %>

<!--#include virtual="/NRConfig/Shared/Shared.inc"-->
<!--#include virtual="/NRConfig/Shared/UIConstants.inc"-->
<!--#include virtual="/NRConfig/SecurityConfig/CNCASPPageManager_SystemAccountConfig.inc"-->
<!--#include virtual="/NRConfig/Shared/CNCDialogModalControl.inc"-->
<!--#include virtual="/NRConfig/Shared/ASPUtils.inc"-->

<%
'*****************************************************************************
' Copyright (C) 2001 Microsoft Corporation. All rights reserved.
'
' File:   /SCA/ConfigSecurity/SystemAccountConfigDlg.asp
' Author: Microsoft Corporation
'
' Purpose:
'   ASP file that generates a user interface to configure CMS System Account.
'
' Query String Parameters:
'
'	ResServerIndex:  Resolution Server Entry Point, Value > 0.
'*****************************************************************************
'--Creat an instance for init manager class to get query string

Dim g_pASPPageManager
Dim m_pUIASPPageManager

Set g_pASPPageManager = New CNCASPPageManager_SystemAccountConfig
Call g_pASPPageManager.InitManager()
' -- Create am instance of CNCASPPageUI_SystemAccountConfig
Set m_pUIASPPageManager = New CNCASPPageUI_SystemAccountConfig
Call m_pUIASPPageManager.InitClass(g_pASPPageManager)

'	Show SSL warning only if
'   IsSSLRunning = False and
'   LocalHost = False
If ((Not g_pASPPageManager.IsSSLRunning) And _
     (Not g_pASPPageManager.IsLocalHost))Then
    Call ServerSideRedirect(g_pASPPageManager.SecurityAlertURL)
End If
%>
<HTML>
<HEAD>

<meta name="Author" content="Microsoft Corporation">
<meta name="Description" content="Configuring SCA CMS System Account">

<script language="JavaScript" src="/NRConfig/Shared/Shared.js" type="text/javascript"></script>
<script language="JavaScript" SRC="SystemAccountConfig.js" type="text/javascript" ></script>
<script language="JavaScript" type="text/javascript" >window.name="WSystemAccount"</script>
<link rel="StyleSheet" href="/NRConfig/Shared/Shared.css" type="text/css" >
<link rel="StyleSheet" href="SystemAccountConfig.css" type="text/css" >

<TITLE><%=IDS_UI_PAGE_TITLE_SECURITYCONFIG & " - " & IDS_UI_TITLE_RESOLUTION_SERVER_APP%></TITLE>

</HEAD>
<BODY bgColor="#ffffff">
<div id="AppTitle" class="SCAStyleAppSystemAccountTitle">
	<table border="0" width="670" bgcolor="#330066">
		  <tr>
		   		<td width="25">
	     	      	<IMG alt="<%=IDS_UI_IMAGE_ALT_LOGO%>"
						src = "<%=IDS_IMAGE_LOGO%>"
				        border=0 >
				</td>
				<td class="SCAStyleLargeText">
		    			<b><%=IDS_UI_TITLE_RESOLUTION_SERVER_APP & " - " & IDS_UI_SYSTEM_ACCOUNT%></b>
		    	</td>
		   </tr>
	</table>
</div>
<div id="SystemAccountUpdate" class="SCAStyleSystemAccountDetailPos">
<form name="SCA_frm_ConfigSecurity" method="post">
<INPUT type="hidden" name="SCA_frm_formSubmit" value="True">
<INPUT type="hidden" name="SCA_frm_SysAccount_DirtyFlag"  value="<%= Server.HTMLEncode(m_pUIASPPageManager.bDirtyFlag) %>">
    <div id="SysAccount" class="SCAStyleSysAccountTitle">
			<table border="0" width = "680" cellspacing="3" cellpadding="3">
				<tr>
					<td  class= "SCAStyleTitle"><b><%=IDS_UI_RESSYSTEM_ACCOUNT%></b>
						<%
						If g_pASPPageManager.IsSupportedBrowser <> "OK" Then
							Call Response.Write ("<font size='2' color='#FF0000'><b><i>" & Server.HTMLEncode(g_pASPPageManager.IsSupportedBrowser) & "</i></b></font>")
						End If
						%>
					</td>
				</tr>
			</table>
		</div>
		<div class="SCAStyleSysAccountDetail">
			<table border="0" width = "660" cellspacing="3" cellpadding="1">
				<tr>
					<td align="right" width="250" class= "SCAStyleTitle"><b><%=IDS_UI_NT_ACCOUNT%></b>
					</td>
					<td width="260">
						<INPUT  name="frm_Textbox_NTAccount" size=48  value="<%= Server.HTMLEncode(m_pUIASPPageManager.SysAccount) %>" OnChange="SCA_clearDummyPassword()" >

					</td >
					<td width="130" class="SCAStyleSetMouseIcon">
						<img  name="btn_NTAccoutBrowse" border="0" src="<%=IDS_IMAGE_BTN_OFF_BROWSER%>"  width="120" height="24" alt ="<%=IDS_UI_IMAGE_ALT_BROWSER_NTDOMAIN_USERS%>"
							onMouseOut="SCA_swapImgRestore()" onMouseOver="SCA_swapImage('btn_NTAccoutBrowse','','<%=IDS_IMAGE_BTN_ON_BROWSER%>',1)"
							onclick ="SCA_openPopupWindowForSecurity('<%=IDS_ASPPAGE_NTUserBrowse%>?SelectMode=true&InIineDialog=True&<%=IDS_TIME_STAMP%>=<%=CDbl(CDate(now))%>',330,450)" align="right">
					</td >
				</tr>
				<tr>
					<td  align="right" class= "SCAStyleTitle"><b><%=IDS_UI_ACCOUNT_PASSWORD%></b>
					</td>
					<td>
						<% If m_pUIASPPageManager.ValidateStatus = "" Then %>
							<INPUT  type="password" name="frm_Textbox_SysPassword" size=20 value="<%=IDS_DUMMY_PASSWORD%>"  OnChange="SCA_setPasswordModified()" OnClick="SCA_clearDummyPassword()" >
						<% Else %>
							<INPUT  type="password" name="frm_Textbox_SysPassword" size=20 value=""  OnChange="SCA_setPasswordModified()" OnClick="SCA_clearDummyPassword()" >
						<% End If %>
					</td>
					<td>
					</td>
				</tr>
			</table>
		</div>
		<div class="SCAStyleSystemAccountButtonPosition">
			<table border="0" width="260" cellspacing="2" cellpadding="0">
				<tr >
					<td align="center"class="SCAStyleSetMouseIcon">
						<img  name="btn_configSystemAccountOK" border="0" src="<%=IDS_IMAGE_BTN_OK_OFF %>"  width="120" height="24" alt="<%=IDS_UI_IMAGE_ALT_POPUP_OK%>"
									onMouseOut="SCA_swapImgRestore()" onMouseOver="SCA_swapImage('btn_configSystemAccountOK','','<%=IDS_IMAGE_BTN_OK_ON %>',0)"
										onClick="SCA_SystemAccountSubmit('<%= Server.URLEncode(g_pASPPageManager.ResServerIndex) %>')" align="right">
					</td>
					<td align = "center" class="SCAStyleSetMouseIcon">
						<img  name="btn_configSystemAccountCancel" border="0" src="<%=IDS_IMAGE_BTN_CANCEL_OFF%>"  width="120" height="24" alt="<%=IDS_UI_IMAGE_ALT_POPUP_CLOSE%>"
									onMouseOut="SCA_swapImgRestore()" onMouseOver="SCA_swapImage('btn_configSystemAccountCancel','','<%=IDS_IMAGE_BTN_CANCEL_ON%>',1)"
										onClick="SCA_closeWindow()" align="right">
					</td>
				</tr>
			</table>
		</div>
</div>
<%
' -- Display error message if any
m_pUIASPPageManager.DisplayErrorMsgbox()

%>
</form>
</div>
</BODY>
</HTML>
