//用户登录
//---------------------------前台用户登录
function b_perloginbutton_ok(){
var name =$.trim($("#buserNameID").val());
var pwd =$.trim($("#bpasswordID").val());
var yzm =$.trim($("#byzmID").val());
var element = document.getElementById("byzmID");
var offsetTop = element.offsetTop; 
var offsetLeft = element.offsetLeft; 
while( element = element.offsetParent ) 
{ 
    offsetTop += element.offsetTop; 
    offsetLeft += element.offsetLeft; 
} 
if(name.length==0){
	$.messager.show(0, '用户名不能为空',1000,offsetTop,offsetLeft+65);
	return false;
}
var patrn=/^[a-zA-Z][a-zA-Z0-9_]{5,15}$/;
if(!patrn.test(name)){ 
	$.messager.show(0, '用户名以字母开头,长度为6-15位的字母、数字、下划线组合。', 1000,offsetTop,offsetLeft+65);
	return false;
 }
if(pwd.length==0){
	$.messager.show(0, '密码不能为空', 1000,offsetTop,offsetLeft+65);
	return false;
}
if(yzm.length==0){
	$.messager.show(0, '验证码不能为空',1000,offsetTop,offsetLeft+65);
	return false;
}
if(viableTextPer!=yzm){
	$.messager.show(0, '验证码不正确',1000,offsetTop,offsetLeft+65);
	return false;
}
  $("#formId").submit();
}
//个人专门登录页面
var check = true;
$(document).ready(function(){
			$("#auserNameID").blur(function(){
			    var value = $.trim(this.value);
				var patrn=/^[a-zA-Z][a-zA-Z0-9_]{5,15}$/;
				if(!patrn.test(value)){ 
				     $("#auserNameIDDiv").css('color','red');
					 $("#auserNameIDDiv").html("用户名以字母开头,长度为6-15位的字母、数字、下划线组合。");
					  check = false;
				 }
			});
			$("#auserNameID").focus(function(){
				$("#auserNameIDDiv").css('color','');
				check = true;
			});
			
			$("#apwssID").blur(function(){
			    var value = $.trim(this.value);
				var patrn=/^[a-zA-Z0-9_]{6,15}$/;
				if(!patrn.test(value)){ 
				     $("#apwssIDDIV").css('color','red');
					 $("#apwssIDDIV").html("6位以上的字母与数字,下划线的组合，请不要包含中文字符。");
					 check = false;
				 }
			});
			$("#apwssID").focus(function(){
				$("#apwssIDDIV").css('color','');
				check = true;
			});			
			
			$("#acheckNumberID").blur(function(){
			    var value = $.trim(this.value);
				var patrn=/^[0-9]{5,5}$/;
				if(!patrn.test(value)){ 
				     $("#acheckNumberIDDIV").css('color','red');
					 $("#acheckNumberIDDIV").html("请输入5位数字的验证码");
					 check = false;
				 }
			});
			$("#acheckNumberID").focus(function(){
				$("#acheckNumberIDDIV").css('color','');
				check = true;
			});			
});
function perlogin_button_ok(){
   $("#userNameID").blur();
   $("#pwssID").blur();
   $("#checkNumberID").blur();
   var yzm = $("#acheckNumberID").val();
   if(yzm!=viableTextPer){
     $("#acheckNumberIDDIV").css('color','red');
     $("#acheckNumberIDDIV").html("验证码错误");
     return false;
   }
   if(!check){
        return false;
   } 
  $("#formId").submit();
}
//企业前台登录
function org_button_ok(){
var name =$.trim($("#orgUserName").val());
var pwd =$.trim($("#orgPassword").val());
var yzm =$.trim($("#orgYzm").val());
var element = document.getElementById("orgYzm");
var offsetTop = element.offsetTop; 
var offsetLeft = element.offsetLeft; 
while( element = element.offsetParent ) 
{ 
    offsetTop += element.offsetTop; 
    offsetLeft += element.offsetLeft; 
} 
if(name.length==0){
	$.messager.show(0, '用户名不能为空',1000,offsetTop,offsetLeft+65);
	return false;
}
var patrn=/^[a-zA-Z][a-zA-Z0-9_]{5,15}$/;
if(!patrn.test(name)){ 
	$.messager.show(0, '用户名以字母开头,长度为6-15位的字母、数字、下划线组合。', 1000,offsetTop,offsetLeft+65);
	return false;
 }
if(pwd.length==0){
	$.messager.show(0, '密码不能为空', 1000,offsetTop,offsetLeft+65);
	return false;
}
if(yzm.length==0){
	$.messager.show(0, '验证码不能为空',1000,offsetTop,offsetLeft+65);
	return false;
}
if(viableTextOrg!=yzm){
	$.messager.show(0, '验证码不正确',1000,offsetTop,offsetLeft+65);
	return false;
}
  $("#orgFormId").submit();
}
//显示更多的全职-----兼职
function showMore(f,full,part){
if(f=='0'){
$("#moreJobID").val(full);
$("#moreJobIDForm").submit();
}
if(f=='1'){
$("#moreJobID").val(part);
$("#moreJobIDForm").submit();
}
}
