
function validateLoginForm( )
{
	var objFV = new FormValidator("frmLogin");

	if (!objFV.validate("txtEmail", "B,E", "Please enter your valid Email Address."))
		return false;
		
	if (!objFV.validate("txtPassword", "B,L(4)", "Please enter the valid Password."))
		return false;		

	return true;
}

function validateEnquiryForm( )
{
	var objFV = new FormValidator("frmContact");

	if (!objFV.validate("txtName", "B", "Please enter your Name."))
		return false;		
		
	if (!objFV.validate("txtEmail", "B,E", "Please enter your valid Email Address."))
		return false;
		
	if (!objFV.validate("txtSubject", "B", "Please enter the Message Subject."))
		return false;		
		
	if (!objFV.validate("txtMessage", "B", "Please enter your Comments/Message."))
		return false;
		
	if (!objFV.validate("txtCode", "B,L(5)", "Please enter the valid Code as shown."))
		return false;

	return true;
}

function validateForm( )
{
	var objFV = new FormValidator("frmMyAccount");
	
	if (!objFV.validate("txtFirstName", "B", "Please enter your First Name."))
		return false;		
		
	if (!objFV.validate("txtLastName", "B", "Please enter your Last Name."))
		return false;		
		
	if (!objFV.validate("txtAddress1", "B", "Please enter the Address."))
		return false;
	
	if (!objFV.validate("txtCity", "B", "Please enter your City."))
		return false;
		
	if (!objFV.validate("txtZipCode", "B", "Please enter your Zip Code/Post Code."))
		return false;		
		
	if (!objFV.validate("txtPhone", "B", "Please enter your Phone Number."))
		return false;				
	
	if (!objFV.validate("txtEmail", "B,E", "Please enter your valid Email Address."))
		return false;
		
	if (objFV.value("txtPassword") != "" || objFV.value("txtConfirmPassword") != "")
	{
		if (!objFV.validate("txtPassword", "B,L(4)", "Please enter the valid Password (Min Length = 4)."))
			return false;

		if (!objFV.validate("txtConfirmPassword", "B,L(4)", "Please enter the valid Confirm Password (Min Length = 4)."))
			return false;		

		if (objFV.value("txtPassword") != objFV.value("txtConfirmPassword"))
		{
			alert("The Password does not MATCH with the Confirm Password.");

			objFV.focus("txtConfirmPassword");
			objFV.select("txtConfirmPassword");

			return false;
		}
	}

	return true;
}
