/*!
 * liux 
 * 20100621
 */
	function login() {
		if($("#userid").val() == "") {
			alert("对不起，请输入您的用户名！");
		} else if($("#pwd").val() == "") {
			alert("对不起，请输入您的密码！");
		} else {
			$.post("/logon.do",
					{
				        userid : encodeURIComponent($("#userid").val()),
				        pwd : encodeURIComponent($("#pwd").val()),
				        ajax : "ajax"
					}, 
					function (data, textStatus) {
						if(data == "OK") {
							/***
							if(window.top.frames[0] != null) {
								window.top.frames[0].location.reload(true);
							}
							if(window.top.frames["loginHomePage"] != null)
								window.top.frames["loginHomePage"].location.reload(true);
							***/
							window.top.location.href="/homePageUc.do";
						}
						else {
							loginErrForm.onsubmit = "";
							loginErrForm.err.value = data;
							loginErrForm.submit();					
						}
					}
				);
		}
	}
	
	function login2() {
		if($("#useridbig").val() == "") {
			$("#pwderror").html("<font color = \"red\">对不起，请输入您的用户名！</font>");
		} else if($("#pwdbig").val() == "") {
			$("#pwderror").html("<font color = \"red\">对不起，请输入您的密码！</font>");
		} else {
			$.post("/logon.do",
					{
				        userid : encodeURIComponent($("#useridbig").val()),
				        pwd : encodeURIComponent($("#pwdbig").val()),
				        cookieStatus : encodeURIComponent($("#cookieStatus").val()),
				        ajax : "ajax"
					}, 
					function (data, textStatus) {
						if(data == "OK") {
							if(window.top.frames[0] != null) {
								window.top.frames[0].location.reload(true);
							}
							window.top.location.href="/homePageUc.do";
						}
						else {
							var warnCont = "<font color = \"red\">"+data+"</font>";
							$("#pwderror").html(warnCont);
						}
					}
				);
		}
	}	
	
	function logindetail() {
		if($("#useridbig").val() == "") {
			$("#pwderror").html("<font color = \"red\">" + "对不起，请输入您的用户名！" + "</font>");
		} else if($("#pwdbig").val() == "") {
			$("#pwderror").html("<font color = \"red\">" + "对不起，请输入您的密码！" + "</font>");
		}  else {
			$.post("/logon.do",
					{
				        userid : encodeURIComponent($("#useridbig").val()),
				        pwd : encodeURIComponent($("#pwdbig").val()),
				        cookieStatus : encodeURIComponent($("#cookieStatus").val()),
				        ajax : "ajax"
					}, 
					function (data, textStatus) {
						if(data == "OK") {
							if(window.top.frames[0] != null) {
								window.top.frames[0].location.reload(true);
							}
							window.location.reload(true);
						}
						else {
							var warnCont = "<font color = \"red\">"+data+"</font>";
							$("#pwderror").html(warnCont);
						}
					}
				);
		}
	}	