<!--#include file="CNCASPPageManager_ManualLogin.inc" -->
<!--#include virtual="/NR/system/access/IISAuthentication.inc"-->

<%
' ************************************************************************
' File:		/NR/System/HttpExec/Access/ManualLogin.asp
'
' Author:	Microsoft Corporation.
' Purpose:	Creates a form to ask the user for a username, domain and password.
'
' Query String Parameters:
'
'	 ReturnUrl: The page to redirect to if authentication is successful
'	 REASONTXT: A message indicating why the user was asked to login manually (optional)
'
' ************************************************************************

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



%>

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

<html>
<head>
</head>

<script language="JavaScript" type="text/javascript">
<!--
	// ---- [Private] To refresh the input box value based on the dropdown list selection
	function WBC_onChangeDomain()
	{
		var nOptIndex = window.document.WBC_formManualLogin.NR_DOMAIN_LIST.selectedIndex;
		var strDomain = window.document.WBC_formManualLogin.NR_DOMAIN_LIST.options[nOptIndex].value;
		window.document.WBC_formManualLogin.NR_DOMAIN.value = strDomain;
		return false;
	}

-->
</script>



<BODY onload="WBC_onChangeDomain();">

<center>
<h2><%=IDS_UI_AUTHENTICATION_REQUIRED%></h2>
<p><%=Server.HTMLEncode(g_pASPPageManager.ReasonText)%></p>


<form name="WBC_formManualLogin" method="post" action="ManualLoginSubmit.asp">
<table align=left width="100%" border="0" cellspacing="0" cellpadding="0">

		<tr valign=top>
			<td rowspan="999"><img src="<%=IDS_ACCESS_INTERNAL_TRANSPARENT%>"
								width="<%= C_INT_LOGIN_MAIN_MARGIN %>" height="<%=C_INT_LOGIN_SUBHEAD_HEIGHT%>" border="0"></td>
			<td><img src="<%=IDS_ACCESS_INTERNAL_TRANSPARENT%>"
								width="100%" height="1" border="0"></td>
			<td rowspan="999"><img src="<%=IDS_ACCESS_INTERNAL_TRANSPARENT%>"
								width="<%= C_INT_LOGIN_MAIN_MARGIN %>" height="<%=C_INT_LOGIN_SUBHEAD_HEIGHT%>" border="0"></td>
		</tr>

<%
		' Default State is Show SSL if no cookie can be found
		' If there is no SSL and we are not using LocalHost.....
		If ((Not g_pASPPageManager.IsSSLRunning) And (Not g_pASPPageManager.IsLocalHost)) Then
			Call g_pASPPageManager.CheckBoxStateControl.DisplayStateControl()
		End If
%>


		<tr valign=top>
			<td>
				<table align=center width="75%" border="0" cellspacing="0" cellpadding="2">
					<tr align=center>
						<td valign=top width="35%" align=right><%=IDS_UI_DOMAIN%></td>
						<td valign=top width="65%" align=left><input type="text" NAME="<%=IDS_NR_DOMAIN%>" ID=txtInsDomains SIZE="40" VALUE=""></td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td>
						<SELECT NAME="NR_DOMAIN_LIST" SIZE="1" ONCHANGE="WBC_onChangeDomain();">
<%
						Dim arrayDomain

						arrayDomain = g_pASPPageManager.DomainsList

						'Output list of domains into drop-down menu.
						For DomainCount = 0 to UBound(arrayDomain)

							strWINNT = Left ( arrayDomain(DomainCount), 8)

							'Set the value of each option to the domain name.
							Response.Write("<OPTION VALUE=""" + arrayDomain(DomainCount) + """>")

							' Previously, the code checked for a WinNT domain and displayed the value
							' in the domain drop-down list. If an LDAP path was found, it was filtered
							' out. Now, we display all paths, regardless of whether it is a WinNT
							' domain or LDAP path. This change is necessary to support Active Directory

							' first, check to see if WinNT domain.
							If (strWINNT = IDS_WINNT_DOMAIN) Then
								'Set the displayed value of each option to the domain name w/o the "WinNT://" in front.
								Response.Write(Right(arrayDomain(DomainCount), Len(arrayDomain(DomainCount)) - 8))

							Else
								' For LDAP (and all other) entries, just use the literal name for the display name
								Response.Write(arrayDomain(DomainCount))

							End If
						Next
%>
						</SELECT>
						</td>
					</tr>
					<tr>
						<td align=right><%=IDS_UI_USER_NAME%>&nbsp;</td>
						<td><input name="<%=IDS_NR_USER%>" </input></td>
					</tr>
					<tr>
						<td align=right><%=IDS_UI_PASSWORD%>&nbsp;</td>
						<td><input name="<%=IDS_NR_PASSWORD%>" type="password"></input></td>
					</tr>

					<tr>
						<td>
						</td>
						<td align=left>
							&nbsp;&nbsp;&nbsp;&nbsp;
							<input type="submit" value="<%=IDS_UI_CONTINUE%>"  id=submit1 name=submit1>
						</td>
					</tr>
				</table>
			</td>
		</tr>


</table>

<input type="hidden" Name="<%=IDS_ACCESS_QSTR_RETURNURL%>" value="<%=Server.HTMLEncode( g_pASPPageManager.ReturnUrl )%>" >


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



