
function ValidationChurch()
{   var theForm=document.LFLForm;
	
	//var UnivAbbr=trimLT(theForm.Church_CHN_Name.value, "both");
	var Church_Code=trimLT(theForm.Church_Code.value, "both");
	var Church_ENG_Name=trimLT(theForm.Church_ENG_Name.value, "both");
	var address=trimLT(theForm.Address.value, "both");
	var city=trimLT(theForm.City.value, "both");
	var zipCode=trimLT(theForm.Zip.value, "both");
	var tel=trimLT(theForm.Tel.value, "both");
	
	if (!IsEmpty(Church_Code)){
		if (Church_Code.length>1){
			alert ("Church code should be only one character.");
			theForm.Church_Code.select();
			return false;
		}
	}
	if (IsEmpty(Church_ENG_Name)){
		alert ("Please give the English Name of the Church.");
		theForm.Church_ENG_Name.focus();
		theForm.Church_ENG_Name.select();
		return false;
	}
	else if (IsEmpty(address)){
		alert ("Please enter the address.");
		theForm.Address.select();
		return false;
	}
	else if (IsEmpty(city)){
		alert ("Please enter the city.");
		theForm.City.select();
		return false;
	}
	else if (IsEmpty(zipCode)){
		alert ("Please enter the Zip Code.");
		theForm.Zip.select();
		return false;
	}
	else if (!IsTel(tel)){
		alert ("Please enter a valid telephone number.");
		theForm.Tel.select();
		return false;
	}
	else if (!IsEmpty(tel)){
		if (!IsInteger(tel)){
			alert ("The phone number is in valid format.");
			theForm.Tel.select();
			return false;
		}
	}
	
	
	return true;
}

function ValidationDorm()
{   var theForm=document.LFLForm;
	
	//var UnivAbbr=trimLT(theForm.Church_CHN_Name.value, "both");
	var Dorm_ENG_Name=trimLT(theForm.Dorm_ENG_Name.value, "both");
	
	
	if (IsEmpty(Dorm_ENG_Name)){
		alert ("Please give the English Name of the Dorm.");
		theForm.Dorm_ENG_Name.focus();
		theForm.Dorm_ENG_Name.select();
		return false;
	}
	
	
	return true;
}

function ValidationAge()
{   var theForm=document.LFLForm;
	
	//var UnivAbbr=trimLT(theForm.Church_CHN_Name.value, "both");
	var Age_ENG_Name=trimLT(theForm.Age_ENG_Name.value, "both");
	
	
	if (IsEmpty(Age_ENG_Name)){
		alert ("Please give the English Name of the Age.");
		theForm.Age_ENG_Name.focus();
		theForm.Age_ENG_Name.select();
		return false;
	}
	return true;
}

function ValidationJob()
{   var theForm=document.LFLForm;
	
	//var UnivAbbr=trimLT(theForm.Church_CHN_Name.value, "both");
	var Job_ENG_Name=trimLT(theForm.Job_ENG_Name.value, "both");
	
	
	if (IsEmpty(Job_ENG_Name)){
		alert ("Please give the English Name of the Job.");
		theForm.Job_ENG_Name.focus();
		theForm.Job_ENG_Name.select();
		return false;
	}
	return true;
}

function ValidationPaymentType()
{   var theForm=document.LFLForm;
	
	//var UnivAbbr=trimLT(theForm.Church_CHN_Name.value, "both");
	var Payment_Type_ENG_Name=trimLT(theForm.Payment_Type_ENG_Name.value, "both");
	
	
	if (IsEmpty(Payment_Type_ENG_Name)){
		alert ("Please give the English Name of the Payment Type.");
		theForm.Payment_Type_ENG_Name.focus();
		theForm.Payment_Type_ENG_Name.select();
		return false;
	}
	return true;
}

function ValidationWebAuth()
{   var theForm=document.LFLForm;
	
	//var UnivAbbr=trimLT(theForm.Church_CHN_Name.value, "both");
	var WebAuth_ENG_Name=trimLT(theForm.WebAuth_ENG_Name.value, "both");
	
	
	if (IsEmpty(WebAuth_ENG_Name)){
		alert ("Please give the English Name of the WebAuth.");
		theForm.WebAuth_ENG_Name.focus();
		theForm.WebAuth_ENG_Name.select();
		return false;
	}
	return true;
}

