';document.write(s);go()}
function go(){var nYear=parseInt(document.getElementById('year').value);var nMonth=radioGetIndex('month',my.months)+1
var nDay=radioGetIndex('day',my.days)+1
var daysInMonth=my.monthDays[nMonth-1]
if(nMonth==2&&isLeapYear(nYear))daysInMonth++
console.log('go',nYear,nMonth,nDay,daysInMonth,isLeapYear(nYear))
for(var i=29;i<=31;i++){if(i<=daysInMonth){document.getElementById('day'+(i-1)+'lbl').style.visibility='visible'}else{document.getElementById('day'+(i-1)+'lbl').style.visibility='hidden'}}
if(nDay>daysInMonth){msg('Enter a valid Day')}else{if(nYear<1582||nYear>4902){msg('Enter a Year between 1582 and 4902')}else{msg(dowMsg(nZeller(nYear,nMonth,nDay)))}}}
function nZeller(nYear,nMonth,nDay){if(nMonth>=3){nMonth-=2;}else{nMonth+=10;}
if((nMonth==11)||(nMonth==12))nYear--;var nCentury=parseInt(nYear/100);var nYear100=nYear%100;var h=0;h+=parseInt(nDay);h+=parseInt((13/5)*nMonth-0.2);h+=parseInt(nYear100);h+=parseInt(nYear100/4);h+=parseInt(nCentury/4);h-=parseInt(2*nCentury);h%=7;if(nYear>=1700&&nYear<=1751){h-=3;}else{if(nYear<=1699)h-=4;}
if(h<0)h+=7;return h}
function dowMsg(nDayOfWeek){if(nDayOfWeek>=0&&nDayOfWeek<=6){var dows=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']
var dow=dows[nDayOfWeek]
console.log('dowMsg',nDayOfWeek,dow)
return 'Is a '+dow}else{return 'Error'}}
function isLeapYear(n){if(n%4){return false}else{if(n%100){return true}else{return(n%400)?false:true}}}
function msg(s){var div=document.getElementById('result')
div.value=s}
function dropdownHTML(opts,funcName,id){var s='';s+='';return s;}
function radioHTML(id,lbls,func){var s='';for(var i=0;i';s+=' ';}
return s;}
function radioGetIndex(id,lbls){for(var i=0;i