function top_div()
{
browser_name = which_browser(); 

switch(browser_name)
{
case "Firefox":
  document.write("<div id='main_menu' align='center' style='margin-top: 0px; margin-left: -16px; padding-bottom: .25in;'>");
  break;    
case "Safari":
  document.write("<div id='main_menu' align='center' style='margin-top: 0px; margin-left: -16px; padding-bottom: .25in;'>");
  break;
case "Chrome":
  document.write("<div id='main_menu' align='center' style='margin-top: 0px; margin-left: -17px; padding-bottom: .25in;'>");
  break;
default:
  document.write("<div id='main_menu' align='center' style='margin-top: 0px; margin-left: 0px; padding-bottom: .25in;'>");
}
}

function top_row()
{
  document.write("<table width='966' height='362' border='0' cellpadding='0' cellspacing='0' align='center'><tr>");
  document.write("<td width='238' height='34'><a href='/'><img src='/images/masthead_top_left_238x34.jpg' border='0'></a></td>");
  document.write("<td width='728' height='34'>");
  document.write("<table width='728' height='34' border='0' cellpadding='0' cellspacing='0'>");
  document.write("<tr>");
  document.write("<td width='554' height='34'><a href='/'><img src='/images/masthead_top_middle_554x34.jpg' border='0'></a></td>");
  document.write("<script>horizontal_menu_1();</script>");
  document.write("<td width='30' height='34'><a href='/'><img src='/images/masthead_top_right_30x34.jpg' border='0'></a></td>");
  document.write("</tr></table>");
  document.write("</td></tr>");
  document.write("<tr><td width='238' height='145'><img src='/images/masthead_middle_left_238x145.jpg' border='0'></td>");
  document.write("<td width='728' height='145'><a href='/'><img src='/images/masthead_middle_right_728x145.jpg' border='0'></a></td></tr>");
  document.write("<tr><td width='238' height='183'><img src='/images/masthead_bottom_left_238x183.jpg' border='0'></td>");
  document.write("<td width='728' height='183' style='vertical-align: top;'>");
  document.write("<table width='728' height='79' border='0' cellpadding='0' cellspacing='0'>");
  document.write("<tr>");
  document.write("<script>horizontal_menu_2();</script>");
  document.write("</tr></table>");
  document.write("</td></tr></table>");
}

function left_column()
{
  document.write("<td width='200' class='content' style='font-size: 10pt; line-height: 1.5; text-align: left;'>");
  document.write("<div style='padding-left: .25in;'>");
  document.write("<b>Sunday Services<br>");
  document.write("Matins</b><br>");
  document.write("9:00 am<br>");
  document.write("<b>Divine Liturgy</b><br>");
  document.write("10:00 am<br>");
  document.write("<br>");
  document.write("<p><a href='http://www.ocgreekfest.com' target='_blank'>");
  document.write("<img src='/images/ocgreekfest_logo_136px_122px.jpg' border='0' alt='[OC Greek Fest!]'></a></p>");
  document.write("</div></td>");
}

function list_sign_up()
{
  document.write("<div style='text-align: center; line-height: 1.5;'>");
  document.write("<div style='padding-bottom: 7px;'><img src='/images/bullet.gif' border='0' alt='[Bullet]'> ");
  document.write("<a href='http://lists.stjohnanaheim.org/mailman/listinfo/stjohn_members/' class='text_11pt' target='_blank'>Sign-up for Saint John Church e-mail list!</a></div>");
  document.write("<img src='/images/bullet.gif' border='0' alt='[Bullet]'> ");
  document.write("<a href='http://lists.stjohnanaheim.org/mailman/listinfo/ocgreekfest_members/' class='text_11pt' target='_blank'>Sign-up for the OC Greek Fest e-mail list!</a><br>");
  document.write("<div style='font-size: 9pt; color: gray; padding-top: 5px; padding-bottom: 0px;'>");
  document.write("This will launch a new window. ");
  document.write("You will need to confirm your signup by e-mail.");
  document.write("</div>");
  document.write("</div>");
}

function firefox_br()
{
browser_name = which_browser(); 

switch(browser_name)
{
case "Firefox":
  document.write("<br>");
  break;    
}
}

