function validate()
	{
	if (document.inputForm.FirstName.value == "")
		{
		alert("Please enter your First Name.");
		document.inputForm.FirstName.focus();
		return false;
		}
	if (document.inputForm.LastName.value == "")
		{
		alert("Please enter your Last Name.");
		document.inputForm.LastName.focus();
		return false;
		}
	if (document.inputForm.BirthDate.value == "")
		{
		alert("Please enter your Birth Date.");
		document.inputForm.BirthDate.focus();
		return false;
		}
	if (!validateDates(document.inputForm.BirthDate.value)) 
		{
		alert("Please enter your Birth Date in the form of mm/dd/yyyy");
		document.inputForm.BirthDate.focus();
		document.inputForm.BirthDate.select();
		return false;
		}
	if (document.inputForm.SocialSecurity.value == "")
		{
		alert("Please enter your Social Security Number.");
		document.inputForm.SocialSecurity.focus();
		return false;
		}
	if (!validateSS(document.inputForm.SocialSecurity.value))
		{
		alert("Please enter a valid Social Security Number.");
		document.inputForm.SocialSecurity.focus();
		document.inputForm.SocialSecurity.select();
		return false;
		}
	if (document.inputForm.HomeAddress.value == "")
		{
		alert("Please enter your Home Address.");
		document.inputForm.HomeAddress.focus();
		return false;
		}
	if (document.inputForm.HomeCity.value == "")
		{
		alert("Please enter your Home City.");
		document.inputForm.HomeCity.focus();
		return false;
		}
	if (document.inputForm.HomeState.value == "")
		{
		alert("Please select your Home State.");
		document.inputForm.HomeState.focus();
		return false;
		}
	if (document.inputForm.HomeZIP.value == "")
		{
		alert("Please enter your Home ZIP Code.");
		document.inputForm.HomeZIP.focus();
		return false;
		}
	if (isNaN(document.inputForm.HomeZIP.value))
		{
		alert("Please enter a valid 5 digit Home ZIP Code.");
		document.inputForm.HomeZIP.focus();
		document.inputForm.HomeZIP.select();
		return false;
		}
	if (document.inputForm.CollegeAddress.value == "")
		{
		alert("Please enter your College Address.");
		document.inputForm.CollegeAddress.focus();
		return false;
		}
	if (document.inputForm.CollegeCity.value == "")
		{
		alert("Please enter your College City.");
		document.inputForm.CollegeCity.focus();
		return false;
		}
	if (document.inputForm.CollegeState.value == "")
		{
		alert("Please select your College State.");
		document.inputForm.CollegeState.focus();
		return false;
		}
	if (document.inputForm.CollegeZIP.value == "")
		{
		alert("Please enter your College ZIP Code.");
		document.inputForm.CollegeZIP.focus();
		document.inputForm.CollegeZIP.select();
		return false;
		}
	if (isNaN(document.inputForm.CollegeZIP.value))
		{
		alert("Please enter a valid 5 digit College ZIP Code.");
		document.inputForm.CollegeZIP.focus();
		return false;
		}
	if ((document.inputForm.HomeAreaCode.value == "") || (document.inputForm.HomePrefix.value == "") || (document.inputForm.HomeSuffix.value == ""))
		{
		alert("Please enter your home telephone number.");
		document.inputForm.HomeAreaCode.focus();
		return false;
		}
	if ((isNaN(document.inputForm.HomeAreaCode.value)) || (isNaN(document.inputForm.HomePrefix.value)) || (isNaN(document.inputForm.HomeSuffix.value)))
		{
		alert("Please enter a valid Home Telephone Number.");
		document.inputForm.HomeAreaCode.focus();
		doucment.inputForm.HomeAreaCode.select();
		return false;
		}
	var Count1 = document.inputForm.HomeAreaCode.value
	var Count2 = document.inputForm.HomePrefix.value
	var Count3 = document.inputForm.HomeSuffix.value
	if ((Count1.length != 3) || (Count2.length != 3) || (Count3.length != 4))
		{
		alert("Please enter a valid Home Telephone Number.");
		document.inputForm.HomeAreaCode.focus();
		doucment.inputForm.HomeAreaCode.select();
		return false;
		}
	if ((document.inputForm.CollegeAreaCode.value == "") || (document.inputForm.CollegePrefix.value == "") || (document.inputForm.CollegeSuffix.value == ""))
		{
		alert("Please enter your college telephone number.");
		document.inputForm.CollegeAreaCode.focus();
		return false;
		}
	if ((isNaN(document.inputForm.CollegeAreaCode.value)) || (isNaN(document.inputForm.CollegePrefix.value)) || (isNaN(document.inputForm.CollegeSuffix.value)))
		{
		alert("Please enter a valid College Telephone Number.");
		document.inputForm.CollegeAreaCode.focus();
		doucment.inputForm.CollegeAreaCode.select();
		return false;
		}
	var Count1 = document.inputForm.CollegeAreaCode.value
	var Count2 = document.inputForm.CollegePrefix.value
	var Count3 = document.inputForm.CollegeSuffix.value
	if ((Count1.length != 3) || (Count2.length != 3) || (Count3.length != 4))
		{
		alert("Please enter a valid College Telephone Number.");
		document.inputForm.CollegeAreaCode.focus();
		doucment.inputForm.CollegeAreaCode.select();
		return false;
		}
	if ((document.inputForm.PagerAreaCode.value != "") || (document.inputForm.PagerPrefix.value != "") || (document.inputForm.PagerSuffix.value != ""))
		{
		if ((isNaN(document.inputForm.PagerAreaCode.value)) || (isNaN(document.inputForm.PagerPrefix.value)) || (isNaN(document.inputForm.PagerSuffix.value)))
			{
			alert("Please enter a valid Pager Number.");
			document.inputForm.PagerAreaCode.focus();
			document.inputForm.PagerAreaCode.select();
			return false;
			}
		var Count1 = document.inputForm.PagerAreaCode.value
		var Count2 = document.inputForm.PagerPrefix.value
		var Count3 = document.inputForm.PagerSuffix.value
		if ((Count1.length != 3) || (Count2.length != 3) || (Count3.length != 4))
			{
			alert("Please enter a valid Pager Number.");
			document.inputForm.PagerAreaCode.focus();
			document.inputForm.PagerAreaCode.select();
			return false;
			}
		}
	if ((document.inputForm.CelAreaCode.value != "") || (document.inputForm.CelPrefix.value != "") || (document.inputForm.CelSuffix.value != ""))
		{
		if ((isNaN(document.inputForm.CelAreaCode.value)) || (isNaN(document.inputForm.CelPrefix.value)) || (isNaN(document.inputForm.CelSuffix.value)))
			{
			alert("Please enter a valid Cellular Number.");
			document.inputForm.CelAreaCode.focus();
			document.inputForm.CelAreaCode.select();
			return false;
			}
		var Count1 = document.inputForm.CelAreaCode.value
		var Count2 = document.inputForm.CelPrefix.value
		var Count3 = document.inputForm.CelSuffix.value
		if ((Count1.length != 3) || (Count2.length != 3) || (Count3.length != 4))
			{
			alert("Please enter a valid Cellular Number.");
			document.inputForm.CelAreaCode.focus();
			document.inputForm.CelAreaCode.select();
			return false;
			}
		}
	if (document.inputForm.Email.value == "")
		{
		alert("Please enter an email address.");
		document.inputForm.Email.focus();
		return false;
		}
	if (document.inputForm.Email.value == "" || document.inputForm.Email.value.indexOf ('@', 0) == -1)
		{
		alert ("Please enter a valid email address.")
		document.inputForm.Email.focus();
		document.inputForm.Email.select();
		return false;
		}
	if (document.inputForm.ParentName.value == "")
		{
		alert("Please enter the name of your Parent/Guardian.");
		document.inputForm.ParentName.focus();
		return false;
		}
	if (document.inputForm.Relationship.value == "")
		{
		alert("Please enter the Relationship of your Parent/Guardian.");
		document.inputForm.Relationship.focus();
		return false;
		}
	if ((document.inputForm.ParentAreaCode.value == "") || (document.inputForm.ParentPrefix.value == "") || (document.inputForm.ParentSuffix.value == ""))
		{
		alert("Please enter your Parent/Guardian Home Phone.");
		document.inputForm.ParentAreaCode.focus();
		return false;
		}
	if ((isNaN(document.inputForm.ParentAreaCode.value)) || (isNaN(document.inputForm.ParentPrefix.value)) || (isNaN(document.inputForm.ParentSuffix.value)))
		{
		alert("Please enter a valid Parent/Guardian Home Phone.");
		document.inputForm.ParentAreaCode.focus();
		doucment.inputForm.ParentAreaCode.select();
		return false;
		}
	var Count1 = document.inputForm.ParentAreaCode.value
	var Count2 = document.inputForm.ParentPrefix.value
	var Count3 = document.inputForm.ParentSuffix.value
	if ((Count1.length != 3) || (Count2.length != 3) || (Count3.length != 4))
		{
		alert("Please enter a valid Parent/Guardian Home Phone.");
		document.inputForm.ParentAreaCode.focus();
		doucment.inputForm.ParentAreaCode.select();
		return false;
		}
	if ((document.inputForm.WorkAreaCode.value == "") || (document.inputForm.WorkPrefix.value == "") || (document.inputForm.WorkSuffix.value == ""))
		{
		alert("Please enter your Parent/Guardian Work Phone.");
		document.inputForm.WorkAreaCode.focus();
		return false;
		}
	if ((isNaN(document.inputForm.WorkAreaCode.value)) || (isNaN(document.inputForm.WorkPrefix.value)) || (isNaN(document.inputForm.WorkSuffix.value)))
		{
		alert("Please enter a valid Parent/Guardian Work Phone.");
		document.inputForm.WorkAreaCode.focus();
		doucment.inputForm.WorkAreaCode.select();
		return false;
		}
	var Count1 = document.inputForm.WorkAreaCode.value
	var Count2 = document.inputForm.WorkPrefix.value
	var Count3 = document.inputForm.WorkSuffix.value
	if ((Count1.length != 3) || (Count2.length != 3) || (Count3.length != 4))
		{
		alert("Please enter a valid Parent/Guardian Work Phone.");
		document.inputForm.WorkAreaCode.focus();
		doucment.inputForm.WorkAreaCode.select();
		return false;
		}
	if (document.inputForm.HighSchool.value == "")
		{
		alert("What High School did you attend?");
		document.inputForm.HighSchool.focus();
		return false;
		}
	if (document.inputForm.YearGraduation.value == "")
		{
		alert("What year did you graduate High School?");
		document.inputForm.YearGraduation.focus();
		return false;
		}
	if (isNaN(document.inputForm.YearGraduation.value))
		{
		alert("Please enter a valid year for when you graduated High School.");
		document.inputForm.YearGraduation.focus();
		document.inputForm.YearGraduation.select();
		return false;
		}
	var Count1 = document.inputForm.YearGraduation.value
	if (Count1.length != 4)
		{
		alert("Please enter a valid year for when you graduated High School.");
		document.inputForm.YearGraduation.focus();
		document.inputForm.YearGraduation.select();
		return false;
		}
	if (document.inputForm.College.value == "")
		{
		alert("Please enter the College attended/graduated from.");
		document.inputForm.College.focus();
		return false;
		}
	if (document.inputForm.GPA.value == "")
		{
		alert("Please enter your GPA.");
		document.inputForm.GPA.focus();
		return false;
		}
	if (isNaN(document.inputForm.GPA.value))
		{
		alert("Please enter a valid GPA.");
		document.inputForm.GPA.focus();
		document.inputForm.GPA.select();
		return false;
		}
	return true;
	}

