function Validar(frm){
	if (frm.txtNombre.value == ""){
		alert ("Por favor indique su Nombre");
		frm.txtNombre.focus();
		return false;
	}else if (frm.txtApellido.value == ""){
		alert ("Por favor ingrese su Apellido");
		frm.txtApellido.focus();
		return false;
	}else if (frm.txtEmail.value == ""){
		alert ("Por favor ingrese su e-Mail");
		frm.txtEmail.focus();
		return false;
	}else if (frm.txtEmail.value != "" && !validarEmail(frm.txtEmail.value)){
			alert ("El e-Mail introducido es Inválido");
			frm.txtEmail.focus();
			return false;
	}else if (frm.cboSexo[0].checked==false && frm.cboSexo[1].checked==false){
		alert ("Por favor indique su Sexo");
		return false;
	}
		
	//return true;
	return false;
}

function validarEmail(str) {
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(str)){
		return true;
	}
	return false;
}

function validarNumero(tecla){
	if (!tecla || tecla == "undefined")	{
			tecla = event.keyCode;
	}
	//         No Numerico                 Backspace y delete            flechas desplazam.
	if ((tecla < 48 || tecla > 57) && (tecla < 96 || tecla > 105) && (tecla != 8 && tecla != 9 && tecla != 46) && (tecla < 37 || tecla > 40)) {
		return false;
	}else{
		return true;
	}
}

function validarTexto(tecla){
	if (!tecla || tecla == "undefined")	{
			tecla = event.keyCode;
	}
	//         No Numerico                 Backspace y delete            flechas desplazam.
	if ((tecla > 47 && tecla < 58) && (tecla != 8 && tecla != 46) && (tecla < 37 || tecla > 40)) {
		return false;
	}else{
		return true;
	}
}

