
/* - ioi.js - */
// Copyright (C) 2007  InterNLnet
// started by Goldmund, Wyldebeast & Wunderliebe
// adapted InterNlnet
//
var tag_request = false;


/**
* Make a request to the server, using either synchronous or asynchronous mode.
*/
function makeRequest(url, async, callback) {

  tag_request = false;

  if (window.XMLHttpRequest) { // Mozilla, Safari,...
    tag_request = new XMLHttpRequest();
  } else if (window.ActiveXObject) { // IE
    try {
      tag_request = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        tag_request = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {}
    }
  }

  if (!tag_request) {
    alert('Cannot create XMLHTTP instance');
    return false;
  }

  tag_request.onreadystatechange = callback;
  tag_request.open('GET', url, async);
  tag_request.send(null);
}