function preload_images()
{

  image1off = new Image();
  image1off.src = "/images/masthead_top_home_72x34_off.jpg";

  image2off = new Image();
  image2off.src = "/images/masthead_top_contact_72x34_off.jpg";

  image3off = new Image();
  image3off.src = "/images/nav01_104x79_off.jpg";

  image4off = new Image();
  image4off.src = "/images/nav02_104x79_off.jpg";

  image5off = new Image();
  image5off.src = "/images/nav03_104x79_off.jpg";

  image6off = new Image();
  image6off.src = "/images/nav04_104x79_off.jpg";

  image7off = new Image();
  image7off.src = "/images/nav05_104x79_off.jpg";

  image8off = new Image();
  image8off.src = "/images/nav06_104x79_off.jpg";

  image9off = new Image();
  image9off.src = "/images/nav07_104x79_off.jpg";

  image1on = new Image();
  image1on.src = "/images/masthead_top_home_72x34_on.jpg";

  image2on = new Image();
  image2on.src = "/images/masthead_top_contact_72x34_on.jpg";

  image3on = new Image();
  image3on.src = "/images/nav01_104x79_on.jpg";

  image4on = new Image();
  image4on.src = "/images/nav02_104x79_on.jpg";

  image5on = new Image();
  image5on.src = "/images/nav03_104x79_on.jpg";

  image6on = new Image();
  image6on.src = "/images/nav04_104x79_on.jpg";

  image7on = new Image();
  image7on.src = "/images/nav05_104x79_on.jpg";

  image8on = new Image();
  image8on.src = "/images/nav06_104x79_on.jpg";

  image9on = new Image();
  image9on.src = "/images/nav07_104x79_on.jpg";

}

function turnOn(imagename) {
  if (document.images) {
    document[imagename].src = eval(imagename + "on.src");
  }
}

function turnOff(imagename) {
  if (document.images) {
    document[imagename].src = eval(imagename + "off.src");
  }
}

function horizontal_menu_1()
{
  document.write("<td width='72' height='34'><a href=\"/\" onMouseOver=\"turnOn('image1')\" onMouseOut=\"turnOff('image1')\"><img src = \"/images/masthead_top_home_72x34_off.jpg\" name=\"image1\" border=\"0\" width=\"72\" height=\"34\" align=\"bottom\"></a></td>");
  document.write("<td width='72' height='34'><a href=\"/about/contact_us.htm\" onMouseOver=\"turnOn('image2')\" onMouseOut=\"turnOff('image2')\"><img src = \"/images/masthead_top_contact_72x34_off.jpg\" name=\"image2\" border=\"0\" width=\"72\" height=\"34\" align=\"bottom\"></a></td>");
}

function horizontal_menu_2()
{
  document.write("<td width='104' height='79'><a href=\"/about/\" onMouseOver=\"turnOn('image3')\" onMouseOut=\"turnOff('image3')\"><img src = \"/images/nav01_104x79_off.jpg\" name=\"image3\" border=\"0\" width=\"104\" height=\"79\" align=\"bottom\"></a></td>");
  document.write("<td width='104' height='79'><a href=\"/ministries\" onMouseOver=\"turnOn('image4')\" onMouseOut=\"turnOff('image4')\"><img src = \"/images/nav02_104x79_off.jpg\" name=\"image4\" border=\"0\" width=\"104\" height=\"79\" align=\"bottom\"></a></td>");
  document.write("<td width='104' height='79'><a href=\"/events/\" onMouseOver=\"turnOn('image5')\" onMouseOut=\"turnOff('image5')\"><img src = \"/images/nav03_104x79_off.jpg\" name=\"image5\" border=\"0\" width=\"104\" height=\"79\" align=\"bottom\"></a></td>");
  document.write("<td width='104' height='79'><a href=\"/faith/\" onMouseOver=\"turnOn('image6')\" onMouseOut=\"turnOff('image6')\"><img src = \"/images/nav04_104x79_off.jpg\" name=\"image6\" border=\"0\" width=\"104\" height=\"79\" align=\"bottom\"></a></td>");
  document.write("<td width='104' height='79'><a href=\"/donate/\" onMouseOver=\"turnOn('image7')\" onMouseOut=\"turnOff('image7')\"><img src = \"/images/nav05_104x79_off.jpg\" name=\"image7\" border=\"0\" width=\"104\" height=\"79\" align=\"bottom\"></a></td>");
  document.write("<td width='104' height='79'><a href=\"/ministries/youth_programs.htm\" onMouseOver=\"turnOn('image8')\" onMouseOut=\"turnOff('image8')\"><img src = \"/images/nav06_104x79_off.jpg\" name=\"image8\" border=\"0\" width=\"104\" height=\"79\" align=\"bottom\"></a></td>");
  document.write("<td width='104' height='79'><a href=\"/about/contact_us.htm\" onMouseOver=\"turnOn('image9')\" onMouseOut=\"turnOff('image9')\"><img src = \"/images/nav07_104x79_off.jpg\" name=\"image9\" border=\"0\" width=\"104\" height=\"79\" align=\"bottom\"></a></td>");
}

