function getobj(obj){return document.getElementById(obj);}
function CreateXmlHttp(){
	var XmlHttp;
	if(window.ActiveXObject){
		XmlHttp=new ActiveXObject("microsoft.XMLHTTP");
	}else if(window.XMLHttpRequest){
		XmlHttp=new XMLHttpRequest();
	}
	return XmlHttp;
}

function index_thread()
{
	var url='/includes/index_threads.php?t='+(new Date()).getTime();
	getobj('index_thread').innerHTML='数据加载中....';
	var XmlHttp1=CreateXmlHttp();
	XmlHttp1.open("GET",url,true);
	XmlHttp1.setRequestHeader("If-Modified-Since","400");
	XmlHttp1.onreadystatechange=function (){
		if(XmlHttp1.readyState==4)
		{	
			if(XmlHttp1.status==200)
			{
				getobj('index_thread').innerHTML=XmlHttp1.responseText;
			}
		}
	}
	XmlHttp1.send(null);
}


function index_knowing()
{
	var url='/includes/index_knowing.php?t='+(new Date()).getTime();
	getobj('index_thread').innerHTML='数据加载中....';
	var XmlHttp1=CreateXmlHttp();
	XmlHttp1.open("GET",url,true);
	XmlHttp1.setRequestHeader("If-Modified-Since","400");
	XmlHttp1.onreadystatechange=function (){
		if(XmlHttp1.readyState==4)
		{	
			if(XmlHttp1.status==200)
			{
				getobj('index_knowing').innerHTML=XmlHttp1.responseText;
			}
		}
	}
	XmlHttp1.send(null);
}


function index_rumors()
{
	var url='/includes/index_rumors.php?t='+(new Date()).getTime();;
	getobj('index_rumors').innerHTML='数据加载中....';
	var XmlHttp=CreateXmlHttp();
	XmlHttp.open("GET",url,true);
	XmlHttp.setRequestHeader("If-Modified-Since","400");
	XmlHttp.onreadystatechange=function (){
		if(XmlHttp.readyState==4)
		{	
			if(XmlHttp.status==200)
			{
				getobj('index_rumors').innerHTML=XmlHttp.responseText;
			}
		}
	}
	XmlHttp.send(null);
}

function HC_Get_Photo(row,column,viewstyle)
{
	if(!viewstyle) viewstyle=1;
	var url='/includes/get_photo.php?row='+row+'&column='+column+'&style='+viewstyle;
	getobj('view_photo').innerHTML='数据加载中....';
	var XmlHttp=CreateXmlHttp();
	XmlHttp.open("GET",url,true);
	XmlHttp.setRequestHeader("If-Modified-Since","400");
	XmlHttp.onreadystatechange=function (){
		if(XmlHttp.readyState==4)
		{	
			if(XmlHttp.status==200)
			{
				getobj('view_photo').innerHTML=XmlHttp.responseText;
			}
		}
	}
	XmlHttp.send(null);
}

function author_info(authorName)
{
	var url='/includes/bball/author_info.php?author='+authorName;
	getobj('author_info').innerHTML='数据加载中....';
	var XmlHttp=CreateXmlHttp();
	XmlHttp.open("GET",url,true);
	XmlHttp.setRequestHeader("context-type","text/xml;charset=GBK");
	XmlHttp.setRequestHeader("If-Modified-Since","400");
	XmlHttp.onreadystatechange=function (){
		if(XmlHttp.readyState==4)
		{	
			if(XmlHttp.status==200)
			{
				getobj('author_info').innerHTML=XmlHttp.responseText;
			}
		}
	}
	XmlHttp.send(null);
}

function draft_news(id)
{
	var url='/includes/bball/draft_news_upandnext.php?id='+id;
	getobj('upAndNext').innerHTML='数据加载中....';
	var XmlHttp=CreateXmlHttp();
	XmlHttp.open("GET",url,true);
	XmlHttp.setRequestHeader("context-type","text/xml;charset=gb2312");
	XmlHttp.setRequestHeader("If-Modified-Since","400");
	XmlHttp.onreadystatechange=function (){
		if(XmlHttp.readyState==4)
		{	
			if(XmlHttp.status==200)
			{
				getobj('upAndNext').innerHTML=XmlHttp.responseText;
			}
		}
	}
	XmlHttp.send(null);
}
function hot_rumors()
{
	var url='/includes/hot_rumors.php';
	getobj('hot_rumors').innerHTML='数据加载中....';
	var XmlHttp=CreateXmlHttp();
	XmlHttp.open("GET",url,true);
	XmlHttp.setRequestHeader("If-Modified-Since","400");
	XmlHttp.onreadystatechange=function (){
		if(XmlHttp.readyState==4)
		{	
			if(XmlHttp.status==200)
			{
				getobj('hot_rumors').innerHTML=XmlHttp.responseText;
			}
		}
	}
	XmlHttp.send(null);
}


function get_score(matchid)
{
	var url='includes/index_score.php?match_id='+matchid;
	//getobj('hot_rumors').innerHTML='数据加载中....';
	var XmlHttp=CreateXmlHttp();
	XmlHttp.open("GET",url,true);
	XmlHttp.setRequestHeader("If-Modified-Since","400");
	XmlHttp.onreadystatechange=function (){
		if(XmlHttp.readyState==4)
		{	
			if(XmlHttp.status==200)
			{
				
				getobj('score').innerHTML=XmlHttp.responseText;
			}
		}
	}
	XmlHttp.send(null);
	setTimeout("get_score('11988')",20000);
}
