/* 
最后更新 2010-1-11 by 56770.Kingdge
*/
var xmlHttp_NewEvent = false;
function xmlHttpInit()
{
	try {
	  xmlHttp_NewEvent = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
	  try {
		xmlHttp_NewEvent = new ActiveXObject("Microsoft.XMLHTTP");
	  } catch (e2) {
		xmlHttp_NewEvent = false;
	  }
	}
	if (!xmlHttp_NewEvent && typeof XMLHttpRequest != 'undefined') {
	  xmlHttp_NewEvent = new XMLHttpRequest();
	}
}
function NewEvent()
{
	xmlHttpInit()
	xmlHttp_NewEvent.open("GET", "Ajax_Data.asp?action=NewEvent&t="+Math.random(), true);
	xmlHttp_NewEvent.onreadystatechange = GetNewEvent;
	xmlHttp_NewEvent.send(null); 
}
function GetNewEvent()
{
  if (xmlHttp_NewEvent.readyState < 4) {
  }
  if (xmlHttp_NewEvent.readyState == 4) {
	var response = xmlHttp_NewEvent.responseText.split("|");
	if (response[0]/1 > 0||response[1]/1 > 0||response[2]/1 > 0||response[3]/1 > 0||response[4]/1 > 0||response[5]/1 > 0)
	{
		PlaySoundAct();
	}
	document.getElementById("ajax_order").innerHTML=response[0];
	document.getElementById("ajax_onlinepay").innerHTML=response[1];
	document.getElementById("ajax_payment").innerHTML=response[2];
	document.getElementById("ajax_comment").innerHTML=response[3];
	document.getElementById("ajax_guestbook").innerHTML=response[4];
	document.getElementById("ajax_message").innerHTML=response[5];
  }
}
function PlaySoundAct(){	
   document.getElementById("ShowSound").innerHTML = "&nbsp;<bgsound loop=1 volume=0 src=images/NewEvent.wav></bgsound>";
}
setInterval('NewEvent()',60000*5);