function formCheck(){

	var errors = 0;

	errors += textCheck('given_name');
	errors += textCheck('family_name');
	errors += textCheck('employer');
	errors += textCheck('postal_address');
	errors += textCheck('phone');
	errors += textCheck('fax');
	errors += textCheck('mobile');
	errors += textCheck('email');
	errors += textCheck('occupation');
	errors += textCheck('qualification');
	errors += textCheck('institution');


	// EMPLOYMENT STATUS
	if(
	(document.getElementById('employ_fulltime').checked != true) &
	(document.getElementById('employ_unemployed').checked != true) &
	(document.getElementById('employ_parttime').checked != true) &
	(document.getElementById('employ_casual').checked != true)
	){

		alert("Please indicate your Employment Status");
		document.getElementById('employ_fulltime').className ="errorbox";
		errors++;
	}


	// STUDY PREFERENCE
	if(
	(document.getElementById('study_full_time').checked != true) &
	(document.getElementById('study_part_time').checked != true) &
	(document.getElementById('study_day_class').checked != true) &
	(document.getElementById('study_night_class').checked != true)
	){
		alert("Question 2 - Please choose a Study Preference");
		document.getElementById('study_full_time').className ="errorbox";
		errors++;
	}

	/*
	if(document.getElementById('iac_advisor').selected == false){
		alert("Please indicate whether you have contacted IAC Safety Services &reg;");
		document.getElementById('iac_advisor').className ="errorbox";
		errors++;
	}
	*/


	if(document.getElementById('agree').checked != true){
		alert('You must agree to the Terms at the bottom of the page.');
		errors++;
	}

	if(errors > 0){
		alert("There are errors in your form (marked in red)");
		return false;
	} else {
		return true;
	}

}

function formCheckShort(){

	var errors = 0;

	errors += textCheck('given_name');
	errors += textCheck('family_name');
	errors += textCheck('employer');
	errors += textCheck('postal_address');
	errors += textCheck('phone');
	errors += textCheck('fax');
	errors += textCheck('mobile');
	errors += textCheck('email');


	// STUDY PREFERENCE
	if(
	(document.getElementById('study_full_time').checked != true) &
	(document.getElementById('study_part_time').checked != true) &
	(document.getElementById('study_day_class').checked != true) &
	(document.getElementById('study_night_class').checked != true)
	){
		alert("Question 2 - Please choose a Study Preference");
		document.getElementById('study_full_time').className ="errorbox";
		errors++;
	}

	/*
	if(document.getElementById('iac_advisor').selected == false){
		alert("Please indicate whether you have contacted IAC Safety Services &reg;");
		document.getElementById('iac_advisor').className ="errorbox";
		errors++;
	}
	*/


	if(document.getElementById('agree').checked != true){
		alert('You must agree to the Terms at the bottom of the page.');
		errors++;
	}

	if(errors > 0){
		alert("There are errors in your form (marked in red)");
		return false;
	} else {
		return true;
	}

}

function termsCheck(){

	if(document.getElementById('agree').checked != true){
		alert('You must agree to the listed documents before proceeding by ticking the checkbox provided.');
		return false;
	} else {
		return true;
	}
}


function textCheck(el){
	if(document.getElementById(el).value == ''){
		document.getElementById(el).className ="errorbox";
		return 1;
	} else {
		document.getElementById(el).className ="formbox";
		return 0;
	}
}