function EnviarCV(){
	if(xGetElementById('formulario_CV_error').style.display!="none"){ hide('formulario_CV_error'); }
	FormatearTapa('formulario_CV');
	PonerTapa('formulario_CV');
	PonerMensaje('tapa');
	makeRequest('/ajax-rrhh.php',GetNewCVResult,'POST',armarPost('rrhhForm'));
}

function GetNewCVResult(xmlhttp) {
	switch (xmlhttp.readyState){
		case 1:
			//onLoading();
			break;
		case 2:
			//onLoaded();
			break;
		case 3:
			//onInteractive();
			break;
		case 4:
			var response = xmlhttp.responseText;
			var AnchorDestino = document.location.href+'#inicio_form';
			if(response == 'OK'){
				if(xGetElementById('formulario_CV').style.display!="none"){ hide('formulario_CV'); }
				document.rrhhForm.reset();
				if(xGetElementById('formulario_CV_response_OK').style.display=="none"){ show('formulario_CV_response_OK'); }
				FormatearTapa('formulario_CV');
				SacarMensaje();
				SacarTapa();
			}else{
				document.images['Captcha_Img'].src='/inc/kcaptcha/?rnd='+aleatorio(999,999999);
				if(response =='* El c&oacute;digo de validaci&oacute;n ingresado no es correcto.'){
					setClass(xGetElementById('Captcha'),'campoError');
				}
				xGetElementById('formulario_CV_mensaje_error').innerHTML = response;
				document.location.hash = 'inicio_form';
				if(xGetElementById('formulario_CV_error').style.display=="none"){ show('formulario_CV_error'); }
				FormatearTapa('formulario_CV');
				SacarMensaje();
				SacarTapa();
			}
			break;
	}
}