var XmlHttp;
var PathUrl;
function createXmlHttp() {
if (window.ActiveXObject) {
return new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.XMLHttpRequest) {
return new XMLHttpRequest();
}
}
function goAjax() {
XMLHttpRequest = createXmlHttp();
XMLHttpRequest.onreadystatechange = window[funName];
XMLHttpRequest.open("POST", PathUrl, true);
XMLHttpRequest.send(null);
}
function goAjaxMethod(funName, path) {
PathUrl = path;
if (goAjaxMethod.length < arguments.length) {
PathUrl = PathUrl + "?";
for (var index = goAjaxMethod.length; index < arguments.length; index = index + 2) {
if (index = goAjaxMethod.length) {
PathUrl = PathUrl + arguments[index] + "=" + encodeURIComponent(arguments[index + 1]);
}
else {
PathUrl = PathUrl + "&" + arguments[index] + "=" + encodeURIComponent(arguments[index + 1]);
}
}
}
goAjax(funName);
}
function requestText() {
return XMLHttpRequest.responseText;
}
function isSuccess() {
if (xmlHttpRequest.readyState == 4 && xmlHttpRequest.status == 200) {
return true;
}
else {
return false;
}
}