﻿<!--
/*
######################################
# User ID
######################################
*/
function UserLoginName()
{
	var User_LoginName = $("User_LoginName");

	var Pattern = /^[a-zA-Z][a-zA-Z0-9_]{5,15}$/;
	if (Pattern.test(User_LoginName.value))
	{
		Disabled("SignIn", 0);
		User_LoginName.className = "InputRight";
		CheckImage("WarningMessage_User_LoginName", 1, "Right!");
		CheckForm = 0;
	}
	else
	{
		Disabled("SignIn", 1);
		User_LoginName.className = "InputWarning";
		CheckImage("WarningMessage_User_LoginName", 2, "(6-16) English letters and numbers and underscore composition.");
		CheckForm = 1;
	}
	return (CheckForm);
}


/*
######################################
# Password
######################################
*/
function UserPassword()
{
	var User_Password = $("User_Password");


	if ((User_Password.value.length > 5) && (User_Password.value.length < 21))
	{
		Disabled("SignIn", 0);
		User_Password.className = "InputRight";
		CheckImage("WarningMessage_User_Password", 1, "Right");
		CheckForm = 0;
	}
	else
	{
		Disabled("SignIn", 1);
		User_Password.className = "InputWarning";
		CheckImage("WarningMessage_User_Password", 2, "Password is at least 6-20 characters.");
		CheckForm = 1;
	}
	return (CheckForm);
}


/*
######################################
# Post
######################################
*/
function PostForm()
{
	var CheckForm = 0;
	CheckForm += UserLoginName()
	CheckForm += UserPassword();

	Disabled("SignIn", 1);


	if (CheckForm == 0)
	{
		$("SignIn").value = "Please wait...";

		SignInForm.action = "?Method=CheckSignIn";
		SignInForm.method = "POST";
		SignInForm.submit();
	}
}
//-->
