//弹出注销登录框
function signout() { if(confirm("您确定要退出吗?")) { return true; } return false; }
//登录
function topLogin() {
	var basePath = $jq($jq("body")[0]).attr("base");
	var O_Account=$jq("#O_AccountTop");//获取用户帐号控件
    var O_Psd=$jq("#O_PsdTop");//获取密码控件
	var v_account=$jq.trim(O_Account.val());
	var v_psd=$jq.trim(O_Psd.val());
	if(v_account=="") { alert("帐号不能为空！");O_Account.val("");O_Account.focus(); }
	else if(v_psd=="") { alert("密码不能为空！");O_Psd.val("");O_Psd.focus(); }
	else {
		$jq.post(basePath + "common/userLoginCheck.php",{ account:v_account, psd:v_psd },function(data) {//alert(data);
			eval(data);
			if(ary[0]=="success") { window.location.reload(); }
			if(ary[0]=="error") {
				alert(ary[1]);
				if(ary[2]=="account is null") { O_Account.val("");O_Account.focus(); }
				else if(ary[2]=="password is null") { O_Psd.val("");O_Psd.focus(); }
				else if(ary[2]=="account not exsit") { O_Account.focus(); }
				else if(ary[2]=="account is stopped") { O_Account.focus(); }
				else if(ary[2]=="password error") { O_Psd.val("");O_Psd.focus(); }
			}
		});
    }
}
//注册
function topRegister(){
	//启动浏览模式
	var range = getRange();
	//alert(range.width);
	var obj_doing = document.getElementById("doing");
	if(range != null && obj_doing != null) {
		obj_doing.style.width = range.width + "px";
		obj_doing.style.height = (range.height+100)+ "px";
		obj_doing.style.display = "block";
	}
	var divReg = document.getElementById("divReg");
	if(divReg != null) { divReg.style.display = ""; }
	var divRegF = document.getElementById("divRegF");
	if(divRegF != null) { divRegF.style.display = ""; }
}
//忘记密码
function topForget(){
	//alert("forget");
}
