function validateform(x)
{
	var num=/^[0-9]+$/;
	if(x.fname.value=="")
	{
		alert("First Name cann't be blank");
		x.fname.focus();
		return false;
	}
	if(x.lname.value=="")
	{
		alert("Last Name cann't be blank");
		x.lname.focus();
		return false;
	}
	if(x.username.value=="")
	{
		alert("User Name cann't be blank");
		x.username.focus();
		return false;
	}
	if(x.email.value=="")
	{
		alert("E-Mail Address cann't be blank");
		x.email.focus();
		return false;
	}
	if(x.password.value=="")
	{
		alert("Password cann't be blank");
		x.password.focus();
		return false;
	}
	if(x.cpassword.value=="")
	{
		alert("Confirm Password cann't be blank");
		x.cpassword.focus();
		return false;
	}
	if(x.password.value!=x.cpassword.value)
	{
		alert("Confirm Password is not match");
		x.cpassword.focus();
		return false;
	}	
	if(x.qualification.value=="")
	{
		alert("Qualification cann't be blank");
		x.qualification.focus();
		return false;
	}
	if(x.school.value=="")
	{
		alert("School Name cann't be blank");
		x.school.focus();
		return false;
	}
	if(x.mobile.value=="")
	{
		alert("Mobile number cann't be blank");
		x.mobile.focus();
		return false;
	}
	if(!x.mobile.value.match(num))
	{
		alert("Please enter only numbers between 0-9");
		x.mobile.focus();
		return false;
	}
	if(x.address.value=="")
	{
		alert("Address cann't be blank");
		x.address.focus();
		return false;
	}
} 
