function GetXmlHttpObject() {
  var xmlWireHttp=null;
  try {
    // Firefox, Opera 8.0+, Safari
    xmlWireHttp=new XMLHttpRequest();
  }
  catch (e) {
    // Internet Explorer
    try {
      xmlWireHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch (e) {
      xmlWireHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
  return xmlWireHttp;
}

function showWire() {
  xmlWireHttp=GetXmlHttpObject()
  url="/club/sports/forum-threads-wire.html?sid=" + Math.random();
  fetchWire(xmlWireHttp, url);
}

function showWireSkipAds() {
  xmlWireHttp=GetXmlHttpObject()
  url="/club/sports/forum-threads-wire.html?skipAds=Y&sid=" + Math.random();
  fetchWire(xmlWireHttp, url);
}

function fetchWire(xmlWireHttp, url) {
  xmlWireHttp.onreadystatechange = wireChanged;
  xmlWireHttp.open("GET", url, true);
  xmlWireHttp.send(null);
}

function wireChanged() {
  if (xmlWireHttp.readyState==4) { 
  	response = xmlWireHttp.responseText;
  	if (response.indexOf("<!-- WIRE -->") < 0) {
  		response = " ";
  	}
    document.getElementById("threadsWire").innerHTML=response;
  }
}
