<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
	<title><% getProName(); %></title>
	<link rel="stylesheet" type="text/css" href="webif.css" />
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
	<meta http-equiv="Pragma" content="no-cache" />
	<meta http-equiv="Expires" content="-1" />
</head>

<SCRIPT language="JavaScript">
<!--

check_login('<% check_login(1); %>');

function check_login(status)
{
	if (status==0)
	{
		location.href="../login.asp";
	}
}

// --> 
</SCRIPT>
<SCRIPT language=JavaScript>
<!--

function show_modify_message()
{
	status=document.form.modify_password_status.value;
	if (status==1)
	{
		alert("The administrator password has been changed successfuly.")
	}
	else if (status==-1)
	{
		alert("You have entered an incorrect password. Please try again.");
	}
}

function disable()
{

	document.form.f_WEB_NAME.disabled=true;
}


function doCheckALL()
{


	if (document.form.f_web_pwd.value.indexOf(" ") != -1) //find the  blank space
 	{
 		alert("Password cannot contain space");
 		document.form.f_web_pwd.select();
		document.form.f_web_pwd.focus();
 		return;
 	}


	if (document.form.f_web_new_pwd.value.indexOf(" ") != -1) //find the  blank space
 	{
 		alert("Password cannot contain space");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}


	if (document.form.f_retype_pwd.value.indexOf(" ") != -1) //find the  blank space
 	{
 		alert("Password cannot contain space");
 		document.form.f_retype_pwd.select();
		document.form.f_retype_pwd.focus();
 		return;
 	}

	if (document.form.f_web_new_pwd.value.indexOf("\\") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf("/") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf(":") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf("*") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
	if (document.form.f_web_new_pwd.value.indexOf("?") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf("\\") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf("\"") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf("<") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf(">") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf("|") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf(".") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf(";") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf("+") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf("=") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf("~") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf("`") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf("[") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf("]") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf("{") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf("}") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf("@") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf("#") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf("(") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf(")") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
  	if (document.form.f_web_new_pwd.value.indexOf("!") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf("'") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf("^") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf("$") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf("%") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf("&") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}
 	if (document.form.f_web_new_pwd.value.indexOf(",") != -1) //find the blank space
 	{
 		alert("The Password format is not correct.\r\nCan not include \\ /:*?\"< >|.;+=~'[ ]{} @ # ()!'^$% & ,`");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
 	}



/*
	if( document.form.f_web_pwd.value == "" )
	{
		alert("Password cannot be empty! ");
		document.form.f_web_pwd.select();
		document.form.f_web_pwd.focus();
		return;
	}
*/
	if( document.form.f_web_new_pwd.value == "" )
	{
		alert("New Password cannot be empty! ");
		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();

		return;
	}
	
	if (document.form.f_web_new_pwd.value.length < 5)
	{
		alert("Password must be at least 5 characters in length. Please try again.");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;
	}
	
	if (document.form.f_web_new_pwd.value.length >8)
	{
		alert("The new password length cannot exceed 8 characters.");
 		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
 		return;	
	}
	
	if( document.form.f_web_new_pwd.value != document.form.f_retype_pwd.value )
	{
		alert("The new password and confirm password does not match. Please try again.");

		document.form.f_web_new_pwd.value="";
		document.form.f_retype_pwd.value="";
		document.form.f_web_new_pwd.select();
		document.form.f_web_new_pwd.focus();
		return;
	}

	document.form.submit();

}
// -->
</SCRIPT>

<body onload="disable(),show_modify_message();"><div id="container">

	<div id="header">
	        <div id="header-title">
			<div id="openwrt-title"><h1>DSM-G600 Admin Console</h1></div>
				<div id="short-status">
					<h3><strong>Status:</strong></h3>
					<ul>
						<li>&nbsp;</li>
						<li>&nbsp;</li>
						<li>&nbsp;</li>
						<li>&nbsp;</li>
					</ul>

				</div>
			</div>
			<div id="mainmenu"><h3><strong>Categories:</strong></h3><ul>
				<li><a href="/goform/mainMenu">&nbsp;Home&nbsp;</a></li>
				<li><a href="/goform/adv_account">&nbsp;Advanced&nbsp;</a></li>
				<li class="selected-maincat"><a href="/goform/mt_default">&raquo;Tools&laquo;</a></li>
				<li><a href="/goform/adv_status">&nbsp;Status&nbsp;</a></li>
				<li><a href="../help/help.asp">&nbsp;Help&nbsp;</a></li>
			</ul></div>
			<div id="submenu"><h3><strong>Subcategories:</strong></h3><ul>
				<li class="selected-maincat"><a href="/goform/adv_modify_admin">&raquo;Admin&laquo;</a></li>
				<li><a href="/goform/adv_timezone">&nbsp;Time&nbsp;</a></li>
				<li><a href="/goform/mtFWUpload">&nbsp;Firmware&nbsp;</a></li>
				<li><a href="/goform/adv_disk_utility">&nbsp;Disk Utility&nbsp;</a></li>
				<li><a href="/goform/adv_mail_alerts">&nbsp;E-Mail Alerts&nbsp;</a></li>
			</ul></div>
		</div>
		<form action="/goform/modify_admin_passwd" name="form" method="post">
		<div id="content">
			<div class="settings-block">
				<div class="settings-block-title"><h2>Administrator's Password</h2></div>
					<div class="settings">
						<div class="settings-title"><h3><strong>Set the administrator password here</strong></h3></div>
						<div class="settings-content">
							<table width="100%" summary="Settings">
								<tr><td width="50%">User Name:</td><td width="50%">
									<input disabled="disabled" id="pw1" type="text" name="f_WEB_NAME" value="Admin" />
								</td></tr>
								<tr><td width="50%">Password:</td><td width="50%">
									<input id="pw1" type="password" name="f_web_pwd" value="" />
								</td></tr>
								<tr><td width="50%">New Password:</td><td width="50%">
									<input id="pw1" type="password" name="f_web_new_pwd" value="" />
								</td></tr>
								<tr><td width="50%">Confirm Password:</td><td width="50%">
									<input id="pw2" type="password" name="f_retype_pwd" value="" />
								</td></tr>
								<tr><td width="50%">&nbsp;</td><td width="50%">
									<input type="hidden" name="modify_password_status" size="20" value="<%show_admin_passwd_message();%>">
								</td></tr>
							</table>
						</div>
						<div class="settings-help"><blockquote><h3><strong>Short help:</strong></h3></blockquote></div>
						<div style="clear: both">&nbsp;</div>
					</div>
				</div>
				<hr width="40%" />
			</div>
			<br />
			<div id="save">
				<div class="page-save">
					<div>
						<p><a href="/goform/formLogout">Logout&laquo;</a></p>
					</div>
				</div>
				<div class="apply">
					<div>
						<a href="javascript:doCheckALL();">Apply&laquo;</a><br />
						<a href="javascript:document.forms[0].reset()">Cancel&laquo;</a><br />
						<a target="_blank" href="../help/help_tools.htm#01">Help&laquo;</a>
					</div>
				</div>
			</div>
		</div>
		</form>
	</div>
</body>
<head>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
</head>
</html>
