var Ajax = { req: null, onComplete: null, init: function() { if(window.XMLHttpRequest && !(window.ActiveXObject)) { try { this.req = new XMLHttpRequest();} catch(e) { this.req = false;}
} else if(window.ActiveXObject) { try { this.req = new ActiveXObject("Msxml2.XMLHTTP");} catch(e) { try { this.req = new ActiveXObject("Microsoft.XMLHTTP");} catch(e) { this.req = false;}
}
}
}, get: function( url, method, onComplete ) { if (method == null) { method = 'post';}
this.onComplete = onComplete; if (this.req) { this.req.onreadystatechange = this.processReqChange; this.req.open(method, url, true); this.req.send("");}
}, processReqChange: function( req ) { if (Ajax.req.readyState == 4) { if (Ajax.req.status == 200) { if (Ajax.onComplete != null) { Ajax.onComplete( Ajax.req.responseText.toString() );}
} else { return;}
}
}
}
