function reg1_validation()

{

	

	user=document.reg1.user

	email=document.reg1.email

	confirm_email=document.reg1.confirm_email

	password=document.reg1.password

	passwordLength=document.reg1.password.value.length

	confirm_password=document.reg1.confirm_password

	question=document.reg1.question

	answer=document.reg1.answer

	mother_tongue=document.reg1.mother_tongue

	mother_tongue_other=document.reg1.mother_tongue_other

	religion=document.reg1.religion

	religion_other=document.reg1.religion_other

	name1=document.reg1.name

	height=document.reg1.height

	about_myself=document.reg1.about_myself

	about_myself_length=document.reg1.about_myself.value.length

	b_day=document.reg1.b_day

	b_month=document.reg1.b_month

	b_year=document.reg1.b_year

	

	if(user.value=="")

	{

		alert('Please enter your user ID.');

		user.focus();

		return false

	}

	else if(email.value=="")

	{

		alert('Please enter your Email.');

		email.focus();

		return false

	}

	else if(confirm_email.value=="")

	{

		alert('Please again enter your email.');

		confirm_email.focus();

		return false

	}

	else if(confirm_email.value!=email.value)

	{

		alert('Confirm email did not math.');

		confirm_email.value="";

		confirm_email.focus();

		return false

	}

	else if(password.value=="")

	{

		alert('Please enter password.');

		password.focus();

		return false

	}

	else if(passwordLength<4)

	{

		alert('Minimum password length 4 characters.');

		password.focus();

		return false

	}

	

	else if(confirm_password.value=="")

	{

		alert('Please again enter password.');

		confirm_password.focus();

		return false

	}

	else if(confirm_password.value!=password.value)

	{

		alert('Confirm password did not math.');

		confirm_password.value="";

		confirm_password.focus();

		return false

	}

	else if(question.value=="")

	{

		alert('Please select a security Question.');

		question.focus();

		return false

	}

	else if(answer.value=="")

	{

		alert('Please type answer of the above security Question.');

		answer.focus();

		return false

	}

	else if(b_day.value=="")

	{

		alert('Please select Day of Birth.');

		b_day.focus();

		return false

	}

	else if(b_month.value=="")

	{

		alert('Please select Month of Birth.');

		b_month.focus();

		return false

	}

	else if(b_year.value=="")

	{

		alert('Please select Year of Birth.');

		b_year.focus();

		return false

	}

	else if(mother_tongue.value=="")

	{

		alert('Please select your mother tongue.');

		mother_tongue.focus();

		return false

	}

	else if(mother_tongue.value=="Other")

	{

		if(mother_tongue_other.value=="")

		{

			alert('Please enter your mother tongue.');

			mother_tongue_other.focus();

			return false

		}

	}

	else if(religion.value=="")

	{

		alert('Please select your religion.');

		religion.focus();

		return false

	}

	else if(religion.value=="Other")

	{

		if(religion_other.value=="")

		{

			alert('Please enter your religion.');

			religion_other.focus();

			return false

		}

	}

	else if(name1.value=="")

	{

		alert('Please enter your name.');

		name1.focus();

		return false

	}

	else if(height.value=="")

	{

		alert('Please select your height.');

		height.focus();

		return false

	}

	else if(about_myself.value=="")

	{

		alert('Please describe about yoursels.');

		about_myself.focus();

		return false

	}

	else if(about_myself_length<100)

	{

		alert('Minimum required length 100 characters.');

		about_myself.focus();

		return false

	}

	if (email.value.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1)

	{

		alert('Email is not correct');

		email.focus();

		return false;

	}

}