if (window.XMLHttpRequest)
  {
  xhttp=new XMLHttpRequest();
  }
else // Internet Explorer 5/6
  {
  xhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xhttp.open("GET","/talks.xml",false);
xhttp.send("");
xmlDoc=xhttp.responseXML;

document.write("<dt>Stats Lab Seminars</dt>");
document.write("<dd>");
var x=xmlDoc.getElementsByTagName("talk");

if (x.length==0)
{
document.write("There are no more talks this term.");
}

for (i=0;i<x.length;i++)
  {
  dateline = "<div class=\"news_item\"><p class=\"news_item_date\">";
  dateline = dateline + x[i].getElementsByTagName("start_time")[0].childNodes[0].nodeValue;
  dateline = dateline + "</p>";
  document.write(dateline);

  document.write("<p><a class=\"news_item_right_link\"");
  linkline = "href=\"" + x[i].getElementsByTagName("url")[0].childNodes[0].nodeValue + "\">";
  linkline = linkline + x[i].getElementsByTagName("title")[0].childNodes[0].nodeValue;
  linkline = linkline + "</a>";
  document.write(linkline);

  document.write("<br>" + x[i].getElementsByTagName("speaker")[0].childNodes[0].nodeValue);
  document.write("<br><i>" + x[i].getElementsByTagName("series")[0].childNodes[0].nodeValue + "</i>");

  document.write("</p>");
  document.write("</div>");
  }
document.write("</dd>");

