// ************************************ // // Ajax connection methods // // ************************************* function openAjaxConnection (url, callBackFunc ) { var xmlHttp = GetAjaxObject(); xmlHttp.onreadystatechange = function () { if ( xmlHttp.readyState == 4 ) { eval(callBackFunc + "()"); } } xmlHttp.open("GET",url,true); xmlHttp.send(null); return xmlHttp; } function GetAjaxObject() { var xmlHttp=null; try { // Firefox, Opera 8.0+, Safari xmlHttp = new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; } function TD_AjaxFunction (url, callBack) { var xmlHttp = GetAjaxObject(); xmlHttp.onreadystatechange = function () { if ( xmlHttp.readyState == 4 ) { eval (callBack + "(xmlHttp.responseText)"); } } xmlHttp.open("GET", url, true); xmlHttp.send(null); } function TD_AjaxFunction_RespXML (url, callBack) { var xmlHttp = GetAjaxObject(); xmlHttp.onreadystatechange = function () { if ( xmlHttp.readyState == 4 ) { eval (callBack + "(xmlHttp.responseXML)"); } } xmlHttp.open("GET", url, true); xmlHttp.send(null); } function TD_AjaxPostFunction (url, callBack, bd) { var xmlHttp = GetAjaxObject(); xmlHttp.onreadystatechange = function () { if ( xmlHttp.readyState == 4 ) { eval (callBack + "(xmlHttp.responseText)"); } } xmlHttp.open("POST", url, true); xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlHttp.setRequestHeader("Content-length", bd ? bd.length : 0 ); xmlHttp.setRequestHeader("Connection", "close"); xmlHttp.send(bd); }