function AjaxObj() {
this.responseText = null;
var s = document.createElement('div');
s.style.display = 'none';
s.innerHTML = '';
document.body.appendChild(s);
this.iframe = s.firstChild;
this.post = function(url,data) {
if (typeof data == 'string' && data != '') {
var f = document.createElement('form');
f.name = 'ajaxform';
f.target = 'ajaxiframe';
f.method = 'post';
f.action = url;
var ds = data.split("&");
for (var i = 0; i < ds.length; i++) {
if (ds[i]) {
var v = ds[i];
var el = document.createElement('input');
el.type = 'hidden';
el.name = v.substr(0,v.indexOf('='));
el.value = v.substr(v.indexOf('=')+1);
f.appendChild(el);
}
}
document.body.appendChild(f);
f.submit();
document.body.removeChild(f);
} else if (typeof data == 'object') {
data.target = 'ajaxiframe';
data.submit();
} else {
self.ajaxiframe.location = url;
}
}
}
function XMLhttp() {
this.request = null;
this.recall = null;
this.time = null;
this.t = null;
this.last = 0;
}
XMLhttp.prototype = {
send : function(url,data,callback) {
if (this.request == null) {
this.request = new AjaxObj();
}
this.request.responseText = '';
var nowtime = new Date().getTime();
if (nowtime - this.last < 1500) {
clearTimeout(this.t);
this.t = setTimeout(function(){ajax.send(url,data,callback)},1500+this.last-nowtime);
return;
}
this.last = nowtime;
url += (url.indexOf("?") >= 0) ? "&nowtime=" + nowtime : "?nowtime=" + nowtime;
if (typeof verifyhash != 'undefined') {
url += '&verify=' + verifyhash;
}
this.request.post(url,data);
this.recall = callback;
if (typeof this.recall == "function") {
if (this.request.iframe.attachEvent) {
this.request.iframe.detachEvent('onload',ajax.load);
this.request.iframe.attachEvent('onload',ajax.load);
} else {
this.request.iframe.addEventListener('load',ajax.load,true);
}
}
},
load : function() {
if (is_ie) {
ajax.request.responseText = (typeof ajax.request.iframe.contentWindow.document.XMLDocument != 'undefined') ? ajax.request.iframe.contentWindow.document.XMLDocument.text : null;
ajax.request.iframe.detachEvent('onload',ajax.load);
} else {
ajax.request.responseText = ajax.request.iframe.contentWindow.document.documentElement.firstChild.nodeValue;
ajax.request.iframe.removeEventListener('load',ajax.load,true);
}
ajax.recall();
},
XmlDocument : function(obj) {
return is_ie ? ajax.request.iframe.contentWindow.document.XMLDocument : ajax.request.iframe.contentWindow.document;
},
submit : function(obj,recall) {
if (typeof recall == 'undefined' || typeof recall != 'function') {
recall = ajax.guide;
}
ajax.send(obj.action,obj,recall);
closep();
},
get : function() {
if (ajax.request.responseText != null && ajax.request.responseText.indexOf('<') != -1) {
read.setMenu(this.runscript(ajax.request.responseText));
read.menupz(read.obj);
} else {
closep();
ajax.guide();
}
},
runscript : function (html) {
if (html.indexOf('