function compute()
{
e=10
year=document.myForm.year.value
submitOK="True"

if (year<1583 || year>4099)
 {
 alert("The year must be between 1583 and 4099!")
 submitOK="False"
 }
if (submitOK=="False")
 {
 return false
 }
year=Number(year)
if (year>1600)
 {
 y2=Math.floor(year/100)
 e=10+y2-16-Math.floor((y2-16)/4)
 }
if (year<1583)
 {
 e=0
 }
G=year%19
I=(19*G+15)%30
J=(year+Math.floor(year/4)+I)%7
L=I-J
p=L+e
d=1+(p+27+Math.floor((p+6)/40))%31
m=3+Math.floor((p+26)/30)-1
oneDay = 60 * 1000 * 60 * 24
pascha = new Date(year, m, d)
pascha.setHours(1)
//alert(pascha)
lent = new Date(pascha.getTime() + oneDay * (-48))
lazarus = new Date(pascha.getTime() + oneDay * (-8))
cheese = new Date(lent.getTime() + oneDay * (-1))
meat = new Date(pascha.getTime() + oneDay * (-56))
palm = new Date(pascha.getTime() + oneDay * (-7))
ascend = new Date(pascha.getTime() + oneDay * 39)
pentecost = new Date(pascha.getTime() + oneDay * 49)
allsaints = new Date(pentecost.getTime() + oneDay * 7)
prodigal = new Date(meat.getTime() + oneDay * (-7))
publican = new Date(prodigal.getTime() + oneDay * (-7))

monthcode = new Array(12)
monthcode[0] = "Jan "
monthcode[1] = "Feb "
monthcode[2] = "Mar "
monthcode[3] = "Apr "
monthcode[4] = "May "
monthcode[5] = "Jun "
monthcode[6] = "Jul "
monthcode[7] = "Aug "
monthcode[8] = "Sep "
monthcode[9] = "Oct "
monthcode[10] = "Nov "
monthcode[11] = "Dec "

daycode = new Array(7)
daycode[0] = "Sun "
daycode[1] = "Mon "
daycode[2] = "Tue "
daycode[3] = "Wed "
daycode[4] = "Thu "
daycode[5] = "Fri "
daycode[6] = "Sat "

//Fill Table
paschadate = (daycode[pascha.getDay()] + "  " + monthcode[pascha.getMonth()] + "  " + pascha.getDate() + ",  " + year)
document.myForm.data8.value = paschadate
publicandate = (daycode[publican.getDay()] + "  " + monthcode[publican.getMonth()] + "  " + publican.getDate() + ",  " + year)
document.myForm.data1.value = publicandate
prodigaldate = (daycode[prodigal.getDay()] + "  " + monthcode[prodigal.getMonth()] + "  " + prodigal.getDate() + ",  " + year)
document.myForm.data2.value = prodigaldate
meatdate = (daycode[meat.getDay()] + "  " + monthcode[meat.getMonth()] + "  " + meat.getDate() + ",  " + year)
document.myForm.data3.value = meatdate
cheesedate = (daycode[cheese.getDay()] + "  " + monthcode[cheese.getMonth()] + "  " + cheese.getDate() + ",  " + year)
document.myForm.data4.value = cheesedate
lentdate = (daycode[lent.getDay()] + "  " + monthcode[lent.getMonth()] + "  " + lent.getDate() + ",  " + year)
document.myForm.data5.value = lentdate
lazarusdate = (daycode[lazarus.getDay()] + "  " + monthcode[lazarus.getMonth()] + "  " + lazarus.getDate() + ",  " + year)
document.myForm.data6.value = lazarusdate
palmdate = (daycode[palm.getDay()] + "  " + monthcode[palm.getMonth()] + "  " + palm.getDate() + ",  " + year)
document.myForm.data7.value = palmdate
ascenddate = (daycode[ascend.getDay()] + "  " + monthcode[ascend.getMonth()] + "  " + ascend.getDate() + ",  " + year)
document.myForm.data9.value = ascenddate
pentecostdate = (daycode[pentecost.getDay()] + "  " + monthcode[pentecost.getMonth()] + "  " + pentecost.getDate() + ",  " + year)
document.myForm.data10.value = pentecostdate
allsaintsdate = (daycode[allsaints.getDay()] + "  " + monthcode[allsaints.getMonth()] + "  " + allsaints.getDate() + ",  " + year)
document.myForm.data11.value = allsaintsdate

return true
}
