function getCalendarDate(mDays)
{
   var months = new Array(12);
   months[0]  = "January";
   months[1]  = "February";
   months[2]  = "March";
   months[3]  = "April";
   months[4]  = "May";
   months[5]  = "June";
   months[6]  = "July";
   months[7]  = "August";
   months[8]  = "September";
   months[9]  = "October";
   months[10] = "November";
   months[11] = "December";
   var now         = new Date();
   var monthnumber = now.getMonth();
   var monthname   = months[monthnumber];
   var monthday    = now.getDate();
   var year        = now.getYear();
   if(year < 2000) { year = year + 1900; }
   if (monthday <= mDays)
	monthname= months[monthnumber-1];
   else
	monthday=monthday-mDays;
   var dateString = monthname +
                    ' ' +
                    monthday +
                    ', ' +
                    year;
   return dateString;
} // function getCalendarDate()
function getDatenTime(mDays)
{
   var months = new Array(12);
   months[0]  = "January";
   months[1]  = "February";
   months[2]  = "March";
   months[3]  = "April";
   months[4]  = "May";
   months[5]  = "June";
   months[6]  = "July";
   months[7]  = "August";
   months[8]  = "September";
   months[9]  = "October";
   months[10] = "November";
   months[11] = "December";
   var now         = new Date();
   var monthnumber = now.getMonth();
   var monthname   = months[monthnumber];
   var monthday    = now.getDate();
   var year        = now.getFullYear();
   var wkdays	=now.getDay();
   var arywkdays=new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
   var strwkdays=arywkdays[wkdays];
   if(year < 2000) { year = year + 1900; }
   if (monthday <= mDays)
	monthname= months[monthnumber-1];
   else
	monthday=monthday-mDays;
   var dateString = strwkdays + ', ' + monthname +
                    ' ' +
                    monthday +
                    ', ' +
                    year;
	var hour   = now.getHours();
   var minute = now.getMinutes();
   var second = now.getSeconds();
   var ap = "AM";
   if (hour   > 11) { ap = "PM";             }
   if (hour   > 12) { hour = hour - 12;      }
   if (hour   == 0) { hour = 12;             }
   if (hour   < 10) { hour   = "0" + hour;   }
   if (minute < 10) { minute = "0" + minute; }
   if (second < 10) { second = "0" + second; }
   var timeString = hour +
                    ':' +
                    minute +
                    ':' +
                    second +
                    " " +
                    ap;

   return dateString + ' ' + timeString;
} // function getCalendarD
function getCCalmTH()
{
   var months = new Array(12);
   months[0]  = "一";
   months[1]  = "二";
   months[2]  = "三";
   months[3]  = "四";
   months[4]  = "五";
   months[5]  = "六";
   months[6]  = "七";
   months[7]  = "八";
   months[8]  = "九";
   months[9]  = "十";
   months[10] = "十一";
   months[11] = "十二";
   var now         = new Date();
   var monthnumber = now.getMonth();
   var monthname   = months[monthnumber];
   var monthday    = now.getDate();
  // var year        = now.getYear();
//   if(year < 2000) { year = year + 1900; }
   if (monthday < 29)	
	monthday=monthday+2;
   var anstr = monthname + '月促销, 买一送一.<br>' +
                    '截止日期: ' + monthname + 
                    '月' + monthday + '日,欲购从速!';
   return anstr;
} 