function ValidationGroup()
{   var theForm=document.LFLForm;
	
	//var UnivAbbr=trimLT(theForm.Church_CHN_Name.value, "both");
	var Group_ENG_Name=trimLT(theForm.Group_ENG_Name.value, "both");
	
	
	if (IsEmpty(Group_ENG_Name)){
		alert ("Please give the English Name of the Group.");
		theForm.Group_ENG_Name.focus();
		theForm.Group_ENG_Name.select();
		return false;
	}
	return true;
}

function ValidationRoom()
{   var theForm=document.LFLForm;
	
	//var UnivAbbr=trimLT(theForm.Church_CHN_Name.value, "both");
	var Room_No=trimLT(theForm.Room_No.value, "both");
	
	
	if (IsEmpty(Room_No)){
		alert ("Please give the room number.");
		theForm.Room_No.focus();
		theForm.Room_No.select();
		return false;
	}
	else if (!IsEmpty(Room_No)){
		if (!IsInteger(Room_No)){
			alert ("The room number should be an integer.");
			theForm.Room_No.focus();
			theForm.Room_No.select();
			return false;
		}
	}
	
	return true;
}

function ValidationCoworker()
{   var theForm=document.LFLForm;
	
	//var UnivAbbr=trimLT(theForm.Church_CHN_Name.value, "both");
	var Last_Name=trimLT(theForm.Last_Name.value, "both");
	var First_Name=trimLT(theForm.First_Name.value, "both");
	var Tel=trimLT(theForm.Tel.value, "both");
	
	if (IsEmpty(Last_Name)){
		alert ("Please enter Last Name.");
		theForm.Last_Name.select();
		return false;
	}
	else if (IsEmpty(First_Name)){
		alert ("Please enter First Name.");
		theForm.First_Name.select();
		return false;
	}
	else if (!IsTel(Tel)){
		alert ("Please enter a valid telephone number.");
		theForm.Tel.select();
		return false;
	}
	/*else if (!IsEmpty(Tel)){
		if (!IsInteger(Tel)){
			alert ("The phone number is in valid format.");
			theForm.Tel.focus();
			theForm.Tel.select();
			return false;
		}
	}*/
	
	return true;
}

function ValidationCoworkerCheckBox()
{	var theForm=document.LFLForm;
	var CheckLog=0
	Checked_Coworker=theForm.Checked_Coworker;
	//var PrayerDetail=trimLT(theForm.PrayerDetail.value, "both");
	if (typeof Checked_Coworker.length == 'undefined') {
        // there is one item, so do this
        Checked_Coworker = new Array(Checked_Coworker);
    }
	
	for (i = 0; i < Checked_Coworker.length; i++) {
		if (Checked_Coworker[i].checked ==true) {
			CheckLog=1;
			break;
		}
	}
	if (CheckLog==0){
		alert ("Please check at least one checkbox.");
		return false;
	}
	
	return true;
}

