1function makeRequest(url, callback) {
2var request;
3if (window.XMLHttpRequest) {
4request = new XMLHttpRequest(); // IE7+, Firefox, Chrome, Opera, Safari
5} else {
6request = new ActiveXObject("Microsoft.XMLHTTP"); // IE6, IE5
7}
8request.onreadystatechange = function() {
9if (request.readyState == 4 && request.status == 200) {
10callback(request);
11}
12}
13request.open("GET", url, true);
14request.send();
15}