document.onkeydown=function(event){
    var e = event || window.event || arguments.callee.caller.arguments[0];
    if (e && e.keyCode == 13) {
		var obj = event.srcElement ? event.srcElement : event.target;
		var name=obj.getAttribute('name');
		if(name=='keyword'||!name)return false;
        login_in(0);
    } 
}
function login_in(k){
    var name=$("#username").val();
    var pwd=$("#password").val();
    var verify=$("#verify").val();
    var query= new Object();
    query = $("form[name='myform']").serialize();
    $.ajax({
        type: "POST",
        url: APP + "Login/dologin",
        data: query,
        success: function(data){
            if(data.status == 1){
                if(k>0){
                    $.showSuccess(data.info,0,'hc');
					 window.location.href = data.url;
                    //location.reload();
                }else {
                    $.showSuccess(data.info, 0, 'hc');
                    window.location.href = data.url;
                }
            }else{
                $.showErr(data.info,0,'hc');
                $('#verify_img').attr('src',APP+"Login/verify.html#"+Math.random());
            }
        }
    });
}