<!--

//---------------------------
// Easter date code
//---------------------------

function Initialize()
{
    var d = new Date();
    document.calc.year.value  = d.getYear();
    calculate();
}

/*
**  computes the date of Easter
**
**  Adapted from a BASIC program which appeared in 
**  Astronomical Computing, Sky & Telescope, March, 1986
*/
function calculate()
{
    var y = document.calc.year.value;    
    if( y < 1583 )
    {
        document.calc.date.value = "Invalid Year";
        return 0;
    }
    var a, b, c, d, e, f, g, h, i, j, k, m, n, p;
    var temp;
    var mon;

    temp = y / 19;
    a = Math.floor( ( temp - Math.floor( temp ) ) * 19 + 0.001 );

    temp = y / 100;
    b = Math.floor( temp );
    c = Math.floor( ( temp - Math.floor( temp ) ) * 100 + 0.001 );

    temp = b / 4;
    d = Math.floor( temp );
    e = Math.floor( ( temp - Math.floor( temp ) ) *4 + 0.001 );
    f = Math.floor( ( ( b + 8 ) / 25 ) + 0.001 );
    g = Math.floor( ( b - f + 1 ) / 3 )

    temp = ( 19 * a + b - d - g + 15 ) / 30;
    h = Math.floor( ( temp - Math.floor( temp ) ) * 30 + 0.001 );

    temp = c / 4;
    i = Math.floor( temp );
    j = Math.floor( ( temp - i ) * 4 + 0.001 );

    temp = ( 32 + 2 * e + 2 * i - h - j ) / 7;
    k = Math.floor( ( temp - Math.floor( temp ) ) * 7 + 0.001 );
    m = Math.floor( ( a + 11 * h + 22 * k ) / 451 );

    temp = ( h + k - 7 * m + 114 ) / 31;
    n = Math.floor( temp );
    p = Math.floor( ( temp - n ) * 31 + 0.001 );

    mon = "April ";
    if( n == 3 )
        mon = "March ";

    document.calc.date.value = mon + ( ++p );
}

function advance()
{
    ++document.calc.year.value;
    calculate();
}

function back_up()
{
    --document.calc.year.value;    
    calculate();
}
// function septuagesima()         -63 
// function quinquagesima()        -49
// function ash_wednesday()        -46 
// function palm_sunday()           -7
// function good_friday()           -2 
// function rogation_sunday()         35
// function ascension()               39
// function pentecost()               49
// function trinity_sunday()          56
// function corpus_christi()          60

-->
