﻿//-------创建Ajax--------
function getXMLHttpRequest(){  
	var xmlHttp;
	var xmlHttpRequest = null; 
	if (window.ActiveXObject){
	  var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else if (window.XMLHttpRequest) {
	  var xmlHttp = new XMLHttpRequest();
	}
	return xmlHttp;
}

//-------用户登录--------
function LoginData(url){
	UserLoginHttp=getXMLHttpRequest();
	document.getElementById("UserLoginDiv").innerHTML="<p align=center><br><img border='0' src='/images/DotIco/loadingSmall.gif'>数据加载中....</p>"
	UserLoginHttp.open("get", url, true);
	UserLoginHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	UserLoginHttp.setRequestHeader("Content-Length",length);
	UserLoginHttp.onreadystatechange = LoginDataReadyStateChange;
	UserLoginHttp.send(null);
}
function LoginDataReadyStateChange(){
	if (UserLoginHttp.readyState == 4){
		if (UserLoginHttp.status == 200){
			document.getElementById("UserLoginDiv").innerHTML=(UserLoginHttp.responseText);
  		}
  	}
}

//-------特别专题--------
function TopicSelectData(url){
	TimeTopicHttp=getXMLHttpRequest();
	document.getElementById("TimeTopicDiv").innerHTML="<p align=center><br><img border='0' src='/images/DotIco/loadingSmall.gif'>数据加载中....</p>"
	TimeTopicHttp.open("get", url, true);
	TimeTopicHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	TimeTopicHttp.setRequestHeader("Content-Length",length);
	TimeTopicHttp.onreadystatechange = TopicSelectDataReadyStateChange;
	TimeTopicHttp.send(null);
}
function TopicSelectDataReadyStateChange(){
	if (TimeTopicHttp.readyState == 4){
		if (TimeTopicHttp.status == 200){
			document.getElementById("TimeTopicDiv").innerHTML=(TimeTopicHttp.responseText);
  		}
  	}
}