<!--
function checkCrewCVuploadForm() {
	if (!checkText(document.frmCVUpload.CVFILE, 'StringType', 'CV/resume filename, or browse for it', true)) {return false;}

	if(false){ // set to true for testing
		alert('Got to end of JavaScript OK');
		return false;
	}
	else {
		return true;
	}
}

function checkDeleteForm() {
	return confirm('Are you sure you wish to delete all your details from our service?  Click \'OK\' to delete.');

	if(false){ // set to true for testing
		alert('Got to end of JavaScript OK');
		return false;
	}
	else {
		return true;
	}
}

function checkCrewdetailsForm() {
	if (!checkText(document.frmDetails.strCrewName, 'NameType', 'name', true)) {return false;}
	if (!checkSelected(document.frmDetails.blnCrewClaimsToBeCockpitCrew, 'type of position sought')) {return false;}
	if (!checkText(document.frmDetails.strCrewUsername, 'UserType', 'user name', true)) {return false;}
	if (document.frmDetails.strCrewUsername.value.length<8) {alert('Your user name must have at least 8 characters.  Please try again.');document.frmDetails.strCrewUsername.focus();return false;}
	if (!checkText(document.frmDetails.strCrewPasswordA, 'PasswordType', 'password', true)) {return false;}
	if (!checkText(document.frmDetails.strCrewPasswordB, 'PasswordType', 'password', true)) {return false;}
	if (!checkSame(document.frmDetails.strCrewPasswordA, document.frmDetails.strCrewPasswordB, 'password')) {return false;}
	if (document.frmDetails.strCrewPasswordA.value.length<8) {alert('Your password must have at least 8 characters.  Please try again.');document.frmDetails.strCrewPasswordA.focus();return false;}
	if (!checkText(document.frmDetails.strCrewAddressLine1, 'StringType', 'address line 1', true)) {return false;}
	if (!checkText(document.frmDetails.strCrewAddressLine2, 'StringType', 'address line 2', false)) {return false;}
	if (!checkText(document.frmDetails.strCrewAddressLine3, 'StringType', 'address line 3', false)) {return false;}
	if (!checkText(document.frmDetails.strCrewCountyState, 'StringType', 'county/state', true)) {return false;}
	if (!checkText(document.frmDetails.strCrewPostcodeZip, 'StringType', 'postcode/zip', true)) {return false;}
	if (!checkSelected(document.frmDetails.intCrewCountryID, 'country of residence')) {return false;}
	if (!checkText(document.frmDetails.strCrewTelephone1, 'PhoneType', 'primary telephone number', true)) {return false;}
	if (!checkText(document.frmDetails.strCrewTelephone2, 'PhoneType', 'second telephone number', false)) {return false;}
	if (!checkText(document.frmDetails.strCrewFax, 'PhoneType', 'fax number', false)) {return false;}
	if (!checkText(document.frmDetails.strCrewSkypeName, 'StringType', 'Skype name', false)) {return false;}
	if (!checkEmail(document.frmDetails.strCrewEmailAddress1A, 'primary e-mail address', true)) {return false;}
	if (!checkEmail(document.frmDetails.strCrewEmailAddress1B, 'primary e-mail address', true)) {return false;}
	if (!checkSame(document.frmDetails.strCrewEmailAddress1A, document.frmDetails.strCrewEmailAddress1B, 'primary e-mail address')) {return false;}
	if (!checkEmail(document.frmDetails.strCrewEmailAddress2A, 'second e-mail address', false)) {return false;}
	if (!checkEmail(document.frmDetails.strCrewEmailAddress2B, 'second e-mail address', false)) {return false;}
	if (!checkSame(document.frmDetails.strCrewEmailAddress2A, document.frmDetails.strCrewEmailAddress2B, 'second e-mail address')) {return false;}
	if (!checkSelected(document.frmDetails.strCrewGender, 'gender')) {return false;}
	if ((document.frmDetails.intDOBDay.selectedIndex==0)||(document.frmDetails.intDOBMonth.selectedIndex==0)||(document.frmDetails.intDOBYear.selectedIndex==0))
	{
		alert('Please enter your date of birth.');
		document.frmDetails.intDOBDay.focus();
		return false;
	}
	if (!checkText(document.frmDetails.strCrewHowFound, '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.blnCrewAcceptsTsCs.checked==false){alert("You must agree to our Terms and Conditions.  Please select the checkbox to agree.");document.frmDetails.blnCrewAcceptsTsCs.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 checkCrewemployerForm() {
	if (document.frmEmployer.intCrewEmployerID.selectedIndex==0) {alert('Please select an employer');document.frmEmployer.intCrewEmployerID.focus();return false;}
	if (document.frmEmployer.strCrewNoticePeriod.selectedIndex==0) {alert('Please select a notice period');document.frmEmployer.strCrewNoticePeriod.focus();return false;}

	if(false){ // set to true for testing
		alert('Got to end of JavaScript OK');
		return false;
	}
	else {
		return true;
	}
}

function checkCrewexperienceForm() {
	if (!checkText(document.frmExperience.intCrewTotalHours, 'IntegerType', 'total hours', true)) {return false;}
	if (!checkText(document.frmExperience.strCrewLicenceNumber, 'StringType', 'licence number', true)) {return false;}
	if (document.frmExperience.intCrewLicenceCountryID.selectedIndex==0) {alert('Please select your licence country of issue');document.frmExperience.intCrewLicenceCountryID.focus();return false;}
	if (document.frmExperience.intCrewLicenceTypeID1.selectedIndex==0) {alert('Please select your licence type');document.frmExperience.intCrewLicenceTypeID1.focus();return false;}

	if(false){ // set to true for testing
		alert('Got to end of JavaScript OK');
		return false;
	}
	else {
		return true;
	}
}

function confirmJobApply() {
	return confirm("Do you really wish to apply for this job?  If so, please press \'OK\'.  If not, please press \'Cancel\'.");

	if(true){ // set to true for testing
		alert('Got to end of JavaScript OK');
		return false;
	}
	else {
		return true;
	}
}

function crewDetailsForRecruitersOnly() {
	alert('Sorry, crew details are only available to logged in recruiters.');
	return false;
}

function checkCrewpassportsFormAdd() {
	if (document.frmPassports.intCrewCountryID.selectedIndex==0) {alert('Please select a country');document.frmPassports.intCrewCountryID.focus();return false;}

	if(false){ // set to true for testing
		alert('Got to end of JavaScript OK');
		return false;
	}
	else {
		return true;
	}
}

function checkCrewpassportsFormDelete() {

	if(false){ // set to true for testing
		alert('Got to end of JavaScript OK');
		return false;
	}
	else {
		return true;
	}
}

function confirmRecruiterApply() {
	return confirm("Do you really wish to apply to this recruiter?  If so, please press \'OK\'.  If not, please press \'Cancel\'.");

	if(false){ // set to true for testing
		alert('Got to end of JavaScript OK');
		return false;
	}
	else {
		return true;
	}
}

function checkCrewsearchselecthoursForm() {
	if (!checkText(document.frmSearchHours.intCrewsearchMinTypeHours, 'IntegerType', 'minimum hours on type', false)) {return false;}
	if (!checkText(document.frmSearchHours.intCrewsearchMinTotalHours, 'IntegerType', 'minimum total hours', false)) {return false;}
	if (parseInt(document.frmSearchHours.intCrewsearchMinTotalHours.value,10)<parseInt(document.frmSearchHours.intCrewsearchMinTypeHours.value,10))
		{
			alert('Your minimum hours on type exceed your minimum total hours.  Please try again.');
			document.frmSearchHours.intCrewsearchMinTypeHours.value='';
			document.frmSearchHours.intCrewsearchMinTotalHours.value='';
			document.frmSearchHours.intCrewsearchMinTypeHours.focus();
			return false;
		}
	if (!checkText(document.frmSearchHours.intCrewsearchMaxTypeHours, 'IntegerType', 'maximum hours on type', false)) {return false;}
	if (!checkText(document.frmSearchHours.intCrewsearchMaxTotalHours, 'IntegerType', 'maximum total hours', false)) {return false;}
	if (parseInt(document.frmSearchHours.intCrewsearchMaxTotalHours.value,10)<parseInt(document.frmSearchHours.intCrewsearchMaxTypeHours.value,10))
		{
			alert('Your maximum hours on type exceed your maximum total hours.  Please try again.');
			document.frmSearchHours.intCrewsearchMaxTypeHours.value='';
			document.frmSearchHours.intCrewsearchMaxTotalHours.value='';
			document.frmSearchHours.intCrewsearchMaxTypeHours.focus();
			return false;
		}

	if(false){ // set to true for testing
		alert('Got to end of JavaScript OK');
		return false;
	}
	else {
		return true;
	}
}

function checkCrewsendjobtofriendForm() {
	if (!checkText(document.frmCrewsendjobtofriend.strCrewsendjobtofriendNameFrom, 'NameType', 'own name', true)) {return false;}
	if (!checkEmail(document.frmCrewsendjobtofriend.strCrewsendjobtofriendEmailFrom, 'own e-mail address', false)) {return false;}
	if (!checkText(document.frmCrewsendjobtofriend.strCrewsendjobtofriendNameTo, 'NameType', "friend\'s name", true)) {return false;}
	if (!checkEmail(document.frmCrewsendjobtofriend.strCrewsendjobtofriendEmailTo, "friend\'s e-mail address", true)) {return false;}
	if (!checkText(document.frmCrewsendjobtofriend.strFloodControl, 'IntegerType', 'check number', true)) {return false;}
	if (document.frmCrewsendjobtofriend.strFloodControl.value.length!=4) {alert('Your check number must have 4 digits.  Please try again.');document.frmCrewsendjobtofriend.strFloodControl.focus();return false;}

	if(false){ // set to true for testing
		alert('Got to end of JavaScript OK');
		return false;
	}
	else {
		return true;
	}
}

function checkUnsubscribeForm() {
	return confirm('Are you sure you wish to suspend your account?  Click \'OK\' to continue.');

	if(false){ // set to true for testing
		alert('Got to end of JavaScript OK');
		return false;
	}
	else {
		return true;
	}
}
// -->

