<!--
function checkCheckavailabilityForm() {
	if (!checkText(document.frmCheckAvailability.strCheckavailabilityJobDetails, 'TextAreaType', 'job details/requirements', true)) {return false;}
	return confirm('By sending this request you agree that you are asking Flightdeck Recruitment to endeavour to find out if the listed crew are available and interested in working for you.  There is a charge for this service, according to our current prices, terms and conditions.  If you do not accept this please click \'Cancel\'.  Click \'OK\' to continue.');

	if(false){ // set to true for testing
		alert('Got to end of JavaScript OK');
		return false;
	}
	else {
		return true;
	}
}

function checkRecruiterdetailsForm() {
	if (!checkText(document.frmDetails.strRecruiterName, 'NameType', 'name', true)) {return false;}
	if (!checkText(document.frmDetails.strRecruiterUsername, 'UserType', 'user name', true)) {return false;}
	if (document.frmDetails.strRecruiterUsername.value.length<8) {alert('Your user name must have at least 8 characters.  Please try again.');document.frmDetails.strRecruiterUsername.focus();return false;}
	if (!checkText(document.frmDetails.strRecruiterPasswordA, 'PasswordType', 'password', true)) {return false;}
	if (!checkText(document.frmDetails.strRecruiterPasswordB, 'PasswordType', 'password', true)) {return false;}
	if (!checkSame(document.frmDetails.strRecruiterPasswordA, document.frmDetails.strRecruiterPasswordB, 'password')) {return false;}
	if (document.frmDetails.strRecruiterPasswordA.value.length<8) {alert('Your password must have at least 8 characters.  Please try again.');document.frmDetails.strRecruiterPasswordA.focus();return false;}
	if (!checkText(document.frmDetails.strRecruiterAddressLine1, 'StringType', 'address line 1', true)) {return false;}
	if (!checkText(document.frmDetails.strRecruiterAddressLine2, 'StringType', 'address line 2', true)) {return false;}
	if (!checkText(document.frmDetails.strRecruiterAddressLine3, 'StringType', 'address line 3', false)) {return false;}
	if (!checkText(document.frmDetails.strRecruiterCountyState, 'StringType', 'county/state', true)) {return false;}
	if (!checkText(document.frmDetails.strRecruiterPostcodeZip, 'StringType', 'postcode/zip', true)) {return false;}
	if (!checkSelected(document.frmDetails.intRecruiterCountryID, 'country of business')) {return false;}
	if (!checkText(document.frmDetails.strRecruiterAdminName, 'NameType', 'name', true)) {return false;}
	if (!checkEmail(document.frmDetails.strRecruiterEmailAddressA, 'admin e-mail address', true)) {return false;}
	if (!checkEmail(document.frmDetails.strRecruiterEmailAddressB, 'admin e-mail address', true)) {return false;}
	if (!checkSame(document.frmDetails.strRecruiterEmailAddressA, document.frmDetails.strRecruiterEmailAddressB, 'admin e-mail address')) {return false;}
	if (!checkText(document.frmDetails.strRecruiterTelephone1, 'PhoneType', 'primary admin telephone number', true)) {return false;}
	if (!checkText(document.frmDetails.strRecruiterTelephone2, 'PhoneType', 'second admin telephone number', false)) {return false;}
	if (!checkText(document.frmDetails.strRecruiterFax, 'StringType', 'fax number', false)) {return false;}
	if (!checkText(document.frmDetails.strRecruiterSkypeName, 'StringType', 'Skype name', false)) {return false;}
	if (!checkText(document.frmDetails.strRecruiterHRName, 'NameType', 'HR contact name', true)) {return false;}
	if (!checkEmail(document.frmDetails.strRecruiterHREmailAddressA, 'HR e-mail address', true)) {return false;}
	if (!checkEmail(document.frmDetails.strRecruiterHREmailAddressB, 'HR e-mail address', true)) {return false;}
	if (!checkSame(document.frmDetails.strRecruiterHREmailAddressA, document.frmDetails.strRecruiterHREmailAddressB, 'HR e-mail address')) {return false;}
	if (!checkText(document.frmDetails.strRecruiterHRTelephone, 'PhoneType', 'HR telephone number', true)) {return false;}
	if (!checkText(document.frmDetails.strRecruiterHowFound, 'StringType', 'method of finding this web site', true)) {return false;}
	if (document.frmDetails.strPreferredCurrency.selectedIndex==0)
	{
		alert('Please select your preferred currency.');
		document.frmDetails.strPreferredCurrency.focus();
		return false;
	}
	if (document.frmDetails.blnRecruiterAcceptsTsCs.checked==false){alert("You must agree to our Terms and Conditions.  Please select the checkbox to agree.");document.frmDetails.blnRecruiterAcceptsTsCs.focus();return false;}
	if (!checkText(document.frmDetails.strFloodControl, 'IntegerType', 'check number', true)) {return false;}
	if (document.frmDetails.strFloodControl.value.length!=4) {alert('Your check number must have 4 digits.  Please try again.');document.frmDetails.strFloodControl.focus();return false;}

	if(false){ // set to true for testing
		alert('Got to end of JavaScript OK');
		return false;
	}
	else {
		return true;
	}
}

