// JavaScript Document
function validarForm(thisForm) {
	if(thisForm.txtNombre.value == ''){
		alert('Debe ingresar el nombre.');
		thisForm.txtNombre.focus();
		return false;
	}

	if(thisForm.txtApellido.value == ''){
		alert('Debe ingresar el apellido.');
		thisForm.txtApellido.focus();
		return false;
	}

	if(thisForm.txtDni.value == ''){
		alert('Debe ingresar el DNI.');
		thisForm.txtDni.focus();
		return false;
	}
	
	if(thisForm.txtTelefono.value == ''){
		alert('Debe ingresar el teléfono.');
		thisForm.txtTelefono.focus();
		return false;
	}
	
	if(thisForm.txtMail.value == ''){
		alert('Debe ingresar el e-mail.');
		thisForm.txtMail.focus();
		return false;
	}else{		
		re=/\w+([-+.]\w+)*@\w+([-]\w+)*\.\w+([.]\w+)*/;
		if (!re.test(thisForm.txtMail.value)) 
		{
			alert("El e-mail ingresado es incorrecto, inténtelo de nuevo");
			thisForm.txtMail.focus();
			return false;	
		}
	}
	
	if(thisForm.cmbMisDeudasEstan.value == ''){
		alert('Debe selecciónar el estado de su deuda.');
		thisForm.cmbMisDeudasEstan.focus();
		return false;
	}
	
	if(thisForm.cmbGrupoDeudas == null || (thisForm.cmbGrupoDeudas != null && thisForm.cmbGrupoDeudas.value == '')){
		alert('Debe selecciónar el estado de su deuda.');
		thisForm.cmbGrupoDeudas.focus();
		return false;
	}
	
	
	if(thisForm.txtConsulta.value == ''){
		alert('Debe ingresar la consulta.');
		thisForm.txtConsulta.focus();
		return false;
	}
	
	return true;
}
