/**
*@function:ajax 请求处理
*@author:tiger
*@email:li284362085@163.com
*@copyright:ActiveNet Logics IT Co.,Ltd.
*@date:2009-07-15
*@params:reqUrl请求页面url,reqParams 请求参数,callFunction 回调方法
* reqType 请求方法(POST(默认),GET), reqDataType 请求时所返回的数据类型(default json)
*@example: reqAjax("friendslistAction.php","reqAct=getonlineusers_bypage",callback_getUserListToGroup);
**/

/*指定刷新区域*/
var zonesToRefresh="";
/*请求方法*/
function reqAjax(reqUrl,reqParams,callFunction,reqType,reqDataType){
	if(typeof(reqParams)!="string"){
		reqParams="";
	}
	if(typeof(reqDataType)=="undefined"){
		reqDataType="json";
	}
	if(typeof(reqType)=="undefined" || reqType==""){
		reqType="POST";
	}
$.ajax({
    type:reqType,
    url:reqUrl,
    dataType:reqDataType,
    data:reqParams,
    beforeSend:function(XMLHttpRequest){
    	
    },
    success:function(msg){
    	  if(typeof(callFunction)=="string"){
           eval(callFunction+"('"+msg+"')");
    	  }else if(typeof(callFunction)=="function"){
    	  	callFunction.call(callFunction,msg);
    	  }
        },
   complete:function(XMLHttpRequest,textStatus){
            //隐藏正在查询图片
        },
  error:function(http){//alert(http.responseText);
            //错误处理
       }
    });
}