
var xmlHttp_swant = false;
function xmlHttpInit()
{
	try {
	  xmlHttp_swant = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
	  try {
		xmlHttp_swant = new ActiveXObject("Microsoft.XMLHTTP");
	  } catch (e2) {
		xmlHttp_swant = false;
	  }
	}
	if (!xmlHttp_swant && typeof XMLHttpRequest != 'undefined') {
	  xmlHttp_swant = new XMLHttpRequest();
	}
}
function NewData()
{
	xmlHttpInit()
	xmlHttp_swant.open("GET", "Swant_Ajax.asp?t="+Math.random(), true);
	xmlHttp_swant.onreadystatechange = GetNewData;
	xmlHttp_swant.send(null); 
}
function GetNewData()
{
  if (xmlHttp_swant.readyState < 4) {
  }
  if (xmlHttp_swant.readyState == 4) {
	var response = xmlHttp_swant.responseText.split("|");
	var cache=response[0]/1;
	var skin=response[1]/1;
	if (cache > 0){
		document.getElementById("ajax_cache").innerHTML="<a href=\"Swant_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=\"Swant_data.asp?action=cacheupdate\" onmouseover=\"parent.menu.disp(7);\" onClick=\"top.document.getElementById('topTitle').innerHTML='网站发布';\" title=\"更新缓存\" target=\"right\">发 布</a>";
	}
  }
}
setInterval('NewData()',60000*5);