<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=euc-jp" />
		<link rel="stylesheet" type="text/css" href="./css/common.css">
		<link rel="stylesheet" type="text/css" href="./css/password.css">
		<title>Yacafe Sample Application</title>
		<script type="text/javascript">
			function load()
			{
				var message = document.getElementById("message");

				if(message)
				{
					if(message.innerHTML != "")
					{
						message.style.display = "block";
					}
				}
			}

			function saveValue(elem)
			{
				var tmp = document.createElement("input");

				tmp.type  = "hidden";
				tmp.name  = elem.name;
				tmp.value = elem.value;

				elem.form.appendChild(tmp);
			}

			function exclude()
			{
				var elements = document.getElementsByTagName("input");

				for(var i = 0; i < elements.length; i++)
				{
					if(elements[i].type == "submit")
					{
						elements[i].disabled = true;
					}
				}
			}
		</script>
	</head>
	<body onload="load()">
		<div id="container">
			<div id="header">
				<h1>Yacafe Sample Application</h1>
			</div>
			<div id="side">
				<div class="sp">
					{{type=include; target=template/menu.tmpl}}
				</div>
			</div>
			<div id="content">
				<div class="sp">
					<h2>パスワード変更</h2>
					<div class="elem">
						<span id="message" class="{{type=property; target=message; property=class}}">{{type=property; target=message; property=text}}</span>
						<p>ログインパスワードを変更します。</p>
						<p>現在のパスワードおよび新しいパスワードを入力後、確定ボタンをクリックして下さい。</p>
						<form name="password" action="./" method="post" onsubmit="exclude()">
							<input type="hidden" name="app"       value="password" />
							<input type="hidden" name="sessionid" value="{{type=session; target=id}}" />
							<table>
								<tr>
									<th>新しいパスワード</th><td><input class="{{type=property; target=password; property=class}}" name="password" type="password" maxlength="16" /></td>
								</tr>
								<tr>
									<th>再入力</th><td><input class="{{type=property; target=verify; property=class}}" name="verify" type="password" maxlength="16" /></td>
								</tr>
							</table>
							<div class="bottom">
								<input name="submit" class="button" type="submit" value="確定" onclick="saveValue(this)"/>
							</div>
							<div id="footer" />
						</form>
					</div>
				</div>
			</div>
		</div>
	</body>
</html>
