function validate1()

{

	

	var fname=trim(document.form1.fname.value);

	if(is_empty(fname))

	{

		alert("<?=_PLS_YR_FRSTNM1_?>");

		document.form1.fname.focus();

		return false;

	}

	var lname=trim(document.form1.lname.value);

	if(is_empty(lname))

	{

		alert("<?=_PLS_YR_LSTNM1_?>");

		document.form1.lname.focus();

		return false;

	}

	var gender=trim(document.form1.gender.value);

	if(gender=='0')

	{

		alert("Please enter your gender!");

		document.form1.gender.focus();

		return false;

	}

	

	

	if(document.form1.day.value==0)

	{

		alert("Please select a day for date of birth!");

		document.form1.day.focus();

		return false;

	}

	if(document.form1.month.value==0)

	{

		alert("Please select a month for date of birth!");

		document.form1.month.focus();

		return false;

	}

		

	   if(document.form1.year.value==0)

	{

		alert("Please select a year for date of birth!");

		document.form1.year.focus();

		return false;

	}





	var uname=trim(document.form1.uname.value);

	if(is_empty(uname))

	{

		alert("Please enter your username!");

		document.form1.uname.focus();

		return false;

	}

	

	

	

	

		if(document.form1.password.value=='')

	{

	alert("Pasword field can't be blank.");

	return false;

	}

	

	if(document.form1.password.value != document.form1.cpassword.value)

	{

	alert("Password and confirm password fields are not matching.");

	return false;

	}

	

	var email=document.form1.email;

	if (trim(email.value) == 0) {

		alert("Please enter your email address!");

		email.focus();

		return false;

	} else if (email.value.indexOf("@") < 0) {

		alert("Incorrect email address. Please re-enter.");

		email.focus();

		return false;

	} else if (email.value.indexOf(".") < 0) {

		alert("Incorrect email address. Please re-enter.");

		email.focus();

		return false;

	} else if (trim(email.value).indexOf(" ") >= 0) {

		alert("Incorrect email address. Please re-enter.");

		email.focus();

		return false;

	}

	

	

		if(document.form1.email.value != document.form1.cemail.value)

	{

	alert("Email and confirm email fields are not matching.");

	return false;

	}

	var checkbox1=document.form1.checkbox1;

	if (!checkbox1.checked) {

		alert("Please read and select terms & conditions, You must agree to them first");

		checkbox1.focus();

		return false;

	}

	var checkbox2=document.form1.checkbox2;

	if (!checkbox2.checked) {

		alert("Please read and select <?=_TITLE1_?> Privacy Policy, You must agree to them first");

		checkbox2.focus();

		return false;

	}



	var security_code=trim(document.form1.security_code.value);

	if(is_empty(security_code))

	{

		alert("Please enter the Captcha verification code!");

		document.form1.security_code.focus();

		return false;

	}

	

	

}

