show_userinfo.innerHTML="登录/注册";var WebUrl="/";
function LogOut(){
$.get(WebUrl+"e/member/AjaxLog/?enews=exit",function(msg){
if(msg=='exitsuccess'){
$("#show_userinfo").html('登录/注册');
$('#shortinfo').html("登录/注册");
alert('退出成功!');
}
})
}
function AjaxReg(){
//self.location=WebUrl+'e/member/register/index.php?groupid=1';
AjaxLog();
switchTag('_xka','_xka_list',2,2,'conxk1','conxk2');
}
function CheckReg(key,value){
if(value!=''){
var data = {},key=key;
data['enews']='register';
data[key]=value;
if(key=='repassword'){
var pass=$("#password").val(); //获取密码输入框的值
data['password']=pass;
}
$.ajax({
type:"POST",url:WebUrl+"e/member/AjaxLog/",dataType:"html",data:data
,beforeSend:function(){
$('.'+key).html('')
}
,success:function(msg){
if(!msg){
$('.'+key).html(''); //这里的代码已函数checkpass()里面的一段代码相对应!
//checkpass('all');
}else{
//alert(msg);
$('.'+key).html(''+msg+'');
//checkpass('all');
return false;
}
}
});
}else{
if(key='username'){
var red='用户名';
}
if(key='password'){
var red='密码';
}
if(key='repassword'){
var red='重复密码';
}
if(key='email'){
var red='邮箱';
}
$('.'+key).html(''+red+'不允许为空!');
}
}
function checkpass(all){
var username=$("#username").val();
var pass=$("#password").val();
var pass2=$("#repassword").val();
var email=$("#email").val();
var checkin=$("#checkin").is(':checked');
if(username!='' && pass2!='' && pass==pass2 && checkin==true && email!=''){
$('#Reg-sub').removeAttr('disabled');
$('#checkreg').show().html('全部填写正确!');
}else{
document.getElementById("Reg-sub").disabled = true;
$('#checkreg').hide();
if(all){
$('#checkreg').show().html('有必选项没填写正确!');
}
}
}
(function($){
$.fn.extend({
leanModal:function(options){
var defaults={
top:100,overlay:0.5,closeButton:null
};
var overlay=$("