function footer()
{
  document.write("<tr><td class='bottom' height='145' width='966' style='color: #FFE6C0;'>");
  document.write("<img src='/images/bullet_diamond_orange.gif' border='0' alt='[Bullet]'> ");
  document.write("<a href='/'class='text_9pt_white'>Home</a> :: ");
  document.write("<a href='/about/' class='text_9pt_white'>About Us</a> :: ");
  document.write("<a href='/about/map_and_directions.htm' class='text_9pt_white'>Directions</a> :: ");
  document.write("<a href='/ministries/' class='text_9pt_white'>Ministries</a> :: ");
  document.write("<a href='/calendar/' class='text_9pt_white'>Calendar</a> :: ");
  document.write("<a href='/vineyard/' class='text_9pt_white'>Monthly Vineyard</a> :: ");  
  document.write("<a href='/photo/' class='text_9pt_white'>Photo Gallery</a><br>");
  document.write("<a href='/faith/' class='text_9pt_white'>Our Faith</a> :: ");
  document.write("<a href='/donate/' class='text_9pt_white'>Stewardship</a> :: ");
  document.write("<a href='/ministries/youth_programs.htm' class='text_9pt_white'>Youth</a> :: "); 
  document.write("<a href='/links/' class='text_9pt_white'>Links</a> :: ");
  document.write("<a href='/archive/' class='text_9pt_white'>Event Archive</a> :: ");      
  document.write("<a href='/about/contact_us.htm' class='text_9pt_white'>Contact Us</a> :: ");
  document.write("<a href='#top' class='text_9pt_white'>Top of Page</a>");

  document.write("<div style='padding-bottom: .25in;'>");
  document.write("<br>");
  document.write("</div>");

  document.write("405 North Dale Street &nbsp;&nbsp;&nbsp; Anaheim, CA 92801 &nbsp;&nbsp;&nbsp; (714) 827-0181 Telephone &nbsp;&nbsp;&nbsp; (714) 827-8143 Fax<br>");

  document.write("</td></tr>");
}

function faith_menu()
{
  document.write("<hr size='3' color='#691620' width='100'><br>");

  document.write("TREASURES OF ORTHODOXY is a series of articles written for the non-Orthodox, especially those who are considering ");
  document.write("becoming members of the Orthodox Church and who wish to deepen their appreciation of her faith, worship, and traditions. ");
  document.write("The articles are authored by Fr. Thomas Fitzgerald, a faculty member of Hellenic College-Holy Cross School of Theology. ");
  document.write("The article titles are as follows:");

  document.write("<ol style='margin-bottom: 20px;'>");
  document.write("<li>");
  document.write("<a href='introduction_to_the_orthodox_church.htm' class='text_11pt'>Introduction to the Orthodox Church</a><br>");
  document.write("Introduces the non Orthodox to Orthodox Christianity.");
  document.write("</li>");

  document.write("<li>");
  document.write("<a href='house_of_god.htm' class='text_11pt'>House of God</a><br>");
  document.write("Describes the interior of the church building.");
  document.write("</li>");

  document.write("<li>");
  document.write("<a href='worship.htm' class='text_11pt'>Worship</a><br>");
  document.write("Discusses the form and characteristics of Orthodox worship.");
  document.write("</li>");

  document.write("<li>");
  document.write("<a href='liturgy.htm' class='text_11pt'>Liturgy</a><br>");
  document.write("Describes the meaning and celebration of the Eucharist.");
  document.write("</li>");

  document.write("<li>");
  document.write("<a href='sacraments.htm' class='text_11pt'>Sacraments</a><br>");
  document.write("Describes the meaning and importance of liturgical life.");
  document.write("</li>");

  document.write("<li>");
  document.write("<a href='special_services.htm' class='text_11pt'>Special Services and Blessings</a><br>");
  document.write("Describes the non-sacramental services which contribute to spiritual life.");
  document.write("</li>");

  document.write("<li>");
  document.write("<a href='teachings.htm' class='text_11pt'>Teachings of the Orthodox Church</a><br>");
  document.write("Outlines the salient points of doctrine and basic credal affirmations.");
  document.write("</li>");

  document.write("<li>");
  document.write("<a href='spirituality.htm' class='text_11pt'>Spirituality</a><br>");
  document.write("Discusses the meaning of theosis as the goal of Christian life.");
  document.write("</li>");

  document.write("<li>");
  document.write("<a href='history.htm' class='text_11pt'>History</a><br>");
  document.write("Sketches the great epochs of Orthodoxy.");
  document.write("</li>");

  document.write("<li>");
  document.write("<a href='church.htm' class='text_11pt'>The Church</a><br>");
  document.write("Outlines the procedure for becoming a member of the Orthodox Church.");
  document.write("</li>");
  document.write("</ol>");
}

