function buildCal(m, y, cM, cH, cDW, cD, cS, cF, mFeast, brdr){
var mn=['January','February','March','April','May','June','July','August','September','October','November','December'];
var dim=[31,0,31,30,31,30,31,31,30,31,30,31];
var cC=cD;           //  LEP Feast days and Sabbath. Default class of current cell 
var oD = new Date(y, m-1, 1); //DD replaced line to fix date bug when current day is 31st
oD.od=oD.getDay()+1; //DD replaced line to fix date bug when current day is 31st

var todaydate=new Date() //DD added
var scanfortoday=(y==todaydate.getFullYear() && m==todaydate.getMonth()+1)? todaydate.getDate() : 0 //DD added

dim[1]=(((oD.getFullYear()%100!=0)&&(oD.getFullYear()%4==0))||(oD.getFullYear()%400==0))?29:28;
var t='<div class="'+cM+'"><table class="'+cM+'" cols="7" cellpadding="0" border="'+brdr+'" cellspacing="0"><tr align="center">';
t+='<td colspan="7" align="center" class="'+cH+'">'+mn[m-1]+' - '+y+'</td></tr><tr align="center">';
for(s=0;s<7;s++)t+='<td class="'+cDW+'">'+"SMTWTFS".substr(s,1)+'</td>';
t+='</tr><tr align="center">';
for(i=1;i<=42;i++){
var x=((i-oD.od>=0)&&(i-oD.od<dim[m-1]))? i-oD.od+1 : '&nbsp;';
var d=x;  // lep
var sStra="";
var sStrb="";

if (x==scanfortoday) { //DD added
  sStra='<span id="today">';
  sStrb='</span>';
} // DD added

var isSab=0; // LEP Sabbath
cFS='feastsab';
 
cC=cD;                             // LEP Feast days and Sabbath
if((i)%7==0) {cC=cS; isSab=1; }              // LEP Sabbath
if ((d>"0") && (d<"32")) {    // LEP Feast
  if(mFeast.substr(d,1)!='0') 
   { cC=cF; if (isSab==1) cC=cFS; 
 //   if(mFeast.substr(d,1) >1) sStra=sStra+'<span id="fwday"><b>'; sStrb='</b></span>'+sStrb; 		// LEP Feast BOLD
    if(mFeast.substr(d,1) >1) sStra=sStra+'<font size="3"><b>'; sStrb='</b></font>'+sStrb; 		// LEP Feast BOLD

   }   // LEP Feast 
}
  x=sStra+x+sStrb; // LEP

t+='<td class="'+cC+'">'+x+'</td>';
if(((i)%7==0)&&(i<36)) 
t+='</tr><tr align="center">';
}
return t+='</tr></table></div>';
}

