﻿		function writeForm(path, account, subname) {
	var txt = new Array();
	var _ = 0;
	txt[_++] = '<p>';
	txt[_++] = '	<label for="account">アカウント</label><input tabindex="0" name="account" id="account" value="' + account + '" /><br>';
	txt[_++] = '	<label for="password">パスワード</label><input type="password" name="password" id="password" /><br>';
	txt[_++] = '	<label for="subName">サブネーム</label><select name="subName" id="subName"><br>';
	txt[_++] = '		<option value="1"' + (subname == 1 ? ' selected="selected"' : '') + '>blue</option>';
	txt[_++] = '		<option value="2"' + (subname == 2 ? ' selected="selected"' : '') + '>green</option>';
	txt[_++] = '		<option value="3"' + (subname == 3 ? ' selected="selected"' : '') + '>red</option>';
	txt[_++] = '		<option value="4"' + (subname == 4 ? ' selected="selected"' : '') + '>yellow</option>';
	txt[_++] = '	</select><input type="image" src="common/login.gif" alt="ログイン" />';
	txt[_++] = '</p>';
	document.write(txt.join(""));
}
function writeCookie(el) {
	var limit = new Date();
	limit.setTime(limit.getTime() + 14 * 24 * 60 * 60 * 1000);
	document.cookie = createCookieString("ACCOUNT", el.account.value, limit);
	document.cookie = createCookieString("SUBNAME", el.subName.options[el.subName.selectedIndex].value, limit);
}
function createCookieString(key, value, limit) {
	var txt = new Array();
	var _ = 0;
	return key + '=' + escape(value) + '; expires=' + limit.toGMTString() + ';';
}
