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

document.write("<table id='schedule' class = 'centered'>");
document.write("<tr id='toprow'>");
document.write("<td>Date</td>");
document.write("<td>Place</td>");
document.write("<td>Time</td>");
document.write("</tr>");
var x = xmlDoc.getElementsByTagName("Show");
for (i=0;i<x.length;i++)
{
 if (i % 2 == 0)
 {
  document.write("<tr class='evenline'><td>");
 }
 else
 {  
  document.write("<tr class='oddline'><td>");
 }
 document.write(x[i].getElementsByTagName("Date")[0].childNodes[0].nodeValue);
 document.write("</td><td>");
 document.write(x[i].getElementsByTagName("Place")[0].childNodes[0].nodeValue);
 if (x[i].getElementsByTagName("Comment")[0].childNodes.length > 0)
 {
  document.write("<span class='newline'>");
  document.write(x[i].getElementsByTagName("Comment")[0].childNodes[0].nodeValue);
  document.write("</span>");
 }
 if (x[i].getElementsByTagName("Location")[0].childNodes.length > 0)
 {
  document.write("<span class='newline'>");
  document.write(x[i].getElementsByTagName("Location")[0].childNodes[0].nodeValue);
  document.write("</span>");
 }
 document.write("</td><td>");
 if (x[i].getElementsByTagName("Time")[0].childNodes.length > 0)
 {
  document.write(x[i].getElementsByTagName("Time")[0].childNodes[0].nodeValue);
 }
 document.write("</td></tr>");
}
document.write("</table>");