function ValidationFamily()
{   var theForm=document.LFLForm;
	
	var Principle_Last_Name=trimLT(theForm.Principle_Last_Name.value, "both");
	var Principle_First_Name=trimLT(theForm.Principle_First_Name.value, "both");
	var Principle_CHN_Name=trimLT(theForm.Principle_CHN_Name.value, "both");
	
	var Spouse_Last_Name=trimLT(theForm.Spouse_Last_Name.value, "both");
	var Spouse_First_Name=trimLT(theForm.Spouse_First_Name.value, "both");
	var Spouse_CHN_Name=trimLT(theForm.Spouse_CHN_Name.value, "both");
			
	var Father_Last_Name=trimLT(theForm.Father_Last_Name.value, "both");
	var Father_First_Name=trimLT(theForm.Father_First_Name.value, "both");
	var Father_CHN_Name=trimLT(theForm.Father_CHN_Name.value, "both");
	
	var Mother_Last_Name=trimLT(theForm.Mother_Last_Name.value, "both");
	var Mother_First_Name=trimLT(theForm.Mother_First_Name.value, "both");
	var Mother_CHN_Name=trimLT(theForm.Mother_CHN_Name.value, "both");
	
	var Child1_Last_Name=trimLT(theForm.Child1_Last_Name.value, "both");
	var Child1_First_Name=trimLT(theForm.Child1_First_Name.value, "both");
	var Child1_CHN_Name=trimLT(theForm.Child1_CHN_Name.value, "both");
	
	var Child2_Last_Name=trimLT(theForm.Child2_Last_Name.value, "both");
	var Child2_First_Name=trimLT(theForm.Child2_First_Name.value, "both");
	var Child2_CHN_Name=trimLT(theForm.Child2_CHN_Name.value, "both");
	
	var Child3_Last_Name=trimLT(theForm.Child3_Last_Name.value, "both");
	var Child3_First_Name=trimLT(theForm.Child3_First_Name.value, "both");
	var Child3_CHN_Name=trimLT(theForm.Child3_CHN_Name.value, "both");
	
	var Child4_Last_Name=trimLT(theForm.Child4_Last_Name.value, "both");
	var Child4_First_Name=trimLT(theForm.Child4_First_Name.value, "both");
	var Child4_CHN_Name=trimLT(theForm.Child4_CHN_Name.value, "both");
	
	var Child5_Last_Name=trimLT(theForm.Child5_Last_Name.value, "both");
	var Child5_First_Name=trimLT(theForm.Child5_First_Name.value, "both");
	var Child5_CHN_Name=trimLT(theForm.Child5_CHN_Name.value, "both");
	
	var Child6_Last_Name=trimLT(theForm.Child6_Last_Name.value, "both");
	var Child6_First_Name=trimLT(theForm.Child6_First_Name.value, "both");
	var Child6_CHN_Name=trimLT(theForm.Child6_CHN_Name.value, "both");
	
	var Address=trimLT(theForm.Address.value, "both");
	var City=trimLT(theForm.City.value, "both");
	var Zip=trimLT(theForm.Zip.value, "both");
	var Tel=trimLT(theForm.Tel.value, "both");
	
	var userName=trimLT(theForm.userName.value, "both");
	var loginPassword=trimLT(theForm.loginPassword.value, "both");
	var repeatPassword=trimLT(theForm.repeatPassword.value, "both");
	
	//var userIDLength=userName.length;
	var passwordLength=loginPassword.length;
	
	if (IsEmpty(Principle_Last_Name)){
		alert ("Please enter Last Name.");
		//theForm.Principle_Last_Name.focus();
		theForm.Principle_Last_Name.select();
		return false;
	}
	else if (IsEmpty(Principle_First_Name)){
		alert ("Please enter First Name.");
		//theForm.Principle_First_Name.focus();
		theForm.Principle_First_Name.select();
		return false;
	}
	else if ((IsEmpty(Spouse_Last_Name) && !IsEmpty(Spouse_First_Name)) ||(!IsEmpty(Spouse_Last_Name) && IsEmpty(Spouse_First_Name))){
		alert ("Please enter Both Last Name and First Name.");
		//theForm.Spouse_Last_Name.focus();
		theForm.Spouse_Last_Name.select();
		return false;
	}
	else if ((IsEmpty(Father_Last_Name) && !IsEmpty(Father_First_Name)) ||(!IsEmpty(Father_Last_Name) && IsEmpty(Father_First_Name))){
		alert ("Please enter Both Last Name and First Name.");
		//theForm.Father_Last_Name.focus();
		theForm.Father_Last_Name.select();
		return false;
	}
	else if ((IsEmpty(Mother_Last_Name) && !IsEmpty(Mother_First_Name)) ||(!IsEmpty(Mother_Last_Name) && IsEmpty(Mother_First_Name))){
		alert ("Please enter Both Last Name and First Name.");
		//theForm.Mother_Last_Name.focus();
		theForm.Mother_Last_Name.select();
		return false;
	}
	else if ((IsEmpty(Child1_Last_Name) && !IsEmpty(Child1_First_Name)) ||(!IsEmpty(Child1_Last_Name) && IsEmpty(Child1_First_Name))){
		alert ("Please enter Both Last Name and First Name.");
		//theForm.Child1_Last_Name.focus();
		theForm.Child1_Last_Name.select();
		return false;
	}
	else if ((IsEmpty(Child2_Last_Name) && !IsEmpty(Child2_First_Name)) ||(!IsEmpty(Child2_Last_Name) && IsEmpty(Child2_First_Name))){
		alert ("Please enter Both Last Name and First Name.");
		//theForm.Child2_Last_Name.focus();
		theForm.Child2_Last_Name.select();
		return false;
	}
	else if ((IsEmpty(Child3_Last_Name) && !IsEmpty(Child3_First_Name)) ||(!IsEmpty(Child3_Last_Name) && IsEmpty(Child3_First_Name))){
		alert ("Please enter Both Last Name and First Name.");
		//theForm.Child3_Last_Name.focus();
		theForm.Child3_Last_Name.select();
		return false;
	}
	else if ((IsEmpty(Child4_Last_Name) && !IsEmpty(Child4_First_Name)) ||(!IsEmpty(Child4_Last_Name) && IsEmpty(Child4_First_Name))){
		alert ("Please enter Both Last Name and First Name.");
		//theForm.Child4_Last_Name.focus();
		theForm.Child4_Last_Name.select();
		return false;
	}
	else if ((IsEmpty(Child5_Last_Name) && !IsEmpty(Child5_First_Name)) ||(!IsEmpty(Child5_Last_Name) && IsEmpty(Child5_First_Name))){
		alert ("Please enter Both Last Name and First Name.");
		//theForm.Child5_Last_Name.focus();
		theForm.Child5_Last_Name.select();
		return false;
	}
	else if ((IsEmpty(Child6_Last_Name) && !IsEmpty(Child6_First_Name)) ||(!IsEmpty(Child6_Last_Name) && IsEmpty(Child6_First_Name))){
		alert ("Please enter Both Last Name and First Name.");
		//theForm.Child6_Last_Name.focus();
		theForm.Child6_Last_Name.select();
		return false;
	}
	else if (IsEmpty(Address)){
		alert ("Please enter the address.");
		//theForm.Address.focus();
		theForm.Address.select();
		return false;
	}
	else if (IsEmpty(City)){
		alert ("Please enter the city.");
		//theForm.City.focus();
		theForm.City.select();
		return false;
	}
	else if (IsEmpty(Zip)){
		alert ("Please enter the Zip Code.");
		//theForm.Zip.focus();
		theForm.Zip.select();
		return false;
	}
	else if (!IsTel(Tel)){
		alert ("Please enter a valid telephone number.");
		//theForm.Tel.focus();
		theForm.Tel.select();
		return false;
	}
	else if (IsEmpty(userName)) {
		alert ("Please enter your email address for your future access to your account.");
		theForm.userName.select();
		return false;
	}
	else if (passwordLength<6) {
		alert ("Password must be at least 6 characters or digits.");
		theForm.loginPassword.select();
		return false;
	}
	else if (loginPassword!=repeatPassword) {
		alert ("Please re-enter your password. The re-entered password must be as same as first-entered password.");
		theForm.repeatPassword.select();
		return false;
	}
	return true;
}



