1 function rs_init_object () {
4 A=new ActiveXObject("Msxml2.XMLHTTP");
7 A=new ActiveXObject("Microsoft.XMLHTTP");
12 if(!A && typeof XMLHttpRequest != "undefined")
13 A = new XMLHttpRequest();
15 alert("Can't create XMLHttpRequest object");
19 function send_xmlhttp (url,args,callback) {
21 callback = callback || function (data) { return data };
23 for (var i = 0; i < args.length; i = i + 2) {
24 content = content + "&" + args[i] + "=" + escape(args[i+1]);
26 content = content.replace( /[+]/g, '%2B'); // fix unescaped plus signs
28 var xmlhttp = rs_init_object();
29 xmlhttp.open("POST", url, true);
31 xmlhttp.onreadystatechange = function() {
32 if (xmlhttp.readyState != 4)
34 if (xmlhttp.status == 200) {
35 var data = xmlhttp.responseText;
40 xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
41 xmlhttp.send(content);