function test(){
//document.form1.textfield.value = " ";
form1.txtname.value = "";
form1.txtgender.value="0";
form1.txtage.value="";
form1.txttel.value="";
form1.txtmobile.value="";
form1.txtaddress.value="";
form1.txtemail.value="";
form1.txtjob1.value="";
form1.txtjob2.value="";
form1.txtjob3.value="";
form1.txtjob4.value="";
form1.txtskills.value="";
form1.txtexperience.value="";
form1.txtsalary.value="";

}

function clearForms()
{
  var i;
  for (i = 0; (i < document.forms.length); i++) {
    document.forms[i].reset();
  }
}

re = /^[a-z ]+$/i
ra = /^[+, (, ), 0-9 .]+$/

function validForm(login)
{	
if (login.txtname.value=="")
	{	alert("NAME field cannot be empty")
		login.txtname.focus()
		return false
	}
	else if (!(re.test(login.txtname.value)))
	{	alert("NAME can only be a text")
		login.txtname.value="";
		login.txtname.focus()
		return false
	}
	else if (login.txtgender.value=="0")
	{	alert("GENDER field cannot be empty")
		login.txtgender.focus()
		return false
	}
	else if (login.txtage.value=="")
	{	alert("AGE field cannot be empty")
		login.txtage.focus()
		return false
	}
	else if (!(ra.test(login.txtage.value)))
	{	alert("AGE can only be interger or numbers")
		login.txtage.value="";
		login.txtage.focus()
		return false
	}
	else if (login.txttel.value=="")
	{	alert("TELEPHONE NUMBER field cannot be empty")
		login.txttel.focus()
		return false
	}
	else if (!(ra.test(login.txttel.value)))
	{	alert("TELEPHONE NUMBER can only be interger or numbers")
		login.txttel.value="";
		login.txttel.focus()
		return false
	}
	else if (login.txtmobile.value=="")
	{	alert("MOBILE field cannot be empty")
		login.txtmobile.focus()
		return false
	}
	else if (!(ra.test(login.txtmobile.value)))
	{	alert("MOBILE NUMBER can only be interger or numbers")
		login.txtmobile.value="";
		login.txtmobile.focus()
		return false
	}
	else if (login.txtaddress.value=="")
	{	alert("ADDRESS field cannot be empty")
		login.txtaddress.focus()
		return false
	}
	else if (login.txtemail.value=="")
	{	alert("EMAIL ADDRESS field cannot be empty")
		login.txtemail.focus()
		return false
	}
	else if (login.txtjob1.value=="")
	{	alert("JOB POSITIONS DESIRED fields cannot be empty")
		login.txtjob1.focus()
		return false
	}
	else if (login.skills.value=="")
	{	alert("BASIC SKILLS field cannot be empty")
		login.txtskills.focus()
		return false
	}
	else if (login.txtexperience.value=="")
	{	alert("YEARS OF EXPERIENCE field cannot be empty")
		login.txtexperience.focus()
		return false
	}
	else if (login.txtsalary.value=="")
	{	alert("EXPECTED SALARY field cannot be empty")
		login.txtsalary.focus()
		return false
	}
else
return true
}