// JavaScript Document

function validateSendJob()
	{
		
		var title = document.sendJobForm.title;
		var titleError = 0;
		if (title.value == 'Select')
			{
				titleError++;
				alert ('You must select your Title!');
				return false;
			}

		
		if (titleError == 0)
			{
				var firstName = document.sendJobForm.firstName;
				var firstNameError = 0;
				if (firstName.value.length < 1)
					{
						firstNameError++;
						alert ('You must enter your First Name!');
						return false;
					}
			}
		
		if (firstNameError == 0)
			{
				var surname = document.sendJobForm.surname;
				var surnameError = 0;
				if (surname.value.length < 1)
					{
						surnameError++;
						alert ('You must enter your Surname!');
						return false;
					}
			}
			
		if (surnameError == 0)
			{
				var company = document.sendJobForm.company;
				var companyError = 0;
				if (company.value.length < 1)
					{
						companyError++;
						alert ('You must enter your Company Name!');
						return false;
					}
			}
			
		if (companyError == 0)
			{
				var jobtitle = document.sendJobForm.jobtitle;
				var jobtitleError = 0;
				if (jobtitle.value.length < 1)
					{
						jobtitleError++;
						alert ('You must enter the Job Title!');
						return false;
					}
			}
			
		if (jobtitleError == 0)
			{
				var salary = document.sendJobForm.salary;
				var salaryError = 0;
				if (salary.value.length < 1)
					{
						salaryError++;
						alert ('You must enter the Job Salary!');
						return false;
					}
			}
			
		if (salaryError == 0)
			{
				var location = document.sendJobForm.location;
				var locationError = 0;
				if (location.value.length < 1)
					{
						locationError++;
						alert ('You must enter the Job Location!');
						return false;
					}
			}
			
		if (locationError == 0)
			{
				var phone = document.sendJobForm.phone;
				var phoneError = 0;
				if (phone.value.length < 10)
					{
						phoneError++;
						alert ('You must enter a valid Phone Number!');
						return false;
					}
			}
			
		if (phoneError == 0)
			{
				var emailError = 0;
				var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
					if (filter.test(document.sendJobForm.email.value)) {}
					else
					{
					emailError++;
					alert ('You must enter a valid Email Address!');
					return false;
					}
			}
			
		if (emailError == 0)
			{
				var uploaded_file = document.sendJobForm.uploaded_file;
				var uploaded_fileError = 0;
				if (uploaded_file.value.length < 1)
					{
						uploaded_fileError++;
						alert ('You must select you CV to upload!');
						return false;
					}
			}
	
	}
	
      
	  

	
	
	
	
		

