function engine(type,page,text) { var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); if(x) { x.onreadystatechange = function() { if(x.readyState==4) { if(x.status==200) { if(x.responseText.length>0) type(x.responseText); } else alert("There was an error processing asynchronous command-type: " + type + ". Page attempted: " + page); } } x.open(text==null ? "GET" : "POST",page, true); if(text!=null) x.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); x.send(text); } }