function checkOtherJobForm() {
	if (!checkText(document.frmJob.strJobOtherPosition, 'StringType', 'job title', true)) {return false;}
	if (!checkText(document.frmJob.strJobDetails, 'TextAreaType', 'job details', true)) {return false;}
	if (!checkText(document.frmJob.intJobAgeLimitForApplications, 'IntegerType', 'age limit for applications', false)) {return false;}
	if (!checkEmail(document.frmJob.strJobEmailApplicationsTo, 'application e-mail address', false)) {return false;}
	if (!checkText(document.frmJob.strJobNameApplicationsTo, 'NameType', 'name of your contact for applications', false)) {return false;}
	if (!checkText(document.frmJob.strJobClickThroughURL, 'StringType', 'click-through URL for applications', false)) {return false;}
	if ((document.frmJob.blnJobAcceptApplicationsViaFDR.checked==false)&&(document.frmJob.blnJobAcceptApplicationsViaRecruitersOwnSite.checked==false)){
		alert("You must enable at least one way for applications to be made!  e-mail via FDR is recommended.");document.frmJob.blnJobAcceptApplicationsViaFDR.focus();return false;
		document.frmJob.blnJobAcceptApplicationsViaFDR.focus();
	}

	if(false){ // set to true for testing
		alert('Got to end of JavaScript OK');
		return false;
	}
	else {
		return true;
	}
}

function checkPilotJobForm() {
	if ((document.frmJob.intCrewTypeID.selectedIndex == 0)&&(document.frmJob.strJobOtherType.value=='')) {alert('Please select or enter an aircraft type.');document.frmJob.intCrewTypeID.focus();return false;}
	if ((document.frmJob.intCrewPositionID.selectedIndex == 0)&&(document.frmJob.strJobOtherPosition.value=='')) {alert('Please select or enter a position.');document.frmJob.intCrewPositionID.focus();return false;}
	if (!checkText(document.frmJob.intJobMinHrsType, 'IntegerType', 'minimum hours on type', true)) {return false;}
	if (!checkText(document.frmJob.intJobMinHrsTotal, 'IntegerType', 'minimum total hours', true)) {return false;}
	if (parseInt(document.frmJob.intJobMinHrsType.value,10)>parseInt(document.frmJob.intJobMinHrsTotal.value,10)) {alert('Total hours are less than hours on type!  Please try again.');document.frmJob.intJobMinHrsType.focus();return false;}
	if (!checkText(document.frmJob.strJobBaseAirport, 'StringType', 'base airport', false)) {return false;}
	if (!checkSelected(document.frmJob.intJobCountryID, 'base country')) {return false;}
	if (!checkText(document.frmJob.strJobDetails, 'TextAreaType', 'job details', true)) {return false;}
	if (!checkText(document.frmJob.intJobAgeLimitForApplications, 'IntegerType', 'age limit for applications', false)) {return false;}
	if (!checkEmail(document.frmJob.strJobEmailApplicationsTo, 'application e-mail address', false)) {return false;}
	if (!checkText(document.frmJob.strJobNameApplicationsTo, 'NameType', 'name of your contact for applications', false)) {return false;}
	if (!checkText(document.frmJob.strJobClickThroughURL, 'StringType', 'click-through URL for applications', false)) {return false;}
	if ((document.frmJob.blnJobAcceptApplicationsViaFDR.checked==false)&&(document.frmJob.blnJobAcceptApplicationsViaRecruitersOwnSite.checked==false)){
		alert("You must enable at least one way for applications to be made!  e-mail via FDR is recommended.");document.frmJob.blnJobAcceptApplicationsViaFDR.focus();return false;
		document.frmJob.blnJobAcceptApplicationsViaFDR.focus();
	}

	if(false){ // set to true for testing
		alert('Got to end of JavaScript OK');
		return false;
	}
	else {
		return true;
	}
}
// -->

