

function add(frmName ,rbClub, rbSports, rbApclass, rbSportType)
{
	
 
  if(document.frmInformation.First_Name.value==""){
		document.frmInformation.Name.value="";
		alert("Please Enter First Name !");
		document.frmInformation.First_Name.focus();
		return false;
	}
		if(document.frmInformation.Last_Name.value==""){
		document.frmInformation.Name.value="";
		alert("Please Enter Last Name !");
		document.frmInformation.Last_Name.focus();
		return false;
	}
	if(document.frmInformation.School.value==""){
		document.frmInformation.School.value="";
		alert("Please Enter School !");
		document.frmInformation.School.focus();
		return false;
	}
	if(document.frmInformation.Grade.value==""){
		document.frmInformation.Grade.value="";
		alert("Please Enter Grade !");
		document.frmInformation.Grade.focus();
		return false;
	}
	

	if(document.frmInformation.HomePhone.value==""){
	document.frmInformation.HomePhone.value="";
		alert("Please Enter Phone Number !");
		document.frmInformation.HomePhone.focus();
		return false;
	}
	if(!validPhone (frmName, "HomePhone" , "PleaseEnter valid Phone number."))
		{return false;}
	
		
	if(document.frmInformation.email.value==""){
	document.frmInformation.email.value="";
		alert("Please Entere Email !");
		document.frmInformation.email.focus();
		return false;
	}
	
	if(document.frmInformation.email.value){
	
		if(!isEmail(document.frmInformation.email.value)){
			alert("Please Enter Valid Email !");
			document.frmInformation.email.focus();
			return false;
		}
		
	}	
	
	var radios = document[frmName].elements[rbClub]; 
	if (radios[0].checked)
	{
		if(document[frmName].List_all_clubs_and_officer_positions_ACTIVITY.value=="")
		{
			alert("Please Enter Activity !");	
			document.frmInformation.List_all_clubs_and_officer_positions_ACTIVITY.focus();
			return false;
		}
		else if(document[frmName].List_all_clubs_and_officer_positions_POSITIONS.value=="")
		{
			alert("Please Enter Position !");	
			document.frmInformation.List_all_clubs_and_officer_positions_POSITIONS.focus();
			return false;
		}
		else if(document[frmName].List_all_clubs_and_officer_positions_YEARS.value=="")
		{
			alert("Please Enter Years !");	
			document.frmInformation.List_all_clubs_and_officer_positions_YEARS.focus();
			return false;
		}
	}
  	
	var radios1 = document[frmName].elements[rbSports]; 
	var radiosType = document[frmName].elements[rbSportType];
	var flag=0;
	var radioLength = radiosType.length;
	if (radios1[0].checked)
	{ 
	 
	 for(var i = 0; i < radioLength; i++)
	  {	
			if(radiosType[i].checked) 
			{
				flag=1;		
			}
		}
		if(flag==0)
		{
		alert("Please select sports team.");
		return false;
		}
	}
    
  var radios2 = document[frmName].elements[rbApclass]; 
	if (radios2[0].checked)
	{
		if(document[frmName].Number_of_AP_IB_classes.value=="")
		{
			alert("Please Enter No of Classes !");	
			document.frmInformation.Number_of_AP_IB_classes.focus();
			return false;
		}
	}
 	
	if(document[frmName].Ans_1.value=="")
	{
		alert("Please Answer Question 1 !");	
		document.frmInformation.Ans_1.focus();
		return false;
	}
	else if(document[frmName].Ans_2.value=="")
	{
		alert("Please Answer Question 2 !");	
		document.frmInformation.Ans_2.focus();
		return false;
	}
	else if(document[frmName].Ans_3.value=="")
	{
		alert("Please Answer Question 3 !");	
		document.frmInformation.Ans_3.focus();
		return false;
	}
	else if(document[frmName].Ans_4.value=="")
	{
		alert("Please Answer Question 4 !");	
		document.frmInformation.Ans_4.focus();
		return false;
	}
		
	if(!document.frmInformation.Commitment.checked)
	{
		alert("Please Check The Agreement Chek Box !");
		return false;
	}
	
	
	
	return true;

}