      // Insert Bedework calendar events from a json feed
      // Kinda ugly javascript stolen from http://www.bedework.org/trac/bedework/wiki/BedeworkDesignGuide/jsonFeeds
      function insertEvents(outputContainerID) {
        var outputContainer = document.getElementById(outputContainerID);
        var output = "";
        var eventlist = new Array();
        var eventIndex = 0;
        var urlPrefix = "https://secure.ucc.asn.au/cal/event/eventView.do"
      
        if ((bwObject.bwEventList != undefined) &&
            (bwObject.bwEventList.events != undefined) &&
            (bwObject.bwEventList.events.length > 0)) {
          // get events 
          for (i = 0; i < bwObject.bwEventList.events.length; i++) {
            eventlist[eventIndex] = i;
            eventIndex++;
          }
          
          // GENERATE OUTPUT
          // This is where you may wish to customize the output.  To see what  
          // fields are available for events, look at the json source file included
          // above: ./bedeworkJsonExample.js
          
          // The title is included here because you may wish to hide it when 
          // no events are present.
          
          // Now, iterate over the events:
          for(i in eventlist){
            // provide a shorthand reference to the event:
            var event = bwObject.bwEventList.events[eventlist[i]];
            
            // don't show committee meetings
            //if (event.calPath == "%2Fpublic%2FCommittee+Meetings") continue;
            // generate the query string parameters that get us back to the 
            // event in the calendar:
            var eventQueryString = "?subid=" + event.subscriptionId;
            eventQueryString += "&amp;calPath=" + event.calPath;
            eventQueryString += "&amp;guid=" + event.guid;
            eventQueryString += "&amp;recurrenceId=" + event.recurrenceId;
            
            // create the list item:
            output += "<li>\n";
            output += event.start.shortdate + " ";
            output += event.start.time + ": ";
            output += "<a href=\"" + urlPrefix + eventQueryString + "\"><b>" + event.summary + "</b></a>\n";

            output += "</li>\n";
          }
          
          // Finally, send the output to the container:
          outputContainer.innerHTML = output;
        }
      }
