/* 
最后更新 2009-9-1 by 56770.Kingdge
*/
var xmlHttp_56770 = false;
function xmlHttpInit()
{
	try {
	  xmlHttp_56770 = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
	  try {
		xmlHttp_56770 = new ActiveXObject("Microsoft.XMLHTTP");
	  } catch (e2) {
		xmlHttp_56770 = false;
	  }
	}
	if (!xmlHttp_56770 && typeof XMLHttpRequest != 'undefined') {
	  xmlHttp_56770 = new XMLHttpRequest();
	}
}
function NewData()
{
	xmlHttpInit()
	xmlHttp_56770.open("GET", "Ajax_Data.asp?t="+Math.random(), true);
	xmlHttp_56770.onreadystatechange = GetNewData;
	xmlHttp_56770.send(null); 
}
function GetNewData()
{
  if (xmlHttp_56770.readyState < 4) {
  }
  if (xmlHttp_56770.readyState == 4) {
	var response = xmlHttp_56770.responseText.split("|");
	var cache=response[0]/1;
	var skin=response[1]/1;
	if (skin > 0){
		document.getElementById("ajax_skin").innerHTML="<a href=\"admin_skin_save.asp?action=all&BackType=1\" onmouseover=\"parent.menu.disp(6);\" onClick=\"top.document.getElementById('topTitle').innerHTML='模板管理';\" title=\"点此更新模板，更新模板后前台网页界面才会更新\" target=\"right\"><font color=red>模 板</font></a>";
	}else{
		document.getElementById("ajax_skin").innerHTML="<a href=\"admin_skin.asp\" onmouseover=\"parent.menu.disp(6);\" onClick=\"top.document.getElementById('topTitle').innerHTML='模板管理';\" title=\"模板管理\" target=\"right\">模 板</a>";
	}
	if (cache > 0){
		document.getElementById("ajax_cache").innerHTML="<a href=\"admin_data.asp?action=cacheupdate&BackType=1\" onmouseover=\"parent.menu.disp(7);\" onClick=\"top.document.getElementById('topTitle').innerHTML='网站发布';\" title=\"点此更新缓存，更新缓存后前台数据才会更新\" target=\"right\"><font color=red>发 布</font></a>";
	}else{
		document.getElementById("ajax_cache").innerHTML="<a href=\"admin_data.asp?action=cacheupdate\" onmouseover=\"parent.menu.disp(7);\" onClick=\"top.document.getElementById('topTitle').innerHTML='网站发布';\" title=\"更新缓存\" target=\"right\">发 布</a>";
	}
  }
}
setInterval('NewData()',60000*5);