function fLastWeds(iMnth,iYr)
{
var dLastWed=new Date();
var iOneDay=24*60*60*1000;
iMnth++;
if (iMnth == 12)
   {
   iMnth=0;
   iYr++;
   }
dLastWed.setFullYear(iYr,iMnth,1);
do
   {
   dLastWed.setTime(dLastWed.getTime()-iOneDay);
   }
while (dLastWed.getDay() != 3);
return dLastWed;
}

function fNextMeet(dAfterThisDate)
{
var iMonth=dAfterThisDate.getMonth();
var iYear=dAfterThisDate.getFullYear();
var dLastWeds=new Date();
if (iMonth==11)  // December 
   {
   iMonth=0;
   iYear++;
   }
dLastWeds=fLastWeds(iMonth,iYear);
if (dAfterThisDate.getTime() > dLastWeds.getTime())
   {
   if (iMonth==10)  // November
      {
      iMonth=0;
      iYear++;
      }
   else
      {
      iMonth++;
      }
   dLastWeds=fLastWeds(iMonth,iYear);
   }
return dLastWeds;
}