if( typeof XMLHttpRequest == "undefined" ) XMLHttpRequest = function() {
  try { return new ActiveXObject("Msxml2.XMLHTTP.6.0") } catch(e) {}
  try { return new ActiveXObject("Msxml2.XMLHTTP.3.0") } catch(e) {}
  try { return new ActiveXObject("Msxml2.XMLHTTP") } catch(e) {}
  try { return new ActiveXObject("Microsoft.XMLHTTP") } catch(e) {}
  return;
};

var getAd = function(which) {
    client = new XMLHttpRequest();
    if (!client)
        return;
    client.open("GET", "/ads/?which="+which, false);
    client.send(null);
    return client.responseText;
}
