function fetchContent( serviceId, maxItems ) {
  document.getElementById(serviceId).innerHTML = "Loading ...";
  var xmlHttp = getXmlHttpObject();
  if ( xmlHttp == null ) {
    document.getElementById(serviceId).innerHTML="Browser Not Supported";
    return;
  }
  xmlHttp.onreadystatechange=function() {
    if( xmlHttp.readyState==4 && xmlHttp.status==200) {
	  if ( xmlHttp.responseText.substring(0,5) != "error" ) {
        document.getElementById(serviceId).innerHTML = xmlHttp.responseText;
      } else {
	    document.getElementById(serviceId).innerHTML = "<p>Error getting content, <a onclick=\"fetchContent('"+serviceId+"', "+maxItems+");\">try again</a>.</p>"
	  }
    }
  }
  xmlHttp.open("GET","/tmi/"+serviceId+".php?max_items="+maxItems,true);
  xmlHttp.send(null);
}
