function validate_graduate_form(frm) {
    
    checkString(frm.Title,"Title");
    checkString(frm.Firstname,"Firstname");
    checkString(frm.Surname,"Surname");
    checkEmail(frm.Email,"Email",1);
    checkString(frm.Mobile_Number,"Mobile No");

	


var myOption = -1;
	for (i=frm.Position_Applied_For.length-1; i > -1; i--) {
		if (frm.Position_Applied_For[i].checked) {
			myOption = i; 
			i = -1;
		}
	}

if (myOption == -1 && frm.Position_Applied_For_Engineering_Other.value.length<2 && frm.Position_Applied_For_Other.value.length<2) {
	addError("Position Applied For is required", frm.Position_Applied_For[0], null, frm.Position_Applied_For == null);
}


    checkString(frm.Examination_Completed,"Second Level: Examination Completed");
    checkString(frm.Second_Level_Year_Completed,"Second Level: Year Completed");
    checkString(frm.School_Name,"Second Level: School Name");
    checkString(frm.School_Address,"Second Level: School Address");
    checkString(frm.second_level_subject1,"Second Level: Subject 1");
    checkString(frm.second_level_level1,"Second Level: Level 1");
    checkString(frm.second_level_grade1,"Second Level: Grade 1");
    checkString(frm.second_level_subject2,"Second Level: Subject 2");
    checkString(frm.second_level_level2,"Second Level: Level 2");
    checkString(frm.second_level_grade2,"Second Level: Grade 2");
    checkString(frm.second_level_subject3,"Second Level: Subject 3");
    checkString(frm.second_level_level3,"Second Level: Level 3");
    checkString(frm.second_level_grade3,"Second Level: Grade 3");




checkString(frm.Degree_Being_Studied_or_Completed,"Third Level: Degree Name");
checkString(frm.Degree_University_Institute,"Third Level: Degree University/Institute");
checkString(frm.third_level_subject1_year1,"Third Level: Subject 1, Year 1");
checkString(frm.third_level_mark1_year1,"Third Level: Mark 1, Year 1");
checkString(frm.third_level_subject2_year1,"Third Level: Subject 2, Year 1");
checkString(frm.third_level_mark2_year1,"Third Level: Mark 2, Year 1");
checkString(frm.third_level_subject3_year1,"Third Level: Subject 3, Year 1");
checkString(frm.third_level_mark3_year1,"Third Level: Mark 3, Year 1");
checkString(frm.third_level_year1_completed,"Third Level: Year 1 Completed");
checkString(frm.third_level_year1_overall_grade,"Third Level: Year 1 overall grade");

checkString(frm.third_level_subject1_year2,"Third Level: Subject 1, Year 2");
checkString(frm.third_level_mark1_year2,"Third Level: Mark 1, Year 2");
checkString(frm.third_level_subject2_year2,"Third Level: Subject 2, Year 2");
checkString(frm.third_level_mark2_year2,"Third Level: Mark 2, Year 2");
checkString(frm.third_level_subject3_year2,"Third Level: Subject 3, Year 2");
checkString(frm.third_level_mark3_year2,"Third Level: Mark 3, Year 2");
checkString(frm.third_level_year2_completed,"Third Level: Year 2 Completed");
checkString(frm.third_level_year2_overall_grade,"Third Level: Year 2 overall grade");

checkString(frm.third_level_subject1_year3,"Third Level: Subject 1, Year 3");
checkString(frm.third_level_mark1_year3,"Third Level: Mark 1, Year 3");
checkString(frm.third_level_subject2_year3,"Third Level: Subject 2, Year 3");
checkString(frm.third_level_mark2_year3,"Third Level: Mark 2, Year 3");
checkString(frm.third_level_subject3_year3,"Third Level: Subject 3, Year 3");
checkString(frm.third_level_mark3_year3,"Third Level: Mark 3, Year 3");   
checkString(frm.third_level_year3_completed,"Third Level: Year 3 Completed");
checkString(frm.third_level_year3_overall_grade,"Third Level: Year 3 overall grade");






    //checkRadiobox(frm.Overall_Course_Grade_Status,"Third Level: Overall Course Grade Status");

 myOption = -1;
	for (i=frm.Overall_Course_Grade_Status.length-1; i > -1; i--) {
		if (frm.Overall_Course_Grade_Status[i].checked) {
			myOption = i; 
			i = -1;
		}
	}
if (myOption == -1) {
	addError("Third Level: Overall Course Grade Status is required", frm.Overall_Course_Grade_Status[0], null, frm.Overall_Course_Grade_Status == null);
}

checkString(frm.Overall_Course_Grade,"Third Level: Overall Course Grade");
checkString(frm.Long_term_Career_Aims_re_Bord_Gais,"Self Appraisal: Career Aims");
checkString(frm.Personal_Strengths,"Self Appraisal: Personal Strengths");
checkString(frm.Additional_Activities,"Self Appraisal: Additional Activities");
//checkRadiobox(frm.Legally_work_in_Ireland,"Self Appraisal: Legally work/live in Ireland");
var myOption = -1;
	for (i=frm.Legally_work_in_Ireland.length-1; i > -1; i--) {
		if (frm.Legally_work_in_Ireland[i].checked) {
			myOption = i; 
			i = -1;
		}
	}
if (myOption == -1) {
	addError("Self Appraisal: Legally work/live in Ireland", frm.Legally_work_in_Ireland[0], null, frm.Legally_work_in_Ireland == null);
}

//checkRadiobox(frm.Connection_with_Bord_Gais,"Self Appraisal: Connections with Bord Gais");
var myOption = -1;
	for (i=frm.Connection_with_Bord_Gais.length-1; i > -1; i--) {
		if (frm.Connection_with_Bord_Gais[i].checked) {
			myOption = i; 
			i = -1;
		}
	}
if (myOption == -1) {
	addError("Self Appraisal: Connections with Bord Gais", frm.Connection_with_Bord_Gais[0], null, frm.Connection_with_Bord_Gais == null);
}


	//checkString(frm.Career_Path_First,"First Choice for Career Path");
	//checkString(frm.Career_Path_Second,"Second Choice for Career Path");
	//checkString(frm.Degree_Title,"Title of Degree");
	//checkString(frm.Degree_College,"Name of College");
	//checkString(frm.Dates_From,"Dates From");
	//checkString(frm.Dates_To,"Dates To");

//	checkString(frm.Graduate_Year,"Graduate Year");
//if (!frm.declare_info_correct.checked) {
//        	addError("Agreement that the information submitted in this application form is correctly //stated", frm.declare_info_correct[0], null, frm.declare_info_correct == null);		
//   	}



if (precheckError()) { // this means there are no errors

	input_box=confirm("Click OK, if you want to continue with submitting your application\n\nClick Cancel if you would like to review your application before proceeding,\nor if you would like to cancel the submit.");
	if (input_box==true)	{ 
	// Output when OK is clicked
	return true;
	} else 	{
	// Output when Cancel is clicked
	return false;
	}

} else {
	return checkError();
}


}
   