//声明XMLHttpRequest对象
var Browser = new Object();
Browser.isMozilla = (typeof document.implementation != 'undefined') && (typeof document.implementation.createDocument != 'undefined') && (typeof HTMLDocument!='undefined');
Browser.isIE = window.ActiveXObject ? true : false;
Browser.isFirefox = (navigator.userAgent.toLowerCase().indexOf("firefox")!=-1);
Browser.isOpera = (navigator.userAgent.toLowerCase().indexOf("opera")!=-1);
if (Browser.isFirefox) { extendEventObject();} // entend Event Mod for FireFox
 
function extendEventObject() {
 Event.prototype.__defineGetter__("srcElement", function () {var node = this.target;while (node.nodeType != 1) node = node.parentNode;return node;});
 Event.prototype.__defineGetter__("fromElement", function () {var node;if (this.type == "mouseover") node = this.relatedTarget;else if (this.type == "mouseout") node = this.target;if (!node) return;while (node.nodeType != 1) node = node.parentNode; return node;});
 Event.prototype.__defineGetter__("toElement", function () {var node;if (this.type == "mouseout") node = this.relatedTarget;else if (this.type == "mouseover") node = this.target;if (!node) return;while (node.nodeType != 1) node = node.parentNode;return node;});
}
var JxmlHttp;
var waitTime;

function show_Data()
{
	load_Data();
}

function keyscode(Tdate,Tkey)
{
	var result = (Tdate * (Tkey % 76) + Tdate * ( Tdate % 9)) * (Tdate % 89) + Tdate * (Tdate % 27) + (Tkey % Tdate) * (Tdate % 13);
	return result;
}
    
function load_Data()
{
   var today=new Date();
   var date = today.getFullYear()+(today.getMonth() + 1)+today.getDate();
   var keys = 11289736;
   var value = keyscode(date,keys);
   url="www/request/todayData.aspx?key="+value;
   createXMLHTTP();//创建XMLHttpRequest对象
   if (!JxmlHttp)
   {
	var divPopCal = document.getElementById('divDataResult');
	divPopCal.innerHTML="系统错误: 如果你在操作过程中反复出现此问题(刷新都不能解决问题)，那么可能是你的windows系统中的“MSXML”系统文件受到损坏，请先到微软官方网站下载最新版本 “MSXML”文件重新安装，再尝试。<br><br><a href='http://www.microsoft.com/downloads/details.aspx?displaylang=zh-cn&FamilyID=993c0bcf-3bcf-4009-be21-27e85e1857b1' target='_blank'>点击此处下载微软“MSXML”文件</a>";
	return;
   }
   JxmlHttp.open("GET",url,true); 
   JxmlHttp.onreadystatechange=GetState;
   JxmlHttp.send(null);
}
function createXMLHTTP()
{
 if(window.XMLHttpRequest) { 
  JxmlHttp = new XMLHttpRequest();
  if (JxmlHttp.overrideMimeType) {JxmlHttp.overrideMimeType("text/html");}
 }
 else if (window.ActiveXObject) { 
  try {JxmlHttp = new ActiveXObject("Msxml2.XMLHTTP");}
  catch (e) { try {JxmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {}}
 }
 if (!JxmlHttp) { return null; }
}
//执行检测用户名回调函数
function GetState()
{
    if(JxmlHttp.readyState==4)//判断对象状态
    {    
        if(JxmlHttp.status==200)//信息成功返回，开始处理信息
        {
			var divPopCal = document.getElementById('divDataResult');
			divPopCal.innerHTML=JxmlHttp.responseText;
        }
    }
}
