function createXmlHttpRequest() {
	var oXml;

	if (window.XMLHttpRequest) {
		try {
			oXml = new XMLHttpRequest();
		}
		catch (e) {
			oXml = false;
		}
	}
	else if (window.ActiveXObject) {
		try {
			oXml = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch (e) {
			oXml = false;
		}
	}

	return oXml;
}



function ajaxKeepAlive() {

	var oXml = createXmlHttpRequest();
	if (oXml) {
		
		var dt = new Date();
		var oXmlSrc = "/utils/keepalive.asp?i=" + dt.valueOf();

		oXml.onreadystatechange = function() {
			if (oXml.readyState == 4) {
				if (oXml.status == 200) {
					//call ok!
				}
				else {
					//something bad happened
				}
			}
		}

		oXml.open("GET", oXmlSrc);
		oXml.send("");
	}
}


function runKeepAlive() {
	window.setInterval("ajaxKeepAlive()", 300000);
}


if (ua["dom"]) {
	if (!ua["iemac"]) {
//		runKeepAlive();
	}
}