function which_browser() {
// Browser Detection Javascript
// copyright 1 February 2003, by Stephen Chapman, Felgall Pty Ltd

// You have permission to copy and use this javascript provided that
// the content of the script is not changed in any way.

var agt=navigator.userAgent.toLowerCase();
if (agt.indexOf("chrome") != -1) return 'Chrome';
if (agt.indexOf("opera") != -1) return 'Opera';
if (agt.indexOf("staroffice") != -1) return 'Star Office';
if (agt.indexOf("webtv") != -1) return 'WebTV';
if (agt.indexOf("beonex") != -1) return 'Beonex';
if (agt.indexOf("chimera") != -1) return 'Chimera';
if (agt.indexOf("netpositive") != -1) return 'NetPositive';
if (agt.indexOf("phoenix") != -1) return 'Phoenix';
if (agt.indexOf("firefox") != -1) return 'Firefox';
if (agt.indexOf("safari") != -1) return 'Safari';
if (agt.indexOf("skipstone") != -1) return 'SkipStone';
if (agt.indexOf("msie") != -1) return 'Internet Explorer';
if (agt.indexOf("netscape") != -1) return 'Netscape';
if (agt.indexOf("mozilla/5.0") != -1) return 'Mozilla';
if (agt.indexOf('\/') != -1) {
if (agt.substr(0,agt.indexOf('\/')) != 'mozilla') {
return navigator.userAgent.substr(0,agt.indexOf('\/'));}
else return 'Netscape';} else if (agt.indexOf(' ') != -1)
return navigator.userAgent.substr(0,agt.indexOf(' '));
else return navigator.userAgent;
}

function show_date()
{
// ***********************************************
// AUTHOR: WWW.CGISCRIPT.NET, LLC
// URL: http://www.cgiscript.net
// Use the script, just leave this message intact.
// Download your FREE CGI/Perl Scripts today!
// ( http://www.cgiscript.net/scripts.htm )
// ***********************************************

// Get today's current date.
var now = new Date();

// Array list of days.
var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');

// Array list of months.
var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');

// Calculate the number of the current day in the week.
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

// Calculate four digit year.
function fourdigits(number)	{
	return (number < 1000) ? number + 1900 : number;
								}

// Join it all together
// today =  days[now.getDay()] + ", " +
//               months[now.getMonth()] + " " +
//                date + ", " +
//                 (fourdigits(now.getYear())) ;
// 
day_of_week = days[now.getDay()]
today =  months[now.getMonth()] + " " +
               date + ", " +
                (fourdigits(now.getYear())) ;

// Print out the data.
document.write("<span style='font: 9pt arial, helvetica, sans serif; font-weight: bold;'>"+day_of_week+", "+today+"</span>");
}

function show_year()
{
// ***********************************************
// AUTHOR: WWW.CGISCRIPT.NET, LLC
// URL: http://www.cgiscript.net
// Use the script, just leave this message intact.
// Download your FREE CGI/Perl Scripts today!
// ( http://www.cgiscript.net/scripts.htm )
// ***********************************************

// Get today's current date.
var now = new Date();

// Array list of days.
var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');

// Array list of months.
var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');

// Calculate the number of the current day in the week.
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

// Calculate four digit year.
function fourdigits(number)	{
	return (number < 1000) ? number + 1900 : number;
								}

// Join it all together
// today =  days[now.getDay()] + ", " +
//               months[now.getMonth()] + " " +
//                date + ", " +
//                 (fourdigits(now.getYear())) ;
// 
day_of_week = days[now.getDay()]
today =  months[now.getMonth()] + " " +
               date + ", " +
                (fourdigits(now.getYear())) ;

year =  (fourdigits(now.getYear())) ;

// Print out the data.
document.write(year);
}
