function validarRegistracion() {

	//valida que el campo nombre de usuario no este vacio
	if(document.registracion.nombre0.value == ''){
		jAlert('Por favor ingres&aacute; tu nombre','', function(){document.registracion.nombre0.focus();});
		return false;
	}
	if(document.registracion.apellido0.value == ''){
		jAlert('Por favor ingres&aacute; tu apellido','', function(){document.registracion.apellido0.focus();});
		return false;
	}
	if(document.registracion.dni.value == ''){
		jAlert('Por favor ingres&aacute; tu DNI','', function(){document.registracion.dni.focus();});
		return false;
	}
	if(document.registracion.email.value == ''){
		jAlert('Por favor ingres&aacute; tu e-mail','', function(){document.registracion.email.focus();});
		return false;
	}
	if(document.registracion.password.value == ''){
		jAlert('Por favor ingres&aacute; tu contrase&ntilde;a','', function(){document.registracion.password.focus();});
		return false;
	}
	if(document.registracion.escuela_nombre.value == ''){
		jAlert('Por favor ingres&aacute; el nombre de tu escuela','', function(){document.registracion.escuela_nombre.focus();});
		return false;
	}
	if(document.registracion.escuela_direccion.value == ''){jAlert('Por favor ingres&aacute; la direcci&oacute;n de tu escuela','', function(){document.registracion.escuela_direccion.focus();});return false;}

	/*
	if(document.registracion.nombre1.value == ''){jAlert('Por favor ingres&aacute; el primer nombre del resto del grupo','', function(){document.registracion.nombre1.focus();});return false;}
	if(document.registracion.apellido1.value == ''){jAlert('Por favor ingres&aacute; el primer apellido del resto del grupo','', function(){document.registracion.apellido1.focus();});return false;}
	if(document.registracion.nombre2.value == ''){jAlert('Por favor ingres&aacute; el segundo nombre del resto del grupo','', function(){document.registracion.nombre2.focus();});return false;}
	if(document.registracion.apellido2.value == ''){jAlert('Por favor ingres&aacute; el segundo apellido del resto del grupo','', function(){document.registracion.apellido2.focus();});return false;}
	if(document.registracion.nombre3.value == ''){jAlert('Por favor ingres&aacute; el tercer nombre del resto del grupo','', function(){document.registracion.nombre3.focus();});return false;}
	if(document.registracion.apellido3.value == ''){jAlert('Por favor ingres&aacute; el tercer apellido del resto del grupo','', function(){document.registracion.apellido3.focus();});return false;}
	if(document.registracion.nombre4.value == ''){jAlert('Por favor ingres&aacute; el cuarto nombre del resto del grupo','', function(){document.registracion.nombre4.focus();});return false;}
	if(document.registracion.apellido4.value == ''){jAlert('Por favor ingres&aacute; el cuarto apellido del resto del grupo','', function(){document.registracion.apellido4.focus();});return false;}
	if(document.registracion.nombre5.value == ''){jAlert('Por favor ingres&aacute; el quinto nombre del resto del grupo','', function(){document.registracion.nombre5.focus();});return false;}
	if(document.registracion.apellido5.value == ''){jAlert('Por favor ingres&aacute; el quinto apellido del resto del grupo','', function(){document.registracion.apellido5.focus();});return false;}
	*/

	if(document.registracion.docente_nombre.value == ''){jAlert('Por favor ingres&aacute; el nombre del docente','', function(){document.registracion.docente_nombre.focus();});return false;}
	if(document.registracion.docente_apellido.value == ''){jAlert('Por favor ingres&aacute; el apellido del docente','', function(){document.registracion.docente_apellido.focus();});	return false;	}
	return true;

}


function validarLogin() {
	//valida que el campo nombre de usuario no este vacio
	if(document.login.usuario.value == ''){
		jAlert('Por favor ingres&aacute; tu nombre de usuario','Alerta', function(){document.login.usuario.focus();});
		return false;
	}

	//valida que el campo de contraseņa este bien ingresado
		if(document.login.password.value == ''){
		jAlert('Por favor ingres&aacute; tu contrase&ntilde;a','Alerta', function(){document.login.password.focus();});
		return false;
	}

	return true;

}

function validarConsulta() {
	if(document.consultaForm.nombre.value == ''){
		jAlert('Por favor ingres&aacute; tu nombre','Alerta', function(){document.consultaForm.nombre.focus();});
		return false;
	}
	if(document.consultaForm.apellido.value == ''){
		jAlert('Por favor ingres&aacute; tu apellido','Alerta', function(){document.consultaForm.apellido.focus();});
		return false;
	}
	if(document.consultaForm.consulta.value == ''){
		jAlert('Por favor ingres&aacute; tu consulta','Alerta', function(){document.consultaForm.consulta.focus();});
		return false;
	}

	return true;

}

function submitRegistracion(){
	if(validarRegistracion())
		document.registracion.submit();
	else
		return false;
}

function submitLogin(){
	if(validarLogin())
		document.login.submit();
	else
		return false;
}


function submitConsulta(){
	if(validarConsulta())
		document.consulta.submit();
	else
		return false;
}
