2 function rs_init_object () {
5 A=new ActiveXObject("Msxml2.XMLHTTP");
8 A=new ActiveXObject("Microsoft.XMLHTTP");
13 if(!A && typeof XMLHttpRequest != "undefined")
14 A = new XMLHttpRequest();
16 alert("Can't create XMLHttpRequest object");
20 function send_xmlhttp (url,args,callback) {
22 callback = callback || function (data) { return data };
24 for (var i = 0; i < args.length; i = i + 2) {
25 content = content + "&" + args[i] + "=" + escape(args[i+1]);
27 content = content.replace( /[+]/g, '%2B'); // fix unescaped plus signs
29 var xmlhttp = rs_init_object();
30 xmlhttp.open("POST", url, true);
32 xmlhttp.onreadystatechange = function() {
33 if (xmlhttp.readyState != 4)
35 if (xmlhttp.status == 200) {
36 var data = xmlhttp.responseText;
41 xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
42 xmlhttp.send(content);