function LoadDiscussions() {
try //Internet Explorer
  {
    xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  } 
catch(e)
  {
  try //Firefox, Mozilla, Opera, etc.
    {
    xmlDoc=document.implementation.createDocument("","",null);
    }
  catch(e) {document.write(e.message);}
  }
try {
  xmlDoc.async=false;
  xmlDoc.load("/static/feeds/googlegroups.xml");

  channel = xmlDoc.getElementsByTagName("channel")[0];
  if (channel) {
     x = channel.childNodes;

     var i = 0;
     var items = 0;

     document.write("<ul class='discussions'>");
     while (i < x.length) { 
       if (x[i].nodeName == "item") {
          title = x[i].getElementsByTagName("title")[0];
          if (title.childNodes[0]) {
              title = title.childNodes[0].nodeValue;
          } else {
              title = "NONE";
          }

          link = x[i].getElementsByTagName("link")[0].childNodes[0].nodeValue;

          document.write("<li><a href='");
          document.write(link);
          document.write("'>");
          document.write(title);
          document.write("\</a>\</li>");
          items++;
       }
       i++;
     }
     document.write("\</ul>");
  } else {
     document.write("Error: No items in channel");
  }

} catch(e) {
    document.write(e.message);
}
}
