// JavaScript Document from w3schools on 10/03/09
function loadXMLDoc(dname)
{
if (window.XMLHttpRequest)
  {
  xhttp=new window.XMLHttpRequest();
  }
else
  {
  xhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xhttp.open("GET",dname,false);
xhttp.send("");
return xhttp.responseXML;
}

<!-- generalized the function to specify the xml & xsl files and [div] area to load -->
function displayResult(dataXML, formatXSL, divID)
{
xml=loadXMLDoc(dataXML);
xsl=loadXMLDoc(formatXSL);
// code for IE
if (window.ActiveXObject)
  {
	ex=xml.transformNode(xsl);
    document.getElementById(divID).innerHTML=ex;
  }
  // code for Mozilla, Firefox, Opera, etc.
  else if (document.implementation
  && document.implementation.createDocument)
  {
    xsltProcessor=new XSLTProcessor();
    xsltProcessor.importStylesheet(xsl);
    resultDocument = xsltProcessor.transformToFragment(xml,document);
    document.getElementById(divID).appendChild(resultDocument);
  }
}

<!-- [AAUW] function will pass in a month (e.g. Jan) to get that month's event -->
function displayCalResult(dataXML, formatXSL, divID, subset)
{
	var node;
xml=loadXMLDoc(dataXML);
xsl=loadXMLDoc(formatXSL);
// code for IE
if (window.ActiveXObject)
  {
    if (subset)
		{
		<!-- can't figure out out to get 1 element for IE -->
		}
    ex=node.transformNode(xsl);
    document.getElementById(divID).innerHTML=ex;
  }
  // code for Mozilla, Firefox, Opera, etc.
  else if (document.implementation
  && document.implementation.createDocument)
  {
    xsltProcessor=new XSLTProcessor();
    xsltProcessor.importStylesheet(xsl);
	if (subset) 
		{
		xsltProcessor.setParameter(null,"now",thismonth());
		}
    resultDocument = xsltProcessor.transformToFragment(xml,document);
    document.getElementById(divID).appendChild(resultDocument);
  }
}

<!-- returns 3 letter acronym for current month (e.g. Sep) -->
function thismonth() 
{
	var month = new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
	var now = new Date();
	return(month[now.getMonth()]);
}

function setShowHide(idShow, idHide) {
	document.getElementById(idShow).style.display = 'block';
	document.getElementById(idHide).style.display = 'none';
}