function ValidationUpdateFamily()
{   var theForm=document.LFLForm;
	
	var Principle_Last_Name=trimLT(theForm.Principle_Last_Name.value, "both");
	var Principle_First_Name=trimLT(theForm.Principle_First_Name.value, "both");
	var Principle_CHN_Name=trimLT(theForm.Principle_CHN_Name.value, "both");
	
	var Spouse_Last_Name=trimLT(theForm.Spouse_Last_Name.value, "both");
	var Spouse_First_Name=trimLT(theForm.Spouse_First_Name.value, "both");
	var Spouse_CHN_Name=trimLT(theForm.Spouse_CHN_Name.value, "both");
			
	var Father_Last_Name=trimLT(theForm.Father_Last_Name.value, "both");
	var Father_First_Name=trimLT(theForm.Father_First_Name.value, "both");
	var Father_CHN_Name=trimLT(theForm.Father_CHN_Name.value, "both");
	
	var Mother_Last_Name=trimLT(theForm.Mother_Last_Name.value, "both");
	var Mother_First_Name=trimLT(theForm.Mother_First_Name.value, "both");
	var Mother_CHN_Name=trimLT(theForm.Mother_CHN_Name.value, "both");
	
	var Child1_Last_Name=trimLT(theForm.Child1_Last_Name.value, "both");
	var Child1_First_Name=trimLT(theForm.Child1_First_Name.value, "both");
	var Child1_CHN_Name=trimLT(theForm.Child1_CHN_Name.value, "both");
	
	var Child2_Last_Name=trimLT(theForm.Child2_Last_Name.value, "both");
	var Child2_First_Name=trimLT(theForm.Child2_First_Name.value, "both");
	var Child2_CHN_Name=trimLT(theForm.Child2_CHN_Name.value, "both");
	
	var Child3_Last_Name=trimLT(theForm.Child3_Last_Name.value, "both");
	var Child3_First_Name=trimLT(theForm.Child3_First_Name.value, "both");
	var Child3_CHN_Name=trimLT(theForm.Child3_CHN_Name.value, "both");
	
	var Child4_Last_Name=trimLT(theForm.Child4_Last_Name.value, "both");
	var Child4_First_Name=trimLT(theForm.Child4_First_Name.value, "both");
	var Child4_CHN_Name=trimLT(theForm.Child4_CHN_Name.value, "both");
	
	var Child5_Last_Name=trimLT(theForm.Child5_Last_Name.value, "both");
	var Child5_First_Name=trimLT(theForm.Child5_First_Name.value, "both");
	var Child5_CHN_Name=trimLT(theForm.Child5_CHN_Name.value, "both");
	
	var Child6_Last_Name=trimLT(theForm.Child6_Last_Name.value, "both");
	var Child6_First_Name=trimLT(theForm.Child6_First_Name.value, "both");
	var Child6_CHN_Name=trimLT(theForm.Child6_CHN_Name.value, "both");
	
	var Address=trimLT(theForm.Address.value, "both");
	var City=trimLT(theForm.City.value, "both");
	var Zip=trimLT(theForm.Zip.value, "both");
	var Tel=trimLT(theForm.Tel.value, "both");
	
	//var userName=trimLT(theForm.userName.value, "both");
	//var loginPassword=trimLT(theForm.loginPassword.value, "both");
	//var repeatPassword=trimLT(theForm.repeatPassword.value, "both");
	
	//var userIDLength=userName.length;
	//var passwordLength=loginPassword.length;
	
	if (IsEmpty(Principle_Last_Name)){
		alert ("Please enter Last Name.");
		//theForm.Principle_Last_Name.focus();
		theForm.Principle_Last_Name.select();
		return false;
	}
	else if (IsEmpty(Principle_First_Name)){
		alert ("Please enter First Name.");
		//theForm.Principle_First_Name.focus();
		theForm.Principle_First_Name.select();
		return false;
	}
	else if ((IsEmpty(Spouse_Last_Name) && !IsEmpty(Spouse_First_Name)) ||(!IsEmpty(Spouse_Last_Name) && IsEmpty(Spouse_First_Name))){
		alert ("Please enter Both Last Name and First Name.");
		//theForm.Spouse_Last_Name.focus();
		theForm.Spouse_Last_Name.select();
		return false;
	}
	else if ((IsEmpty(Father_Last_Name) && !IsEmpty(Father_First_Name)) ||(!IsEmpty(Father_Last_Name) && IsEmpty(Father_First_Name))){
		alert ("Please enter Both Last Name and First Name.");
		//theForm.Father_Last_Name.focus();
		theForm.Father_Last_Name.select();
		return false;
	}
	else if ((IsEmpty(Mother_Last_Name) && !IsEmpty(Mother_First_Name)) ||(!IsEmpty(Mother_Last_Name) && IsEmpty(Mother_First_Name))){
		alert ("Please enter Both Last Name and First Name.");
		//theForm.Mother_Last_Name.focus();
		theForm.Mother_Last_Name.select();
		return false;
	}
	else if ((IsEmpty(Child1_Last_Name) && !IsEmpty(Child1_First_Name)) ||(!IsEmpty(Child1_Last_Name) && IsEmpty(Child1_First_Name))){
		alert ("Please enter Both Last Name and First Name.");
		//theForm.Child1_Last_Name.focus();
		theForm.Child1_Last_Name.select();
		return false;
	}
	else if ((IsEmpty(Child2_Last_Name) && !IsEmpty(Child2_First_Name)) ||(!IsEmpty(Child2_Last_Name) && IsEmpty(Child2_First_Name))){
		alert ("Please enter Both Last Name and First Name.");
		//theForm.Child2_Last_Name.focus();
		theForm.Child2_Last_Name.select();
		return false;
	}
	else if ((IsEmpty(Child3_Last_Name) && !IsEmpty(Child3_First_Name)) ||(!IsEmpty(Child3_Last_Name) && IsEmpty(Child3_First_Name))){
		alert ("Please enter Both Last Name and First Name.");
		//theForm.Child3_Last_Name.focus();
		theForm.Child3_Last_Name.select();
		return false;
	}
	else if ((IsEmpty(Child4_Last_Name) && !IsEmpty(Child4_First_Name)) ||(!IsEmpty(Child4_Last_Name) && IsEmpty(Child4_First_Name))){
		alert ("Please enter Both Last Name and First Name.");
		//theForm.Child4_Last_Name.focus();
		theForm.Child4_Last_Name.select();
		return false;
	}
	else if ((IsEmpty(Child5_Last_Name) && !IsEmpty(Child5_First_Name)) ||(!IsEmpty(Child5_Last_Name) && IsEmpty(Child5_First_Name))){
		alert ("Please enter Both Last Name and First Name.");
		//theForm.Child5_Last_Name.focus();
		theForm.Child5_Last_Name.select();
		return false;
	}
	else if ((IsEmpty(Child6_Last_Name) && !IsEmpty(Child6_First_Name)) ||(!IsEmpty(Child6_Last_Name) && IsEmpty(Child6_First_Name))){
		alert ("Please enter Both Last Name and First Name.");
		//theForm.Child6_Last_Name.focus();
		theForm.Child6_Last_Name.select();
		return false;
	}
	else if (IsEmpty(Address)){
		alert ("Please enter the address.");
		//theForm.Address.focus();
		theForm.Address.select();
		return false;
	}
	else if (IsEmpty(City)){
		alert ("Please enter the city.");
		//theForm.City.focus();
		theForm.City.select();
		return false;
	}
	else if (IsEmpty(Zip)){
		alert ("Please enter the Zip Code.");
		//theForm.Zip.focus();
		theForm.Zip.select();
		return false;
	}
	else if (!IsTel(Tel)){
		alert ("Please enter a valid telephone number.");
		//theForm.Tel.focus();
		theForm.Tel.select();
		return false;
	}
	/*else if (IsEmpty(userName)) {
		alert ("Please enter your email address for your future access to your account.");
		theForm.userName.select();
		return false;
	}
	else if (passwordLength<6) {
		alert ("Password must be more than 5 characters.");
		theForm.loginPassword.select();
		return false;
	}
	else if (loginPassword!=repeatPassword) {
		alert ("Please re-enter your password. The re-entered password must be as same as first-entered password.");
		theForm.repeatPassword.select();
		return false;
	}*/
	return true;
}

