
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("ddTitle", "B", "Please select your Title."))
		return false;
		
	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("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("txtDate", "B", "Please select your Date of Birth."))
		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("txtState", "B", "Please enter your State/Province."))
		return false;*/
		
	/*if (!objFV.validate("txtZipCode", "B", "Please enter your Zip Code/Post Code."))
		return false;		*/
		
	if (!objFV.validate("ddCountry", "B", "Please select your Country."))
		return false;
		
	if (!objFV.validate("txtPhone", "B", "Please enter your Phone Number."))
		return false;				
	
	if (document.frmRegister.terms_conditions.checked == false)
		{
		alert("You must follow the TERMS AND CONDITIONS and REFUND AND RETURN POLICY  ");	
		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;
}