// JavaScript Document
function check(fanhui)
{
	var email=$("#txtemail").val();
	var pwd=$("#txtpwd").val();
	if(email=="")
	{
		$("#tishi").html("<font color='red'>Emai不能为空!</font>");
		return false;
	}
	if(pwd=="")
	{
		$("#tishi").html("<font color='red'>密码不能为空!</font>");
		return false;
	}
	var param = "email="+email+"&pwd="+pwd;
	$.post("enterhandler.php", param, 
		function(data){
				if(data.result=="true")
				{
					if(fanhui)
					{
						location.href=decodeURI(fanhui);
					}
					else
					{
						location.href="index.php";
					}
				}
				else
				{
					$("#tishi").html("<font color='red'>用户名或密码错误!</font>");
					return false;
				}
		}, 'json');
}