function ValidationLogin()
{   var theForm=document.LFLForm;
	
	var userName=trimLT(theForm.userName.value, "both");
	var loginPassword=trimLT(theForm.loginPassword.value, "both");
	
	if (IsEmpty(userName)){
		alert ("Please enter your UserName.");
		theForm.userName.focus();
		theForm.userName.select();
		return false;
	}
	else if (IsEmpty(loginPassword)){
		alert ("Please enter your password");
		theForm.loginPassword.focus();
		theForm.loginPassword.select();
		return false;
	}
	
	return true;
}

function ValidationEmailAnyone()
{   var theForm=document.LFLForm;
	
	var toAddress=trimLT(theForm.To_Address.value, "both");
	var fromAddress=trimLT(theForm.From_Address.value, "both");
	
	if (!IsEmail(toAddress)){
		alert ("The recipient's email address is not in valid format.");
		theForm.To_Address.focus();
		theForm.To_Address.select();
		return false;
	}
	else if (!IsEmail(fromAddress)){
		alert ("The sender's email address is not in valid format.");
		theForm.From_Address.focus();
		theForm.From_Address.select();
		return false;
	}
	
	return true;
}

function ValidationChangeFirstLogin()
{   var theForm=document.LFLForm;
	
	var userName=trimLT(theForm.userName.value, "both");
	//var Old_Password=trimLT(theForm.Old_Password.value, "both");
	
	var loginPassword=trimLT(theForm.loginPassword.value, "both");
	var repeatPassword=trimLT(theForm.repeatPassword.value, "both");
	var loginPasswordLength=loginPassword.length;
	
	if (IsEmpty(userName)) {
		alert ("Please enter the username.");
		theForm.userName.select();
		return false;
	}
	else if (loginPasswordLength<6) {
		alert ("The new password must be at least 6 characters or digits.");
		theForm.loginPassword.select();
		return false;
	}
	else if (loginPassword!=repeatPassword) {
		//alert (loginPassword);
		//alert (repeatPassword);
		alert ("Please re-enter your password. The re-entered password must be as same as first-entered password.");
		theForm.repeatPassword.select();
		return false;
	}
	
	return true;
}

