// JavaScript Document
var goto_type;
var next_url;
var next_form;
var onsubmit_method;
//	$("form").serialize(), 


//登录验证操作
function getUser(username,password){
	alert(username);
	return false;
	$.post(
	"/member/Ajax_Login.asp",
	{
	username: username,
	password: password
	},
	function (msg) {
		var login_value = msg;
		switch (login_value)
		{
		case "1": 
		document.getElementById("msg").innerHTML="用户名为空";
		break;
		case "2": 
		document.getElementById("msg").innerHTML="密码为空";

		break;
		case "3": 
		document.getElementById("msg").innerHTML="用户名或是密码错误";

		break;
		case "9": 
			$.weeboxs.close();
			if (goto_type=="1") //链接
			{
				window.location.href=next_url
			}
			if (goto_type=="2") //提交表单
			{
				if (onsubmit_method!="")
				{
					
					if (eval(onsubmit_method)==false)
					{
						return false;
					}
				}
				document.getElementById(next_form).submit();
			}
			if (goto_type=="3") //刷新当前页面
			{
				window.location.reload();
				return false;
			}


		break;
		}
	}
	);
}
//登陆成功
function Login_IsOK()
{
	if (goto_type=="1") //链接
	{
		window.location.href=next_url
	}
	if (goto_type=="2") //提交表单
	{
		if (onsubmit_method!="")
		{
			
			if (eval(onsubmit_method)==false)
			{
				return false;
			}
		}
		document.getElementById(next_form).submit();
	}
	if (goto_type=="3") //刷新当前页面
	{
		window.location.reload();
		return false;
	}

}
//检查是否登录
function check_islogin(_next_url,_next_form,_onsubmit_method,_goto_type)
{
	next_url  = _next_url;
	next_form = _next_form;
	goto_type = _goto_type;
	onsubmit_method = _onsubmit_method;
	$.post(
	'/member/Ajax_Check_IsLogin.asp',
	function (msg) {
		if (msg=="0")
		{
			//$.weeboxs.open('#formBox',{width:360,timeout:30,title:'会员登录',modal:false,animate:true});
			J.dialog.get({ id: 'test2', title: '会员登录', page: '/javascript/loginbox/login.html',cover:true, nofoot: true  });
			//J.dialog.get({ id: 'test2', title: '测试窗口', page: '/javascript/loginbox/login.html' });
			//document.getElementById("username").focus();
		}
		else
		{
			if (goto_type=="1") //链接
			{
				window.location.href=next_url
			}
			if (goto_type=="2") //提交表单
			{
				if (onsubmit_method!="")
				{
					if (eval(onsubmit_method)==false)
					{
						return false;
					}

				}
				document.getElementById(next_form).submit();
				//return false;
			}
		}
	}
	);
			
}
/*
没用
function checkuser(username,password)
{
	alert(username+password);
	alert("checkuser");
	return false;
}
*/
