function $(id) { return document.getElementById(id); }
function $F(id) { return document.getElementById(id).value; }

function user_check_form()
{
	if ($F('user_name').length < 3) 
	{ alert("Login is too short"); return false; }

	if ($F('password').length < 5) 
	{ alert("Password is empty"); return false; }
	
	if ($F('password') != $F('confirm'))
	{ alert("Passwords do not match"); return false; }
	
	if ($F('user_fullname').length < 3) 
	{ alert("Your name is too short"); return false; }
	
	if (($F('user_email').length < 5) || ($F('user_email').search(/.{1,}@.+\..{2,}/) == -1))
	{ alert('E-mail address is invalid'); return false; }
	
	return true;
}
