function pwdStrong(pwd){
        //密码强度
        var strongImg = $("#strongImg");
        var imgSrc = strongImg.attr("src");
	    var ls = 0;
	    if (pwd.match(/[a-z]/g)){ ls++; }
	    if(pwd.match(/[A-Z]/g)){ ls++; }
	    if (pwd.match(/[0-9]/g)){ ls++; }
	    if (pwd.match(/[_#]/)){ ls++; }
	    if (pwd.length <6 || ls >16){   
	        ls = 1;
	    }
	    if(ls>3){
	        ls=3;
	    }
	    if(! checkPwd(pwd) || ! swPwd(pwd)) ls = 0;
	    switch(ls){
	        case 0 : imgSrc = imgSrc.replace(/strength_[0-9]/, "strength_0"); break;
	        case 1 : imgSrc = imgSrc.replace(/strength_[0-9]/, "strength_1");break;
	        case 2 : imgSrc = imgSrc.replace(/strength_[0-9]/, "strength_2");break;
	        case 3 : imgSrc = imgSrc.replace(/strength_[0-9]/, "strength_3");break;
	        default : imgSrc = imgSrc.replace(/strength_[0-9]/, "strength_0");
	    }
	    
	    strongImg.attr("src", imgSrc);
}

function checkPwd(val){
     var reg1 = /[\w_#]{6,16}/;
     var same = function(){
         var ch = val.substring(0, 1);
         var str = "";
         for(var i=0; i<val.length; i++){
             str += ch;
         }
         if(str == val){
             return true;
         }else{
             return false;
         }
     }
     
     if(same() || val.match(reg1) != val){
         return false;
     }
     
     return true;
}

function swPwd(pwd){
	var cnt = 0;
	if(/[0-9]+/.test(pwd)){
		cnt ++;
	}
	if(/[a-zA-Z]+/.test(pwd)){
		cnt ++;
	}
	if(/[_#]+/.test(pwd)){
		cnt ++;
	}
	
	return cnt >=2;
}

function showInfo(code){
   if(code == ""){
   		$("#showInfo").html('');
   		return;
   	}
   $("#showInfo").html('<img src="' + appServer + '/images/front/error.gif"/>' + "<font color='red'>" + code + "</font>");
}
