<!-- 首页登录表单 -->
<script>
jQuery(document).ready(function($) {
	$(".tabmenu ul li").click(function(){
		var idx=$(this).index("li");
		$(this).addClass("selected").siblings().removeClass("selected");
		$(".tabbox>div").eq(idx).show().siblings().hide();
	});
	// 登录注册切换
	$(".changeToReg").click(function() {
		$(".loging_box").hide();
		$(".reg_box").show();
	});
	$(".changeToLogin").click(function() {
		$(".loging_box").show();
		$(".reg_box").hide();
	});
	//验证码随机
	$(".getcode").live('click',function(){
		$(this).attr('src','{#$QISHI.site_dir#}include/imagecaptcha.php?t='+Math.random()+'');
	});
	/*==================================================验证==================================================*/
	// 求职者注册
	var demo_personal_reg=$("#Form_personal_reg").Validform({
		ajaxPost:true,
		tiptype:function(msg,o,cssctl){
			if(!o.obj.is("form")){
				var objtip=o.obj.next().find(".Validform_checktip");
				cssctl(objtip,o.type);
				objtip.text(msg);
				var infoObj=o.obj.next();
				if(o.type==2){
					infoObj.fadeOut(2000);
				}else{
					if(infoObj.is(":visible")){return;}
					var left=0,
						top=o.obj.height()-52;
					if(o.obj.hasClass('short')) {
						top=o.obj.height()-48;
					}
					infoObj.css({
						left:left,
						top:top
					}).show();
				}
			}	
		},
		callback:function(data){
			if(data.responseText=="err") {
				alert("注册失败,请稍后重试");
			} else {
				$("html").append(data.responseText);
			}
		}
	});
	$('#btn_personal_reg').live('click',function(){
		demo_personal_reg.ajaxPost();
	});
	// 求职者登录
	var demo_personal_login=$("#Form_personal_login").Validform({
		ajaxPost:true,
		tiptype:function(msg,o,cssctl){
			if(!o.obj.is("form")){
				var objtip=o.obj.next().find(".Validform_checktip");
				cssctl(objtip,o.type);
				objtip.text(msg);
				var infoObj=o.obj.next();
				if(o.type==2){
					infoObj.fadeOut(2000);
				}else{
					if(infoObj.is(":visible")){return;}
					var left=0,
						top=o.obj.height()-52;
					infoObj.css({
						left:left,
						top:top
					}).show();
				}
			}	
		},
		callback:function(data){
			if(data.responseText=="err") {
				alert("用户名或密码错误");
			} else {
				$("html").append(data.responseText);
			}
		}
	});
	$('#btn_personal_login').live('click',function(){
		demo_personal_login.ajaxPost();
	});
	// 猎头注册
	var demo_hunter_reg=$("#Form_hunter_reg").Validform({
		ajaxPost:true,
		tiptype:function(msg,o,cssctl){
			if(!o.obj.is("form")){
				var objtip=o.obj.next().find(".Validform_checktip");
				cssctl(objtip,o.type);
				objtip.text(msg);
				var infoObj=o.obj.next();
				if(o.type==2){
					infoObj.fadeOut(2000);
				}else{
					if(infoObj.is(":visible")){return;}
					var left=0,
						top=o.obj.height()-52;
					if(o.obj.hasClass('short')) {
						top=o.obj.height()-48;
					}
					infoObj.css({
						left:left,
						top:top
					}).show();
				}
			}	
		},
		callback:function(data){
			if(data.responseText=="err") {
				alert("注册失败,请稍后重试");
			} else {
				$("html").append(data.responseText);
			}
		}
	});
	$('#btn_hunter_reg').live('click',function(){
		demo_hunter_reg.ajaxPost();
	});
	// 猎头登录
	var demo_hunter_login=$("#Form_hunter_login").Validform({ 
		ajaxPost:true,
		tiptype:function(msg,o,cssctl){
			if(!o.obj.is("form")){
				var objtip=o.obj.next().find(".Validform_checktip");
				cssctl(objtip,o.type);
				objtip.text(msg);
				var infoObj=o.obj.next();
				if(o.type==2){
					infoObj.fadeOut(2000);
				}else{
					if(infoObj.is(":visible")){return;}
					var left=0,
						top=o.obj.height()-52;
					infoObj.css({
						left:left,
						top:top
					}).show();
				}
			}	
		},
		callback:function(data){
			if(data.responseText=="err") {
				alert("用户名或密码错误");
			} else {
				$("html").append(data.responseText);
			}
		}
	});
	$('#btn_hunter_login').live('click',function(){
		demo_hunter_login.ajaxPost();
	});
	// 企业注册
	var demo_company_reg=$("#Form_company_reg").Validform({
		ajaxPost:true,
		tiptype:function(msg,o,cssctl){
			if(!o.obj.is("form")){
				var objtip=o.obj.next().find(".Validform_checktip");
				cssctl(objtip,o.type);
				objtip.text(msg);
				var infoObj=o.obj.next();
				if(o.type==2){
					infoObj.fadeOut(2000);
				}else{
					if(infoObj.is(":visible")){return;}
					var left=0,
						top=o.obj.height()-52;
					if(o.obj.hasClass('short')) {
						top=o.obj.height()-48;
					}
					infoObj.css({
						left:left,
						top:top
					}).show();
				}
			}	
		},
		callback:function(data){
			if(data.responseText=="err") {
				alert("注册失败,请稍后重试");
			} else {
				$("html").append(data.responseText);
			}
		}
	});
	$('#btn_company_reg').live('click',function(){
		demo_company_reg.ajaxPost();
	}); 
	// 企业登录
	var demo_company_login=$("#Form_company_login").Validform({ 
		ajaxPost:true,
		tiptype:function(msg,o,cssctl){
			if(!o.obj.is("form")){
				var objtip=o.obj.next().find(".Validform_checktip");
				cssctl(objtip,o.type);
				objtip.text(msg);
				var infoObj=o.obj.next();
				if(o.type==2){
					infoObj.fadeOut(2000);
				}else{
					if(infoObj.is(":visible")){return;}
					var left=0,
						top=o.obj.height()-52;
					infoObj.css({
						left:left,
						top:top
					}).show();
				}
			}	
		},
		callback:function(data){
			if(data.responseText=="err") {
				alert("用户名或密码错误");
			} else {
				$("html").append(data.responseText);
			}
		}
	});
	$('#btn_company_login').live('click',function(){
		demo_company_login.ajaxPost();
	});
	/*==================================================End==================================================*/
	// 一周内自动登录
	$("i.checkboxui").click(function(){
		if ($(this).hasClass('checkboxui-checked')) {
			$(this).parents(".control").find("input[name=expire]").val($(this).attr("data"));
		} else {
			$(this).parents(".control").find("input[name=expire]").val("");
		}
	})
	// 是否同意注册协议
	registrationAgreement("#personal_agree", "#btn_personal_reg");
	registrationAgreement("#hunter_agree", "#btn_hunter_reg");
	registrationAgreement("#company_agree", "#btn_company_reg");
	function registrationAgreement (agreeID, btnID) {
		$(agreeID + " i.checkboxui").click(function(event) {
			if ($(this).hasClass('checkboxui-checked')) {
				$(btnID).removeClass('cc').removeAttr("disabled");
			} else {
				$(btnID).addClass('cc').attr('disabled',true);
			}
		})
	}
});
</script>
<div class="login_box">
			<div class="tabmenu">
       			<ul class="clearfix">
       				<li class="selected">求职者</li>
       				<li>猎头顾问</li>
       				<li>企业HR</li>
          				<div style="clear:both"></div>
        			</ul>
  			</div>
		  	<div class="tabbox">
		  		<div>
		  			<!-- 个人登录 -->
		  			<form id="Form_personal_login" name="Form_personal_login" method="post" action="{#$QISHI.site_dir#}plus/ajax_user.php?act=do_login">
		  				<input type="hidden" name="utype" value="2">
			  			<div class="login_form loging_box">
				  			<div class="control">
				  				<input type="text" name="username" tip="请输入邮箱或手机号" altercss="gray" placeholder="请输入邮箱或手机号" class="login_box_input large" datatype="e|m" sucmsg="输入格式正确" nullmsg="请输入邮箱或手机号" errormsg="输入格式不正确">
				  				<div class="valid_info"><span class="Validform_checktip">请输入邮箱</span><span class="valid_dec"><s class="dec1">&#9670;</s><s class="dec2">&#9670;</s></span></div>
				  			</div>
				  			<div class="control">
				  				<input type="password" tip="请输入密码" altercss="gray" name="password" placeholder="请输入密码" class="login_box_input large" datatype="*6-15" nullmsg="请输入密码" errormsg="密码范围在6~15位之间">
				  				<div class="valid_info"><span class="Validform_checktip">请输入密码</span><span class="valid_dec"><s class="dec1">&#9670;</s><s class="dec2">&#9670;</s></span></div>
				  			</div>
				  			<div class="control clearfix auto_login_box">
				  				<label class="auto_login"><input type="checkbox" data="7">一周内自动登录</label>
				  				<input type="hidden" name="expire" value="">
				  				<a href="{#$QISHI.site_dir#}user/user_getpass.php?act=enter">忘记密码？</a>
				  			</div>
				  			<div class="control">
				  				<button class="loginNow login_now_btn" utype="2" id="btn_personal_login" >立即登录</button>	
				  			</div>
							<div class="regin_now">
								还没有求职帐号？<a href="javascript:;" class="changeToReg">立即注册</a>
							</div>
							<div class="sns_login_box clearfix">
								<span>使用合作帐号登录</span>
								<div class="sns_login"><a href="{#$QISHI.site_dir#}user/{#if $QISHI.qq_logintype=='1'#}connect_qq_client.php{#else#}connect_qq_server.php{#/if#}"class="sns_icon qq" title="使用QQ号登录"></a><a href="{#$QISHI.site_dir#}user/connect_taobao.php"class="sns_icon taobao" title="使用淘宝账号登录"></a><a href="{#$QISHI.site_dir#}user/connect_sina.php"class="sns_icon sina" title="使用微博账号登录"></a></div>
							</div>
			  			</div>
		  			</form>
					<!-- 个人注册 -->
					<form id="Form_personal_reg" name="Form_personal_reg" method="post" action="{#$QISHI.site_dir#}plus/ajax_user.php?act=do_reg" >
						<input type="hidden" name="utype" value="2">
			  			<div class="reg_form hide reg_box">
			  				<div class="control">
			  					<input type="text" tip="请输入邮箱" altercss="gray" name="username" placeholder="请输入邮箱" class="login_box_input large" datatype="e" sucmsg="邮箱验证通过" nullmsg="请输入注册邮箱" errormsg="请输入有效的邮箱地址" ajaxurl="{#$QISHI.site_dir#}plus/ajax_user.php?act=check_reg_email">
			  					<div class="valid_info"><span class="Validform_checktip">请输入注册邮箱</span><span class="valid_dec"><s class="dec1">&#9670;</s><s class="dec2">&#9670;</s></span></div>
			  				</div>
			  				<div class="control">
			  					<input type="password" tip="请输入密码" altercss="gray" name="password" placeholder="请输入密码" class="login_box_input large" datatype="*6-15" nullmsg="请输入密码" errormsg="密码范围在6~15位之间">
			  					<div class="valid_info"><span class="Validform_checktip">请输入密码</span><span class="valid_dec"><s class="dec1">&#9670;</s><s class="dec2">&#9670;</s></span></div>
			  				</div>
			  				{#if $Verify.verify_userreg==1#}
							<div class="control">
								<input type="text" name="postcaptcha" value="" class="login_box_input short" datatype="*" sucmsg="验证码正确" nullmsg="请输入验证码" errormsg="验证码输入错误" ajaxurl="{#$QISHI.site_dir#}plus/ajax_user.php?act=check_reg_verify">
								<div class="valid_info"><span class="Validform_checktip">请输入验证码</span><span class="valid_dec"><s class="dec1">&#9670;</s><s class="dec2">&#9670;</s></span></div>
								<img src="{#$QISHI.site_dir#}include/imagecaptcha.php" class="getcode" align="absmiddle"  style="cursor:pointer; margin:3px;" title="看不请验证码？点击更换一张"  border="0"/>
							</div>
							{#/if#}
							<div class="control">
				  				<button class="regNow reg_now_btn" id="btn_personal_reg" utype="2">免费注册</button>	
				  			</div>
							<div class="server_argee clreafix">
								<p class="argee">
									<label class="auto_login" id="personal_agree"><input type="checkbox" name="agreement" id="agreement" value="1" checked="checked"/>同意</label><a href="{#$QISHI.main_domain#}agreement/">服务协议</a>
								</p>
								<p class="reg_log">已有帐号,<a class="changeToLogin">马上登录</a></p>
							</div>
			  			</div>
		  			</form>
		  		</div>
				<div class="hide">
					<!-- 猎头登录 -->
					<form id="Form_hunter_login" name="Form_hunter_login" method="post" action="{#$QISHI.site_dir#}plus/ajax_user.php?act=do_login">
						<input type="hidden" name="utype" value="3">
						<div class="login_form loging_box">
				  			<div>
					  			<div class="control">
					  				<input type="text" name="username" placeholder="请输入邮箱或手机号" tip="请输入邮箱或手机号" altercss="gray" class="login_box_input large" datatype="e|m" sucmsg="输入格式正确" nullmsg="请输入邮箱或手机号" errormsg="请输入有效的邮箱地址">
					  				<div class="valid_info"><span class="Validform_checktip">请输入邮箱</span><span class="valid_dec"><s class="dec1">&#9670;</s><s class="dec2">&#9670;</s></span></div>
					  			</div>
					  			<div class="control">
					  				<input type="password" tip="请输入密码" altercss="gray" name="password" placeholder="请输入密码" class="login_box_input large" datatype="*6-15" nullmsg="请输入密码" errormsg="密码范围在6~15位之间">
				  					<div class="valid_info"><span class="Validform_checktip">请输入密码</span><span class="valid_dec"><s class="dec1">&#9670;</s><s class="dec2">&#9670;</s></span></div>
					  			</div>
					  			<div class="control clearfix auto_login_box">
					  				<label class="auto_login"><input type="checkbox" data="7">一周内自动登录</label>
					  				<input type="hidden" name="expire" value="">
					  				<a href="{#$QISHI.site_dir#}user/user_getpass.php?act=enter">忘记密码？</a>
					  			</div>
					  			<div class="control">
					  				<button class="loginNow login_now_btn" id="btn_hunter_login" utype="3">立即登录</button>
					  			</div>
								
								<div class="regin_now">
									还没有猎头帐号？<a class="changeToReg">立即注册</a>
								</div>
								<div class="sns_login_box clearfix">
									<span>使用合作帐号登录</span>
									<div class="sns_login"><a href="{#$QISHI.site_dir#}user/{#if $QISHI.qq_logintype=='1'#}connect_qq_client.php{#else#}connect_qq_server.php{#/if#}"class="sns_icon qq" title="使用QQ号登录"></a><a href="{#$QISHI.site_dir#}user/connect_taobao.php"class="sns_icon taobao" title="使用淘宝账号登录"></a><a href="{#$QISHI.site_dir#}user/connect_sina.php"class="sns_icon sina" title="使用微博账号登录"></a></div>
								</div>
				  			</div>
				  		</div>
			  		</form>
					<!-- 猎头注册 -->
					<form id="Form_hunter_reg" name="Form_hunter_reg" method="post" action="{#$QISHI.site_dir#}plus/ajax_user.php?act=do_reg" >
						<input type="hidden" name="utype" value="3">
			  			<div class="reg_form hide reg_box">
			  				<div class="control">
			  					<input type="text" tip="请输入邮箱" altercss="gray" name="username" placeholder="请输入邮箱" class="login_box_input large" datatype="e" sucmsg="邮箱验证通过" nullmsg="请输入注册邮箱" errormsg="请输入有效的邮箱地址" ajaxurl="{#$QISHI.site_dir#}plus/ajax_user.php?act=check_reg_email">
			  					<div class="valid_info"><span class="Validform_checktip">请输入注册邮箱</span><span class="valid_dec"><s class="dec1">&#9670;</s><s class="dec2">&#9670;</s></span></div>
			  				</div>
			  				<div class="control">
			  					<input type="password" tip="请输入密码" altercss="gray" name="password" placeholder="请输入密码" class="login_box_input large" datatype="*6-15" nullmsg="请输入密码" errormsg="密码范围在6~15位之间">
			  					<div class="valid_info"><span class="Validform_checktip">请输入密码</span><span class="valid_dec"><s class="dec1">&#9670;</s><s class="dec2">&#9670;</s></span></div>
			  				</div>
			  				{#if $Verify.verify_userreg==1#}
							<div class="control">
								<input type="text" name="postcaptcha" value="" class="login_box_input short" datatype="*" sucmsg="验证码正确" nullmsg="请输入验证码" errormsg="验证码输入错误" ajaxurl="{#$QISHI.site_dir#}plus/ajax_user.php?act=check_reg_verify">
								<div class="valid_info"><span class="Validform_checktip">请输入验证码</span><span class="valid_dec"><s class="dec1">&#9670;</s><s class="dec2">&#9670;</s></span></div>
								<img src="{#$QISHI.site_dir#}include/imagecaptcha.php" class="getcode" align="absmiddle"  style="cursor:pointer; margin:3px;" title="看不请验证码？点击更换一张"  border="0"/>
							</div>
							{#/if#}
							<div class="control">
				  				<button class="regNow reg_now_btn" id="btn_hunter_reg" utype="3">免费注册</button>	
				  			</div>
							<div class="server_argee clreafix">
								<p class="argee">
									<label class="auto_login" id="hunter_agree"><input type="checkbox" name="agreement" id="agreement" value="1" checked="checked"/>同意</label><a href="{#$QISHI.main_domain#}agreement/">服务协议</a>
								</p>
								<p class="reg_log">已有帐号,<a class="changeToLogin">马上登录</a></p>
							</div>
			  			</div>
		  			</form>
				</div>
				<div class="hide">
					<!-- 企业登录 -->
					<form id="Form_company_login" name="Form_company_login" method="post" action="{#$QISHI.site_dir#}plus/ajax_user.php?act=do_login">
						<input type="hidden" name="utype" value="1">
						<div class="login_form loging_box">
				  			<div>
					  			<div class="control">
					  				<input type="text" name="username" tip="请输入邮箱或手机号" altercss="gray" placeholder="请输入邮箱或手机号" class="login_box_input large" datatype="e|m" sucmsg="输入格式正确" nullmsg="请输入邮箱或手机号" errormsg="请输入有效的邮箱地址">
					  				<div class="valid_info"><span class="Validform_checktip">请输入邮箱</span><span class="valid_dec"><s class="dec1">&#9670;</s><s class="dec2">&#9670;</s></span></div>
					  			</div>
					  			<div class="control">
					  				<input type="password" tip="请输入密码" altercss="gray" name="password" placeholder="请输入密码" class="login_box_input large" datatype="*6-15" nullmsg="请输入密码" errormsg="密码范围在6~15位之间">
				  					<div class="valid_info"><span class="Validform_checktip">请输入密码</span><span class="valid_dec"><s class="dec1">&#9670;</s><s class="dec2">&#9670;</s></span></div>
					  			</div>
					  			<div class="control clearfix auto_login_box">
					  				<label class="auto_login"><input type="checkbox" data="7">一周内自动登录</label>
					  				<input type="hidden" name="expire" value="">
					  				<a href="{#$QISHI.site_dir#}user/user_getpass.php?act=enter">忘记密码？</a>
					  			</div>
					  			<div class="control">
					  				<button class="loginNow login_now_btn" id="btn_company_login" utype="1">立即登录</button>
					  			</div>
								<div class="regin_now">
									还没有企业帐号？<a class="changeToReg">立即注册</a>
								</div>
								<div class="sns_login_box clearfix">
									<span>使用合作帐号登录</span>
									<div class="sns_login"><a href="{#$QISHI.site_dir#}user/{#if $QISHI.qq_logintype=='1'#}connect_qq_client.php{#else#}connect_qq_server.php{#/if#}"class="sns_icon qq" title="使用QQ号登录"></a><a href="{#$QISHI.site_dir#}user/connect_taobao.php"class="sns_icon taobao" title="使用淘宝账号登录"></a><a href="{#$QISHI.site_dir#}user/connect_sina.php"class="sns_icon sina" title="使用微博账号登录"></a></div>
								</div>
				  			</div>
				  		</div>
			  		</form>
					<!-- 企业注册 -->
					<form id="Form_company_reg" name="Form_company_reg" method="post" action="{#$QISHI.site_dir#}plus/ajax_user.php?act=do_reg" >
						<input type="hidden" name="utype" value="1">
			  			<div class="reg_form hide reg_box">
			  				<div class="control">
			  					<input type="text" tip="这里输入用户名" altercss="gray" name="username" placeholder="这里输入用户名" class="login_box_input large" datatype="*6-15" nullmsg="请输入用户名" errormsg="用户名范围在6~15位之间">
				  				<div class="valid_info"><span class="Validform_checktip">请输入用户名</span><span class="valid_dec"><s class="dec1">&#9670;</s><s class="dec2">&#9670;</s></span></div>
			  				</div>

			  				<div class="control">
			  					<input type="text" tip="请输入邮箱" altercss="gray" name="email" placeholder="请输入邮箱" class="login_box_input large" datatype="e" sucmsg="邮箱验证通过" nullmsg="请输入注册邮箱" errormsg="请输入有效的邮箱地址" ajaxurl="{#$QISHI.site_dir#}plus/ajax_user.php?act=check_reg_email">
			  					<div class="valid_info"><span class="Validform_checktip">请输入注册邮箱</span><span class="valid_dec"><s class="dec1">&#9670;</s><s class="dec2">&#9670;</s></span></div>
			  				</div>
			  				<div class="control">
			  					<input type="password" tip="请输入密码" altercss="gray" name="password" placeholder="请输入密码" class="login_box_input large" datatype="*6-15" nullmsg="请输入密码" errormsg="密码范围在6~15位之间">
			  					<div class="valid_info"><span class="Validform_checktip">请输入密码</span><span class="valid_dec"><s class="dec1">&#9670;</s><s class="dec2">&#9670;</s></span></div>
			  				</div>
			  				{#if $Verify.verify_userreg==1#}
							<div class="control">
								<input type="text" name="postcaptcha" value="" class="login_box_input short" datatype="*" sucmsg="验证码正确" nullmsg="请输入验证码" errormsg="验证码输入错误" ajaxurl="{#$QISHI.site_dir#}plus/ajax_user.php?act=check_reg_verify">
								<div class="valid_info"><span class="Validform_checktip">请输入验证码</span><span class="valid_dec"><s class="dec1">&#9670;</s><s class="dec2">&#9670;</s></span></div>
								<img src="{#$QISHI.site_dir#}include/imagecaptcha.php" class="getcode" align="absmiddle"  style="cursor:pointer; margin:3px;" title="看不请验证码？点击更换一张"  border="0"/>
							</div>
							{#/if#}
							<div class="control">
				  				<button class="regNow reg_now_btn" id="btn_company_reg" utype="1">免费注册</button>	
				  			</div>
							<div class="server_argee clreafix">
								<p class="argee">
									<label class="auto_login" id="company_agree"><input type="checkbox" name="agreement" id="agreement" value="1" checked="checked"/>同意</label><a href="{#$QISHI.main_domain#}agreement/">服务协议</a>
								</p>
								<p class="reg_log">已有帐号,<a class="changeToLogin">马上登录</a></p>
							</div>
			  			</div>
		  			</form>
				</div>
		  	</div>
		</div>