//**********************Easter*******************
	var easterday=new Date()
	var tempdd=new Date()
	G = year % 19
    I = ((19*parseInt(G) + 15) % 30)
    easterday.setFullYear(year)
    easterday.setMonth(3)
    easterday.setDate(I+34-31)
    //alert(dd.getDate()+"/"+dd.getMonth()+"/"+dd.getFullYear())
    J=easterday.getDay()
    easterday.setDate(easterday.getDate()-J+7) // add a week and subtract J days to get Sunday
    tempdd.setDate(easterday.getDate())
    tempdd.setMonth(easterday.getMonth())
    //alert(tempdd)
	//alert(dd)
//**********************Easter Array*******************
function major(name, date, month, text, icon, color, tcolor)
{
	this.name=name
	this.date=date
	this.month=month
	this.text=text
	this.icon=icon
	this.color=color
	this.tcolor=tcolor
	//alert(tempdd)
}

/* 
	sets tempdd to date  plus resetd days eg. resetdate(-2) takes away 2 
	from easter and returns that date and also stores it in the global variable tempdd
*/
function resetdate(resetd)
{
	tempdd.setDate(easterday.getDate())
	tempdd.setMonth(easterday.getMonth())
	//alert(dd)
	//alert("DSF")
	tempdd.setDate(easterday.getDate()+resetd)
	//alert(tempdd.getDate())
	return tempdd.getDate()
}



easter=new major("Easter", easterday.getDate(), easterday.getMonth(), "The Joyous Feast of Easter <br><h1>Ekhrestos Anesty!<br>Alithos Anesty!", "resurection.jpg", "white", "black")
saturday=new major("Saturday", resetdate(-1), tempdd.getMonth(), "The Apocholapse", "Christ.gif", "#999999", "yellow")
friday=new major("GoodFriday", resetdate(-2), tempdd.getMonth(), "Today is Good Friday", "cross.gif", "black", "yellow")
thursday=new major("", resetdate(-3), tempdd.getMonth(), "The eve of last supper", "Christ.gif", "black", "yellow")
wednesday=new major("PassionWeek", resetdate(-4), tempdd.getMonth(), "Wednesday of Passion Week", "Christ.gif", "black", "yellow")
tuesday=new major("PassionWeek", resetdate(-5), tempdd.getMonth(), "Tuesday of Passion Week", "Christ.gif", "black", "yellow")
monday=new major("PassionWeek", resetdate(-6), tempdd.getMonth(), "Monday of Passion Week", "Christ.gif", "black", "yellow")
palmsunday=new major("Palm Sunday", resetdate(-7), tempdd.getMonth(), "Palm Sunday", "Christ.gif", "white", "black")
lent=new major("Lent Start", resetdate(-55), tempdd.getMonth(), "Lent Start", "Christ.gif", "green", "yellow")
jonah1=new major("Jonah", resetdate(-69), tempdd.getMonth(), "First Day of Jonah", "Christ.gif", "green", "yellow")
jonah2=new major("Jonah", resetdate(-68), tempdd.getMonth(), "Second Day of Jonah", "Christ.gif", "green", "yellow")
jonah3=new major("Jonah", resetdate(-67), tempdd.getMonth(), "Third Day of Jonah", "Christ.gif", "green", "yellow")
jonah4=new major("Jonah", resetdate(-66), tempdd.getMonth(), "Jonah's Feast", "Christ.gif", "green", "yellow")
christmas=new major("Christmas", 7, 0, "Celebrate the Feast of Nativity (Christmas)", "Christ.gif", "white", "black")

//paramoune=new major("Paramoune", paramoune(new Date(year,0,7)), 0, "Celebrate the Paramoune for the Feast of Nativity (Christmas)", "Christ.gif", "white", "black")

majorindex = new Array()

i = 0
majorindex[i++]=easter
majorindex[i++]=saturday
majorindex[i++]=friday
majorindex[i++]=thursday
majorindex[i++]=wednesday
majorindex[i++]=tuesday
majorindex[i++]=monday
majorindex[i++]=palmsunday
majorindex[i++]=lent
majorindex[i++]=jonah1
majorindex[i++]=jonah2
majorindex[i++]=jonah3
majorindex[i++]=jonah4
majorindex[i++]=christmas

// calcute the paramoune for the different feasts
paramoune(new Date(year,0,7), "Celebrate the Paramoune for the Feast of Nativity (Christmas)")
function paramoune(date, text){
	//alert(date)
	myDate = date.getDate()
	day = date.getDay()
	//alert(day)
	i = majorindex.length
	// feast is on monday 3 day paramoune
	if(day == 1){
		majorindex[i++] = new major("Paramoune", --myDate, 0, text, "Christ.gif", "white", "black")
		majorindex[i++] = new major("Paramoune", --myDate, 0, text, "Christ.gif", "white", "black")
		majorindex[i++] = new major("Paramoune", --myDate, 0, text, "Christ.gif", "white", "black")
	} else if (day == 0){ // feast is on Sunday 2 day paramoune
		majorindex[i++] = new major("Paramoune", --myDate, 0, text, "Christ.gif", "white", "black")
		majorindex[i++] = new major("Paramoune", --myDate, 0, text, "Christ.gif", "white", "black")
	} else { // paramoune is 1 day
		majorindex[i++] = new major("Paramoune", --myDate, 0, text, "Christ.gif", "white", "black")
	}	
	
}