function checkSupport(psTarget) { try { document.getElementById(psTarget).innerHTML = get_text(38); if (document.getElementById(psTarget).innerHTML) { if (window.ActiveXObject) { var check = new ActiveXObject("microsoft.XMLHTTP"); if (check) { this.bSupported= true; } } else if (window.XMLHttpRequest) { this.bSupported = true; } } } catch (e) { this.bSupported = false; } } function XMLHTTP() { if (!this.bSupported) { return false; } if (window.ActiveXObject) { return new ActiveXObject("microsoft.XMLHTTP"); } else if (window.XMLHttpRequest) { return new XMLHttpRequest(); } } function buildContainer(psTarget) { if (this.bSupported) { return document.getElementById(psTarget); } } function init() { this.checkSupport(this.sTargetElement); this.oHTML = this.XMLHTTP(); this.oContainer = buildContainer(this.sTargetElement); // refreshData(); } function refreshData(psDataURL, psTarget) { if ("" + psDataURL == "undefined") { psDataURL = this.sDataURL; } if ("" + psTarget != "undefined") { this.checkSupport(psTarget); this.oHTML = this.XMLHTTP(); this.oContainer = this.buildContainer(psTarget); } if (this.bSupported) { // Third parameter must be true to work in FireFox // IE does not have this problem however this.oHTML.open('GET', psDataURL, true); this.oHTML.onreadystatechange = this.stateHandler; this.oHTML.send(null); } else { // setTimeout('hardReload()', iReload * 1000); } } function hardReload() { document.location.reload(); } // Declare the object function function URLFetcher(handlerName) { // Define global variables this.bSupported = false; this.iRefresh = 5; this.iReload = 5; this.sDataURL = ''; this.sTargetElement = ''; this.oHTML = new Object(); this.oContainer = new Object(); this.aMain = new Array(); this.checkSupport = checkSupport; this.XMLHTTP = XMLHTTP; this.buildContainer = buildContainer; this.init = init; this.refreshData = refreshData; this.hardReload = hardReload; this.stateHandler = new Function("switch ("+handlerName+".oHTML.readyState) { case 1: window.status = get_text(39); break; case 2: window.status = get_text(40); break; case 3: window.status = get_text(41); break; case 4: window.status = get_text(42); try { eval("+handlerName+".oHTML.responseText); } catch (e) {} "+handlerName+".oContainer.innerHTML = "+handlerName+".oHTML.responseText;}"); // // this.stateHandler = stateHandler; } // Set handler for init function //onload = init;