function login()
{

	var username = $("#username").val();
	var password = $("#password").val();

	if ((username == '') || (password == ''))
	{
		$("#warning").html("Bitte Nachnamen und Mitglieds-Nr. eingeben.");
	}

	else
	{
		$.get("includes/checklogin.php?username="+username+"&password="+password, function(result) {
			if (result == 0)
			{
				$("#warning").html("Nachname oder Mitglieds-Nr. falsch.");
			}

			else if (result == 1)
			{
				$("warning").html('');
				$("#login").html("Login erfolgreich");
				setTimeout("window.location.reload()",1000);
				setTimeout("tb_remove()",3000);
			}

		});

	}
	return false;
}


	

	

