function login(f)
{
	// Check if username is empty when trimmed
	// Check if password is empty
	// Alert when either are empty
	if (empty(f.u.value) || f.p.value.length < 1 )
	{
		alert("Please fill in all fields.");
		return false;
	}

	f.h.value = hex_sha1(hex_sha1(f.p.value + f.u.value + f.s.value) + f.c.value);
	f.p.value = "";

	return true;
}

window.onload = function ()
{
	document.login_form.u.focus();
	turnkey();
}