function submitForm()
	{
	if (validate( document.inputForm ) != false)
		{
		document.inputForm.submit();
		}
	}

function validateDates(passDate)
	{
	montharr = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
	var splitDates = passDate.split("/");
	
	if (splitDates.length < 3)
		{
		return false;
		}
		
	if (splitDates[2].length != 4)
		{
		return false;
		}
	var tempyear = new Number(splitDates[2]);
	if (isNaN(tempyear))
		{
		return false;
		}
	if (leapYear(tempyear))
		{
		montharr[1] = 29;
		}
	var tempmonth = new Number(splitDates[0]);
	if (isNaN(tempmonth))
		{
		return false;
		}
	if ((tempmonth < 1) || (tempmonth > 12))
		{
		return false;
		}
	var tempday = new Number(splitDates[1]);
	if (isNaN(tempday))
		{
		return false;
		}
	if ((tempday < 1) || (tempday > montharr[tempmonth - 1]))
		{
		return false;
		}
	return true;
	}

function leapYear(yr)
	{
	if (((yr % 4 == 0) && yr % 100 != 0) || yr % 400 == 0)
	return true;
	else
	return false;
	}
	
function validateSS(passSS)
	{
	var splitSS = passSS.split("-");
	if (splitSS.length < 3 )
		{
		return false;
		}
	if (isNaN(Number(splitSS[0])))
		{
		return false;
		}
	if (isNaN(Number(splitSS[1])))
		{
		return false;
		}
	if (isNaN(Number(splitSS[2])))
		{
		return false;
		}
	if (splitSS[0].length != 3)
		{
		return false;
		}
	if (splitSS[1].length != 2)
		{
		return false;
		}
	if (splitSS[2].length != 4)
		{
		return false;
		}
	return true;
	}
