// St. Mark's 10/12/2002

var months = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
var dateNow = new Date();
var yearNow = dateNow.getFullYear();
var monthNow = months[dateNow.getMonth()];
var mth = dateNow.getMonth();
var dayNow = dateNow.getDate();
var curDate = yearNow*10000 + (mth + 1)*100 + dayNow;

function writeDate(){
	document.write("<FONT SIZE=\"-1\">" + monthNow + " " + dayNow + ", " + yearNow + "</FONT>");
}

function getMap(path){
	if (path) {
	document.write("<MAP NAME=lion ID=lion><AREA ALT=Home COORDS=\"21,0,123,93\" HREF=" + path + "index.html></MAP>")
	} else {
	document.write("<MAP NAME=lion ID=lion><AREA ALT=Home COORDS=\"21,0,123,93\" HREF=index.html></MAP>")
	}
}

function writeNavBar(path){
	if (path){
	document.write("<A HREF=" + path + "events.html CLASS=nav>Upcoming Events</A><BR><BR>");
	document.write("<A HREF=" + path + "news.html CLASS=nav>Late Breaking News</A><BR><BR>");
	document.write("<A HREF=" + path + "mission.html CLASS=nav>Mission Statement</A><BR><BR>");
	document.write("<A HREF=" + path + "location.html CLASS=nav>Location</A><BR><BR>");
	document.write("<A HREF=" + path + "staff.html CLASS=nav>Pastoral Staff</A><BR><BR>");
	document.write("<A HREF=" + path + "bulletin.shtml CLASS=nav>Parish Bulletin</A><BR><BR>");
	document.write("<A HREF=" + path + "ministries.html CLASS=nav>Ministries</A><BR><BR>");
	document.write("<A HREF=" + path + "ministry_schedule.html CLASS=nav>Ministry Schedule</A><BR><BR>");
	document.write("<A HREF=" + path + "liturgy.html CLASS=nav>Liturgy</A><BR><BR>");
	document.write("<A HREF=" + path + "links.html CLASS=nav>Related Links</A><BR><BR><BR>");
	//document.write("<A CLASS=\"nav\" HREF=\"" + path + "links.html\">Related Links</A><BR><BR><BR><BR>")
	} else {
	document.write("<A HREF=events.html CLASS=nav>Upcoming Events</A><BR><BR>");
	document.write("<A HREF=news.html CLASS=nav>Late Breaking News</A><BR><BR>");
	document.write("<A HREF=mission.html CLASS=nav>Mission Statement</A><BR><BR>");
	document.write("<A HREF=location.html CLASS=nav>Location</A><BR><BR>");
	document.write("<A HREF=staff.html CLASS=nav>Pastoral Staff</A><BR><BR>");
	document.write("<A HREF=bulletin.shtml CLASS=nav>Parish Bulletin</A><BR><BR>");
	document.write("<A HREF=ministries.html CLASS=nav>Ministries</A><BR><BR>");
	document.write("<A HREF=ministry_schedule.html CLASS=nav>Ministry Schedule</A><BR><BR>");
	document.write("<A HREF=liturgy.html CLASS=nav>Liturgy</A><BR><BR>");
	document.write("<A HREF=links.html CLASS=nav>Related Links</A><BR><BR>");

	}
}
function writeQuote(){
	var Quote = new Array();

	Quote[0] = "For the Lord watches over the way of the righteous...<BR>--Psalm 1:6";
	Quote[1] = "Do not merely listen to the word, and so deceive yourselves. Do what it says.<BR>--James 1:22";
	Quote[2] = "If you remain in me and my words remain in you,ask whatever you wish, and it will be given you.<BR>--John 15:7";
	Quote[3] = "Love the Lord your God with all your heart and with all your soul and with all your mind.<BR>--Matthew 22:37";
	Quote[4] = "Be still, and know that I am God...<BR>--Psalm 46:10";	
	Quote[5] = "Love the Lord your God with all your heart and with all your soul and with all your mind.<BR>--Matthew 22:37";
	Quote[6] = "It is better to take refuge in the Lord than to put confidence in princes.<BR>--Psalm 118:9";
	Quote[7] = "Let the heavens praise your wonders, O Lord.<BR>--Psalm 89:5";
	Quote[8] = "Create in me a clean heart, O God.<BR>--Psalm 51:10";
	Quote[9] = "Blessed are those who trust in the Lord.<BR>Jeremiah 17:7";
	Quote[11] = "Come, let us press on to know the Lord...<BR>Hosea 6:3";
	Quote[10] = "I am the Lord, who leads you in the way you should go.<BR>--Isaiah 48:17";
	Quote[12] = "Ascribe to the Lord the glory due his name.<BR>--Psalm 96:8";
	Quote[13] = "The LORD ... will quiet you with his love, he will rejoice over you with singing.<BR>--Zephaniah 3:17";
	Quote[14] = "For it is not those who hear the law who are righteous in God's sight, but it is those who obey the law who will be declared righteous.<BR>--Romans 2:13";
	Quote[15] = "Remember not the sins of my youth <BR>and my rebellious ways; <BR>according to your love remember me,<BR> for you are good, O LORD.<BR>--Psalm 25:7";
	Quote[16] = "Don't be afraid; just believe.<BR>--Mark 5:36";

var number = dayNow - 1;
// var index = 29; 			// for debug only
// var number = index;		// for debug only
while (number >= Quote.length){
	number = number - Quote.length;
	}
document.write("<FONT CLASS=\"ministries\">" + Quote[number] + "</FONT><BR>");
}

//writes footer containing copyright and author at bottom of each page and updates year
function writeFooter() {
var now = new Date();
var thisYear = now.getYear();
	if(thisYear < 1900){
	thisYear += 1900;
	}
// First year of copyright notice
var startYear = 2001;
	if (startYear == thisYear){
	startYear = "";
	}
	else {
	startYear = startYear + "-";
	}
	document.write ("<BR><DIV CLASS=copy>Copyright &copy; " + startYear + thisYear + " St. Mark's Parish. All Rights Reserved.<BR>");
	document.write("Send feedback to <A CLASS=copy HREF=\"mailto:webmaster@saintmarksparish.org\">webmaster@saintmarksparish.org</A></DIV>")
}
function writeMailLink() {
document.write("<A CLASS=\"mail\" HREF=\"mailto:ParishMail@saintmarksparish.org\">ParishMail@SaintMarksParish.org</A>")
}

function writeSearchBox(path){
document.write("<FORM method=\"GET\" action=\"http://www.saintmarksparish.org/cgi-sys/cgiwrap/ibdevco/stmarks/perlfect/search/search.pl\">");
document.write("<INPUT type=\"hidden\" name=\"p\" value=\"1\">");
document.write("<INPUT type=\"hidden\" name=\"lang\" value=\"en\">");
document.write("<input type=\"hidden\" name=\"include\" value=\"\">");
//document.write("<input type=\"hidden\" name=\"exclude\" value=\"\">");
document.write("<input type=\"hidden\" name=\"exclude\" value=\"\/bulletins\/\">");
document.write("<input type=\"hidden\" name=\"penalty\" value=\"0\">");
document.write("<INPUT type=\"hidden\" name=\"mode\" value=\"any\">");
document.write("<INPUT CLASS=\"search\" TYPE=\"text\" NAME=\"q\" VALUE=\"Enter&nbsp;Keywords\" SIZE=\"15\">");
document.write("<BR><INPUT TYPE=\"image\" SRC=\"" + path + "images/search_button.gif\" ALIGN=\"middle\" HSPACE=\"2\"></FORM>");
// document.write("<BR>");
}