function ValidationChangeLogin()
{   var theForm=document.LFLForm;
	
	//var userName=trimLT(theForm.userName.value, "both");
	var Old_Password=trimLT(theForm.Old_Password.value, "both");
	var New_Password=trimLT(theForm.New_Password.value, "both");
	var Repeat_New_Password=trimLT(theForm.Repeat_New_Password.value, "both");
	
	var New_Password_Length=New_Password.length;
	
	if (IsEmpty(Old_Password)) {
		alert ("Please enter the old password.");
		theForm.Old_Password.select();
		return false;
	}
	else if (New_Password_Length<6) {
		alert ("The new password must be at least 6 characters or digits.");
		theForm.New_Password.select();
		return false;
	}
	else if (New_Password!=Repeat_New_Password) {
		alert ("Please re-enter your password. The re-entered password must be as same as first-entered password.");
		theForm.Repeat_New_Password.select();
		return false;
	}
	
	return true;
}

function ValidationFamilyCheckBox()
{	var theForm=document.LFLForm;
	var CheckLog=0
	checkDelete=theForm.checkDelete;
	
	if (typeof checkDelete.length == 'undefined') {
        // there is one item, so do this
        checkDelete = new Array(checkDelete);
    }
	//var PrayerDetail=trimLT(theForm.PrayerDetail.value, "both");
	for (i = 0; i < checkDelete.length; i++) {
		if (checkDelete[i].checked ==true) {
			CheckLog=1;
			break;
		}
	}
	if (CheckLog==0){
		alert ("Please check at least one checkbox.");
		return false;
	}
	
	return true;
}

function ValidationNoticeCheckBox()
{	var theForm=document.LFLForm;
	var CheckLog=0
	Checked_Family=theForm.Checked_Family;
	
	if (typeof Checked_Family.length == 'undefined') {
        // there is one item, so do this
        Checked_Family = new Array(Checked_Family);
    }
	//var PrayerDetail=trimLT(theForm.PrayerDetail.value, "both");
	for (i = 0; i < Checked_Family.length; i++) {
		if (Checked_Family[i].checked ==true) {
			CheckLog=1;
			break;
		}
	}
	if (CheckLog==0){
		alert ("Please check at least one checkbox.");
		return false;
	}
	
	return true;
}