(),time:new Date().getTime()},
		        dataType:"json",
		        cache:false,
		        success: function(data){
		       	 if("200" == data.status){
		       		 window.location.href=_ctx+"/index";
		       	 }else{
		       		 $("#error-msg").html(data.message);
		       	 }
		        }
			})
		}
    	return false;
    });
    
    function checkLogin(){
    	if($("input[name='username']").val() == ""){
    		alert("username cannot be empty")
    		$("input[name='username']").focus();
    		return false