function showEvents(listEvt,col0,col1,col2,col3)
{
var tblst,tblen,clms,hdr;
tblst = '<table class=\"th14\" width=\"700\" border=\"1\" bordercolor=\"#000080\" cellpadding=\"3\" cellspacing=\"0\">';
tblen = '</table>';
clms = '<col width=\"20%\"><col width=\"30%\"><col width=\"35%\"><col width=\"15%\">';

if(col3 != '')
{
//4 column table of width 800
tblst = '<table class=\"th14\" width=\"800\" border=\"1\" bordercolor=\"#000080\" cellpadding=\"3\" cellspacing=\"0\">';
clms = '<col width=\"20%\"><col width=\"30%\"><col width=\"35%\"><col width=\"15%\">';

hdr = '<th>' + col0 + '</th><th>' +col1 + '</th><th>' + col2 + '</th><th>' + col3 + '</th>'}
else
{
//3-column table of width 680
tblst = '<table class=\"th14\" width=\"680\" border=\"1\" bordercolor=\"#000080\" cellpadding=\"3\" cellspacing=\"0\">';
clms = '<col width=\"23.5%\"><col width=\"35.3%\"><col width=\"41.2%\">';
hdr = '<th>' + col0 + '</th><th>' +col1 + '</th><th colspan = 2>' + col2 + '</th>'}

//Generate the table data elements
var dte,tim,vnu,evt,lnk;
var tbldata = "";  //variable to hold the table data string
var len = listEvt.length;
if(len > 0)
{
  for(var i=0; i<len; i++)
  {
   dte = listEvt[i][0]; //date
   tim = listEvt[i][1]; //time
   vnu = listEvt[i][2]; //venue 
   evt = listEvt[i][3]; //event
   lnk = listEvt[i][5]; //hyperlink address (if any)

   //if(lnk != ""){evt = '<a href=\"' + lnk + '\" target=\"_blank\">' + evt + '</a>'} 
   if(lnk != ""){evt = '<a href=\"' + lnk + '\">' + evt + '</a>'} 

   if(col3 != '')
    {tbldata = tbldata + '<tr><td align=\"center\">' +dte + '</td><td>' + evt  + '</td><td>' + vnu + '</td><td align=\"center\">' + tim + '</td></tr>'}
   else
    {tbldata = tbldata + '<tr><td align=\"center\">' +dte + '</td><td>' + evt  + '</td><td colspan=2>' + vnu + '</td></tr>'}
  }
  document.write(tblst + clms + hdr + tbldata + tblen);
}
else
{
  document.write('<span class=\"th14\">No events listed</span>');
}

}




