

var req;
function initRequest() {
	if (window.XMLHttpRequest) {
		req = new XMLHttpRequest();//Mozilla
	} else {
		if (window.ActiveXObject) {//IE
			try {
				req = new ActiveXObject("MSXML2.XMLHTTP");
			}
			catch (e) {
				try {
					req = new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch (e) {
				}
			}
		}
	}
}
/**
*用于首页栏目－信息详细统计
*/
function indexStatics(infoId,categoryId){
	var url = "index_ajax.jsp?infoId1="+infoId+"&categoryId1="+categoryId;
    	
    initRequest();
    req.onreadystatechange = function(){
    	//alert(req.responseText);
    };
    req.open("GET", url, true); 
    req.send(null);

}
/**
* 由于使用iframe引入子目录文件,需对请求url进行重新定位
*为了方便，故重新写了这样一个方法.此方法主要用在首页交行新闻、媒体看交行、国内宏观、国际经济统计中
*/
function indexStaticsYW(infoId,categoryId){
	var url = "../index_ajax.jsp?infoId1="+infoId+"&categoryId1="+categoryId;
    initRequest();
    req.onreadystatechange = function(){
    	//alert(req.responseText);
    };
    req.open("GET", url, true); 
    req.send(null);

}

/**
*用于分行首页统计
*/
function fhIndexStatics(infoId,categoryId,fhid){
	var url = "../fhIndex_ajax.jsp?infoId1="+infoId+"&categoryId1="+categoryId+"&fhid="+fhid;
    initRequest();
    req.onreadystatechange = function(){
    	//alert(req.responseText);
    };
    req.open("GET", url, true); 
    req.send(null);
}






