function AjaxObject() { this.req = null; this.getRequest = function() { if (window.ActiveXObject) { this.req = new ActiveXObject("Microsoft.xmlhttp"); } else if (window.XMLHttpRequest) { this.req = new XMLHttpRequest(); } } this.sendRequest = function(url, params, Method) { if (!Method) { Method = "POST"; } this.getRequest(); this.req.onreadystatechange = this.showData; this.req.open(Method, url, true); this.req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); this.req.send(params); } this.showData = function() { } }