﻿// JScript 文件

function initUpdateIndex(){
	doGet();
	var d=new Date();
	var h=d.getHours().toString();
	var m=d.getMinutes().toString();
	var s=d.getSeconds().toString();

	if (h.length == 1){
		h = "0" + h;
	}
	if (m.length == 1){
		m = "0" + m;
	}
	if (s.length == 1){
		s = "0" + s;
	}
	
	var timer=h+":"+m+":"+s;
	if ((timer>"09:10:00" && timer<"11:40:00") || (timer>"12:50:00" && timer<"15:10:00")) {
		setInterval("doGet()",60000);  //更新时间
	}
}



function createxmldoc(){
	var xmldoc;
	if(window.XMLHttpRequest){
		xmldoc = new XMLHttpRequest();
		if(xmldoc.overrideMimeType){
				xmldoc.overrideMimeType("text/xml");
		}
	}else if(window.ActiveXObject){
		try{
			xmldoc = new ActiveXObject("Msxml4.XMLHTTP");
		}catch(e){
			try{
				xmldoc = new ActiveXObject("Msxml3.XMLHTTP");
			}catch(e){
				try{
					xmldoc = new ActiveXObject("Msxml2.XMLHTTP");
				}catch(e){
					try{
						xmldoc = new ActiveXObject("Microsoft.XMLHTTP");
					}catch(e){}
				}
			}
		}
	}
	if(!xmldoc){
		return false;
	}
	return xmldoc;
}

function getId(id){
	var returnvalue = null;
	try{
		returnvalue = document.getElementById(id);
	}catch(e){
	}
	return returnvalue;
}