//前台用户登录验证脚本
$(function () {
    var UserName = $("#UserName"),
	password = $("#password"), allFields = $([]).add(UserName).add(password);
    function ValidTemp() {
        var bValid = true;
        allFields.removeClass("ui-state-error");
        bValid = bValid && checkLength(UserName, "登录帐号", 4, 255);
        bValid = bValid && checkLength(password, "密码", 6, 16);
        return bValid;
    };
    $("#subbtn").click(function () {
        return ValidTemp();
    });

});