function registerCheck()
{	
	var strFirstname = "Please enter your first name"
	var strLastName= "Please enter your last name"
	var strMailAdd= "Please enter your mailing address"
	var strCity= "Please enter your city"
	var strZip= "Please enter your zip"
	var strphone_area_code= "Please enter your area code"
	var strphone_exchange= "Please enter your phone number exchange"
	var strphone_number= "Please enter your phone number"
	var strEmail= "Please enter your email address"
	var strState= "Please enter your state"
	var strhigh_school= "Please enter your high school"
	var strhigh_school_city= "Please enter your high school city"
	var strhigh_school_state= "Please enter your high school state"
	
	var validEmail
	
	var check_flag = true;
	
	var check_default_flag=true;
	
	//check for GAJ PDF reg
	if (document.reg.page_reg_type.value=="gajpdf")
	{
		check_default_flag=false;
	}
	
	 	
 	if ( document.reg.fName.value == "" && check_flag )	{
 		alert(strFirstname)
 		document.reg.fName.focus();
 		check_flag = false;
 	}
 	
 	if ( document.reg.lName.value == "" && check_flag)	{
 		alert(strLastName)
 		document.reg.lName.focus();
 		check_flag = false;
 	}
 	
 	//address, city,state,zip,student email address, parent email address need not to check for pdfregistration 
 	if (check_default_flag)
 	{
 	
		if ( document.reg.address.value == "" && check_flag )	{
 			alert(strMailAdd)
 			document.reg.address.focus();
 			check_flag = false;
 		}
	
		if ( document.reg.city.value == "" && check_flag )	{
 			alert(strCity)
 			document.reg.city.focus();
 			check_flag = false;
 		}
 		if ( document.reg.state.value == "" && check_flag )	{
 			alert(strState)
 			document.reg.state.focus();
 			check_flag = false;
 		}
		if ( document.reg.ZIP.value == "" && check_flag )	{
 			alert(strZip)
 			document.reg.ZIP.focus();
 			check_flag = false;
 		}
 	
 		if ( isNaN(document.reg.ZIP.value))	{
 			alert("Please Enter Digits for Zip Code")
 			document.reg.ZIP.focus();
 			check_flag = false;
 		}
 	}	
 		if ( document.reg.student_email.value == "" && check_flag )	
 		{
 			alert(strEmail)
 			document.reg.student_email.focus();
 			check_flag = false;
 		}
 	
 		validEmail = validate_Email(document.reg.student_email.value);
 		if (!(validEmail[0]) && check_flag){ 
			alert(validEmail[1]);
			document.reg.student_email.focus();
			check_flag = false;
			}
		
		if ( document.reg.student_email.value != document.reg.confirm_student_email.value  && check_flag)
 		{
 			if (check_default_flag)
 			{
 				alert("Your Student email does not match your confirm Student email!");
 				
 			}
 			else
 			{
 				alert("Your email does not match your confirm email!");
 			
 			}
 			document.reg.confirm_student_email.focus();
 			check_flag = false;
 		}	
		
		if (check_default_flag)
		{
			if (document.reg.parent_email.value != ""){
				validEmail=validate_Email(document.reg.parent_email.value);
				if (!(validEmail[0]) && check_flag){
					alert(validEmail[1]);
					document.reg.parent_email.focus();
					check_flag=false;	
				}
			}
				
			if ( document.reg.parent_email.value != ""  && check_flag) 
			{
				if ( document.reg.parent_email.value != document.reg.confirm_parent_email.value  && check_flag)
 				{
 					alert("Your Parent/Guardian email does not match your confirm Parent/Guardian email!")
 					document.reg.confirm_parent_email.focus();
 					check_flag = false;
 				}
			}
		}
		
		if ( document.reg.phone_area_code.value == "" && check_flag && check_default_flag )	{
 				alert(strphone_area_code)
 				document.reg.phone_area_code.focus();
 				check_flag = false;
 			}
 	
			if ( isNaN(document.reg.phone_area_code.value))	{
 				alert("Please Enter Digits for Area Code")
 				document.reg.phone_area_code.focus();
 				check_flag = false;
			}
 	
			if ( document.reg.phone_exchange.value == "" && check_flag && check_default_flag )	{
 				alert(strphone_exchange)
 				document.reg.phone_exchange.focus();
 				check_flag = false;
 			}
 	
 			if ( isNaN(document.reg.phone_exchange.value))	{
 				alert("Please Enter Digits for Phone Exchange")
 				document.reg.phone_exchange.focus();
 				check_flag = false;
 			}
 	
			if ( document.reg.phone_number.value == "" && check_flag && check_default_flag)	{
 				alert(strphone_number)
 				document.reg.phone_number.focus();
 				check_flag = false;
 			}
 	
			if ( isNaN(document.reg.phone_number.value))	{
 				alert("Please Enter Digits for Phone")
 				document.reg.phone_number.focus();
 				check_flag = false;
 			}
 	
		
		if (check_flag)
		{
			document.reg.action="process_reg.asp"
			document.reg.submit();				
		}	

}

