function submit_empresa_recrutamento_candidatura()
{
	try
	{		
		var aMsg = new Array();
		var aMsgIndex = 0;
		var oNome = document.getElementById("txtNome");
		var oDtNasc_Dia = document.getElementById("cbDtNasc_Dia");
		var oDtNasc_Mes = document.getElementById("cbDtNasc_Mes");
		var oDtNasc_Ano = document.getElementById("cbDtNasc_Ano");
		var oMorada = document.getElementById("txtMorada");
		var oCodPostal = document.getElementById("txtCodPostal");
		var oLocalidade = document.getElementById("txtLocalidade");		
		var oTelefone = document.getElementById("txtTelefone");
		var oTelemovel = document.getElementById("txtTelemovel");
		var oEMail = document.getElementById("txtEMail");
		var oNrContribuinte = document.getElementById("txtNrContribuinte");
		var oCursoMedia = document.getElementById("txtCursoMedia");
		var oDsCurso = document.getElementById("txtDsCurso");
		var oInstituicao = document.getElementById("txtInstituicao");		
		var oCursoIni_Mes = document.getElementById("cbCursoIni_Mes");
		var oCursoIni_Ano = document.getElementById("cbCursoIni_Ano");
		var oCursoFim_Mes = document.getElementById("cbCursoFim_Mes");
		var oCursoFim_Ano = document.getElementById("cbCursoFim_Ano");
		var oEmpresa = document.getElementById("txtEmpresa");		
		var oDtTrabIni_Mes = document.getElementById("cbDtTrabIni_Mes");
		var oDtTrabIni_Ano = document.getElementById("cbDtTrabIni_Ano");
		var oDtTrabFim_Mes = document.getElementById("cbDtTrabFim_Mes");
		var oDtTrabFim_Ano = document.getElementById("cbDtTrabFim_Ano");
		var oFuncao = document.getElementById("txtFuncao");		
			
		if (Trim(oNome.value) == "")
		{
			aMsg[aMsgIndex] = "o seu nome completo;"
			aMsgIndex = aMsgIndex + 1;
		}		
		if ( (oDtNasc_Dia.value == "-1") || (oDtNasc_Mes.value == "-1") || (oDtNasc_Ano.value == "-1"))
		{
			aMsg[aMsgIndex] = "a sua data de nascimento;"
			aMsgIndex = aMsgIndex + 1;
		}
		else
		{
			if (!isDate(parseInt(oDtNasc_Ano.value),parseInt(oDtNasc_Mes.value),parseInt(oDtNasc_Dia.value)))
			{
				aMsg[aMsgIndex] = "a sua data de nascimento é inválida;"
				aMsgIndex = aMsgIndex + 1;
			}
		}
		if (Trim(oMorada.value) == "")
		{
			aMsg[aMsgIndex] = "a sua morada;"
			aMsgIndex = aMsgIndex + 1;
		}
		
		if (Trim(oCodPostal.value) == "")
		{
			aMsg[aMsgIndex] = "o seu código postal;"
			aMsgIndex = aMsgIndex + 1;
		}
		
		if (Trim(oLocalidade.value) == "")
		{
			aMsg[aMsgIndex] = "a sua localidade;"
			aMsgIndex = aMsgIndex + 1;
		}
		
		if (Trim(oTelefone.value) == "")
		{
			aMsg[aMsgIndex] = "o seu telefone;"
			aMsgIndex = aMsgIndex + 1;
		}
		
		if ( (Trim(oTelefone.value) != "")  && (!CheckNrTelefone(oTelefone.value)))
		{
			aMsg[aMsgIndex] = "o seu telefone é inválido;"
			aMsgIndex = aMsgIndex + 1;
		}
		
		if ( (Trim(oTelemovel.value) != "")  && (!CheckNrTelefone(oTelemovel.value)))
		{
			aMsg[aMsgIndex] = "o seu telemovel é inválido;"
			aMsgIndex = aMsgIndex + 1;
		}
		
		if ( (Trim(oEMail.value) != "")  && (!CheckEMailAddress(oEMail.value)))
		{
			aMsg[aMsgIndex] = "o seu e-mail é inválido;"
			aMsgIndex = aMsgIndex + 1;
		}
		
		if ( (Trim(oNrContribuinte.value) != "")  && (!CheckNrContribuinte(oNrContribuinte.value)))
		{
			aMsg[aMsgIndex] = "o seu nr. contribuinte é inválido;"
			aMsgIndex = aMsgIndex + 1;
		}
		if ( (Trim(oDsCurso.value) != ""))
		{
			if ( Trim(oInstituicao.value) == "" )
			{
				aMsg[aMsgIndex] = "a instituição onde obteu o seu curso;"
				aMsgIndex = aMsgIndex + 1;
			}
			var x = 0;
			if ( (oCursoIni_Mes.value == "-1") || (oCursoIni_Ano.value == "-1"))
			{
				aMsg[aMsgIndex] = "a data inicio do curso;"
				aMsgIndex = aMsgIndex + 1;
				x = x + 1;
			}
			if ( (oCursoFim_Mes.value == "-1") || (oCursoFim_Ano.value == "-1"))
			{
				aMsg[aMsgIndex] = "a data fim do curso;"
				aMsgIndex = aMsgIndex + 1;
				x = x + 1;
			}
			if (x == 0)
			{
				var dt1 = oCursoIni_Ano.value + oCursoIni_Mes.value;
				var dt2 = oCursoFim_Ano.value + oCursoFim_Mes.value;
				if (dt1 >= dt2)
				{
					aMsg[aMsgIndex] = "data inicio/fim do curso incorrectas;"
					aMsgIndex = aMsgIndex + 1;
				}
			}
			if ( Trim(oCursoMedia.value) == "" )
			{
				aMsg[aMsgIndex] = "a média do seu curso;"
				aMsgIndex = aMsgIndex + 1;
			}
		}
		if (Trim(oCursoMedia.value) != "")
		{
			var nota = parseInt(oCursoMedia.value);
			
			if ( !((nota >= 1) && (nota <= 20)))
			{
				aMsg[aMsgIndex] = "a média do curso é inválida(1-20);"
				aMsgIndex = aMsgIndex + 1;
			}
		}
		if ( (Trim(oEmpresa.value) != ""))
		{
			x = 0;
			if ( (oDtTrabIni_Mes.value == "-1") || (oDtTrabIni_Ano.value == "-1"))
			{
				aMsg[aMsgIndex] = "a data inicio da última experiência profissional;"
				aMsgIndex = aMsgIndex + 1;
				x = x + 1;
			}
			if ( (oDtTrabFim_Mes.value == "-1") || (oDtTrabFim_Ano.value == "-1"))
			{
				aMsg[aMsgIndex] = "a data fim da última experiência profissional;"
				aMsgIndex = aMsgIndex + 1;
				x = x + 1;
			}
			if (x == 0)
			{
				var dt1 = oDtTrabIni_Ano.value + oDtTrabIni_Mes.value;
				var dt2 = oDtTrabFim_Ano.value + oDtTrabFim_Mes.value;
				if (dt1 >= dt2)
				{
					aMsg[aMsgIndex] = "data inicio/fim a última experiência profissional incorrectas;"
					aMsgIndex = aMsgIndex + 1;
				}
			}
			if (Trim(oFuncao.value) == "")
			{
				aMsg[aMsgIndex] = "a sua função da última experiência profissional;"
				aMsgIndex = aMsgIndex + 1;
			}
		}		 
		
		if (aMsgIndex > 0)
		{		
			SetValidateErrorsRequired("base_varHeaderSub",aMsg);
			return false;
		}
		else
		{
			return confirm("Confirma os dados a submeter?");
		}		
	}
	catch(err)
	{
		alert(err);
		return false;
	}	
}

