
jQuery.noConflict();
var $j = jQuery;
var _tips = new LoginTips();
$j().ready(function () {
	if (document.getElementById("loginForm")) {
		var inputs = document.getElementById("loginForm").getElementsByTagName("input");
		$j(inputs).each(function (index, element) {
			if (element.name) {
				$j(element).focus(function () {
					hideTips();
				});
			}
		});
		$j("#loginForm").submit(function () {
			hideTips();
			var ok = validate();
			if (ok) {
				$j("#loadingDiv").show();
			}
			return ok;
		});
	}
});
function validate() {
	var mp = $j.trim($j("#mp").val());
	var pw = $j.trim($j("#pw").val());
	var res = false;
	if (!mp) {
		showTip(_tips.requriedMp);
	} else {
		if (!pw) {
			showTip(_tips.requriedPw);
		} else {
			res = true;
		}
	}
	return res;
}
function showTip(msg) {
	$j("#tip_validate_jq_tip").html(msg);
	$j("#tip_validate_jq").show();
}
function hideTips() {
	$j("#tip_validate_jq").hide();
	$j("#tip_actionerror").hide();
}

