

function validateForm( )

{

	var objFV = new FormValidator("frmRegister");

	

		var mon1  = objFV.value("mon"); 

		var dt1   = objFV.value("day");

		var yr1   = objFV.value("year"); 

		

		var date1 = yr1+"/"+mon1+"/"+dt1; 

		

		var d = new Date()

		date2=(d.getFullYear())+"/"+(d.getMonth() + 1)+"/"+(d.getDate());



	

		



		

	if (!objFV.validate("txtFullName", "B", "Please enter your Full Name."))

		return false;	

		

			

	if (!objFV.validate("day", "B", "Please enter Day of birth."))

		return false;

			

	if (!objFV.validate("mon", "B", "Please enter Month of birth."))

		return false;

		

	if (!objFV.validate("year", "B", "Please enter Year of birth."))

		return false;

	if (date1 > date2)

	{

		alert("Birth Date should be less than Current Date");

		objFV.focus("day");

		//objFV.select("day");

		return false;

	}	

		

	if (!objFV.validate("txtAddress", "B", "Please enter the Address."))

		return false;

		

	

		

	if (!objFV.validate("txtCountry", "B", "Please select your Country."))

		return false;

		

	if (!objFV.validate("txtPhone", "B", "Please enter your Phone Number."))

		return false;				
	if(document.frmRegister.txtPhone.value == "+44-208-1441476")
	{
		alert("Please enter your Phone Number.");
		return false;
	}
	
	if(document.frmRegister.txtMobile.value == "+1-949-7692326")
	{
		alert("Please enter your Phone Number.");
		return false;
	}
	

	if (!objFV.validate("txtEmail", "B,E", "Please enter your Email Address."))

		return false;

		

	if (!objFV.validate("txtPassword", "B,L(4)", "Please enter a valid Password (Min Length = 4)."))

		return false;

		

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

		return false;		



	if (objFV.value("txtPassword") != objFV.value("txtConfirmPassword"))

	{

		alert("The Password does not MATCH with Confirm Password.");



		objFV.focus("txtConfirmPassword");

		objFV.select("txtConfirmPassword");



		return false;

	}

	

	

	/*if (!objFV.validate("txtCode", "B,L(5)", "Please enter the Spam Protection Code shown in the image."))

		return false;*/

		

	document.frmRegister.submit();

	return true;

}
