datetag="th";
today = new Date();
year = (today.getFullYear) ? today.getFullYear() : today.getYear();
month = today.getMonth();
switch (month) {
			 case 0 : month = "Jan"; break;
			 case 1 : month = "Feb"; break;
			 case 2 : month = "Mar"; break;
             case 3 : month = "Apr"; break;
			 case 4 : month = "May"; break;
			 case 5 : month = "Jun"; break;
			 case 6 : month = "Jul"
			 }
date = today.getDate();
day = today.getDay();
switch (day) {
			 case 0 : day = "Sunday"; break;
			 case 1 : day = "Monday"; break;
			 case 2 : day = "Tuesday"; break;
			 case 3 : day = "Wednesday"; break
			 }
hours = today.getHours();
  if (hours<12)  greeting = 'Good Morning!';
	if (hours<18 && hours>11)  greeting = 'Good Afternoon!';
	if (hours<20 && hours>17)  greeting = 'Good Evening!';
	if (hours>19)  greeting = 'Good Evening!';
	if (hours>12) hour=hours-12; else hour=hours;
	if (hours==0) hour=hours + 12;
halfDay = (hours>11 && hours<24) ? 'PM' : 'AM';
minutes = today.getMinutes();
/*
dayStr =  day+ ', ' +date+ '&nbsp;' +month+ ',&nbsp;' +year;
*/

if(date==1) datetag='st';
if(date==21) datetag='st';
if(date==31)datetag='st';
if(date==2) datetag='nd';
if(date==22)datetag='nd';
if(date==3) datetag='rd';
if(date==23)datetag='rd';






dayStr = date+ datetag+'&nbsp;' +'&nbsp;' +month+ ',&nbsp;' +year;
timeStr = (minutes<10) ? hour+ ':0' +minutes+ ' ' +halfDay : hour+ ':' +minutes+ ' ' +halfDay;


