<!--

//**************************************************
// Dynamic Body Background Script - VAC - 1/5/2009
//**************************************************

var mydate= new Date();

//*** for testing - 'mydate' is now a new date ***
//var mydate= new Date(2009,7,23);

var theYear=mydate.getFullYear();
var theMonth=mydate.getMonth()+1;
var theDate=mydate.getDate();
var theDay=mydate.getDay();

// -------------------------------------------------------------------
// standard settings for new table framed effect 7/24/09 
// -------------------------------------------------------------------
document.getElementById('frametable').bgColor="white";
document.getElementById('frametable').cellPadding="7";
document.getElementById('frametable').cellSpacing="4";
document.getElementById('frametable').border="3";
// -------------------------------------------------------------------



// -------------------------------------------------------------------
// the color for Epiphany and Kingdomtide is always green
// -------------------------------------------------------------------
if (
    (theMonth == 1 && (theDate >= 17 && theDate <= 31)) ||
    (theMonth == 2 && (theDate >= 7 && theDate <= 13)) ||
    (theMonth == 8 && (theDate >= 29 && theDate <= 31)) ||
    (theMonth == 9 && (theDate >= 1 && theDate <= 30)) ||
    (theMonth == 10 && (theDate >= 1 && theDate <= 31)) ||
    (theMonth == 11 && (theDate >= 1 && theDate <= 27)) 
   )
   {
     //document.body.style.backgroundColor="green";
     //document.body.style.backgroundImage="url(images/bg_blended_green.jpg)";
     //document.body.style.backgroundRepeat="repeat-x";
	 // -----
	 // color frame around table for added effect 7/24/09
	 // -----
     document.getElementById('frametable').borderColor="green";
   }
// -------------------------------------------------------------------
// the color for Lent, Holy Week, Advent is always purple
// -------------------------------------------------------------------
else if (
    (theMonth == 2 && (theDate >= 21 && theDate <= 29)) ||
    (theMonth == 3 && (theDate >= 1 && theDate <= 31)) ||
    (theMonth == 11 && (theDate >= 28 && theDate <= 30))||
    (theMonth == 12 && (theDate >= 1 && theDate <= 23))
   )
   {
     //document.body.style.backgroundColor="purple";
     //document.body.style.backgroundImage="url(images/bg_blended_purple.jpg)";
     //document.body.style.backgroundRepeat="repeat-x";
	 // -----
	 // color frame around table for added effect 7/24/09
	 // -----
     document.getElementById('frametable').borderColor="purple";
   }
// -------------------------------------------------------------------
// the color for Pentecost is always red
// -------------------------------------------------------------------
else if (
    (theMonth == 5 && (theDate >= 23 && theDate <= 31)) ||
    (theMonth == 6 && (theDate >= 1 && theDate <= 30)) ||
    (theMonth == 7 && (theDate >= 1 && theDate <= 31)) ||
    (theMonth == 8 && (theDate >= 1 && theDate <= 28))
   )
   {
     //document.body.style.backgroundColor="red";
     //document.body.style.backgroundImage="url(images/bg_blended_gold.jpg)";
     //document.body.style.backgroundRepeat="repeat-x";
	 // -----
	 // color frame around table for added effect 7/24/09
	 // -----
     document.getElementById('frametable').borderColor="red";
   }
// -------------------------------------------------------------------
// the color for Eastertide and Christmastide is always white
// -------------------------------------------------------------------
else
   {
     //document.body.style.backgroundColor="white";
	 // -----
	 // color frame around table for added effect 7/24/09
	 // -----
     document.getElementById('frametable').borderColor="#eeeeee";
   }


// -------------------------------------------------------------------
// the color for Ash Wednesday, Good Friday and Holy Saturday is always black
// -------------------------------------------------------------------
if (
	(theMonth == 2 && theDate == 17) ||
	(theMonth == 4 && (theDate == 2 || theDate == 3))
   )
   {
     //document.body.style.backgroundColor="black";
	 // -----
	 // color frame around table for added effect 7/24/09
	 // -----
     document.getElementById('frametable').borderColor="black";
   }


// -------------------------------------------------------------------
// the color for First Sunday is always white
// -------------------------------------------------------------------
if (theDate < 8 && theDay == 0)
   {
     document.body.style.backgroundColor="white";
	 // -----
	 // color frame around table for added effect 7/24/09
	 // -----
     document.getElementById('frametable').borderColor="#eeeeee";
   }





//document.write("The date is: ")
//document.write(theMonth+"-"+theDay+"-"+theYear)

// -->
