function top_div()
{
browser_name = which_browser(); 

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

function top_row_966px()
{

browser_name = which_browser(); 

switch(browser_name)
{
case "Firefox":
  document.write("<tr bgcolor='#9B1313'><td colspan='2' style='padding-bottom: 48px; border-left: solid 1px #3F3A34; border-right: solid 1px #3F3A34;'>");
  break;    
case "Safari":
  document.write("<tr bgcolor='#9B1313'><td colspan='2' style='padding-bottom: 48px; border-left: solid 1px #3F3A34; border-right: solid 1px #3F3A34;'>");
  break;
case "Chrome":
  document.write("<tr bgcolor='#9B1313'><td colspan='2' style='padding-bottom: 49px; border-left: solid 1px #3F3A34; border-right: solid 1px #3F3A34;'>");
  break;
default:
  document.write("<tr bgcolor='#9B1313'><td colspan='2' style='padding-bottom: 48px; border-left: solid 1px #3F3A34; border-right: solid 1px #3F3A34;'>");
}

  /* Start masthead tables */
  document.write("<table width='966' height='102' border='0' cellpadding='0' cellspacing='0' align='center'><tr><td width='582' height='102'>");
  
  document.write("<table width='582' height='102' border='0' cellpadding='0' cellspacing='0'><tr><td width='582' height='102'><a href='/'><img src='/images/masthead_top_left_582x102.jpg' border='0'></a></td></tr></table>");
  
  document.write("</td><td width='354'>");  
  
  document.write("<table border='0' cellpadding='0' cellspacing='0'><tr><td width='354' height='27' valign='top'>");
  document.write("<script>horizontal_menu();</script>");
  document.write("</td>");  
  document.write("<td width='30' height='27' valign='top'><a href='/'><img src='/images/masthead_top_right_30x27.jpg' border='0'></a></td>");
  document.write("</tr>");
  document.write("<tr><td colspan='2' width='384' height='75'>");
  document.write("<a href='/'><img src='/images/masthead_bottom_right_384x75.jpg' border='0'></a></td>");
  document.write("</tr></table>");
  
  document.write("</td></tr></table>");
  /* End masthead tables */
  
  document.write("</td></tr>");  
}

function top_row()
{
browser_name = which_browser(); 

switch(browser_name)
{
case "Firefox":
  document.write("<tr bgcolor='#9B1313'><td colspan='2' style='padding-bottom: 33px; border-left: solid 1px #3F3A34; border-right: solid 1px #3F3A34;'>");
  break;    
case "Safari":
  document.write("<tr bgcolor='#9B1313'><td colspan='2' style='padding-bottom: 33px; border-left: solid 1px #3F3A34; border-right: solid 1px #3F3A34;'>");
  break;
case "Chrome":
  document.write("<tr bgcolor='#9B1313'><td colspan='2' style='padding-bottom: 34px; border-left: solid 1px #3F3A34; border-right: solid 1px #3F3A34;'>");
  break;
default:
  document.write("<tr bgcolor='#9B1313'><td colspan='2' style='padding-bottom: 33px; border-left: solid 1px #3F3A34; border-right: solid 1px #3F3A34;'>");
}
document.write("<img src='/images/top_banner.jpg' width='916' height='102' border='0' alt='[Saint Sophia Cathedral - Los Angeles, California]'>");
document.write("</td></tr>");
}

function firefox_br()
{
browser_name = which_browser(); 

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

function stsophia_top_home()
{
  document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" width=\"766\" height=\"268\">");
  document.write("<param name=movie value=\"/stsophia_top_home.swf\">");
  document.write("<param name=quality value=high>");
  document.write("<param name=wmode value=transparent>");
  document.write("<embed src=\"/stsophia_top_home.swf\" quality=high wmode=transparent width=766 height=268 pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\">");
  document.write("</embed>");
  document.write("</object>");
}

function stsophia_top()
{
  document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" width=\"766\" height=\"268\">");
  document.write("<param name=movie value=\"/stsophia_top.swf\">");
  document.write("<param name=quality value=high>");
  document.write("<param name=wmode value=transparent>");
  document.write("<embed src=\"/stsophia_top.swf\" quality=high wmode=transparent width=766 height=268 pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\">");
  document.write("</embed>");
  document.write("</object>");
}

function preload_images()
{

  image0off = new Image();
  image0off.src = "/images/enter_off.jpg";

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

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

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

  image0on = new Image();
  image0on.src = "/images/enter_on.jpg";
  
  image1on = new Image();
  image1on.src = "/images/masthead_top_new_90x27_on.jpg";

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

  image3on = new Image();
  image3on.src = "/images/masthead_top_contact_102x27_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()
{
  document.write("<table width='354' height='27' border='0' cellpadding='0' cellspacing='0'><tr>");
  document.write("<td width='90' height='27'><a href='/first_time_visitors.htm' onMouseOver=\"turnOn('image1')\" onMouseOut=\"turnOff('image1')\"><img src = \"/images/masthead_top_new_90x27_off.jpg\" name=\"image1\" border=\"0\" width=\"90\" height=\"27\" align=\"bottom\"></a></td>");
  document.write("<td width='162' height='27'><a href='/ministries/choir/music/' onMouseOver=\"turnOn('image2')\" onMouseOut=\"turnOff('image2')\"><img src = \"/images/masthead_top_listen_162x27_off.jpg\" name=\"image2\" border=\"0\" width=\"162\" height=\"27\" align=\"bottom\"></a></td>");
  document.write("<td width='102' height='27'><a href='/about/contact_us.htm' onMouseOver=\"turnOn('image3')\" onMouseOut=\"turnOff('image3')\"><img src = \"/images/masthead_top_contact_102x27_off.jpg\" name=\"image3\" border=\"0\" width=\"102\" height=\"27\" align=\"bottom\"></a></td>");  
  document.write("</tr></table>");
}

function right_column()
{
  document.write("<td valign='top' width='255' class='right_column' style='padding-top: 0; padding-left: 0; padding-right: 0; padding-bottom: 0; border-left: solid 1px #DCDADA; border-right: solid 1px #3F3A34;'>");
  document.write("<table width='255' height='100%' align='left' border='0' cellpadding='0' cellspacing='0'>");
  document.write("<tr>");
  document.write("<td width='255' height='48' valign='top' background='/images/right_design_top.jpg' style='padding-top: 3px; padding-left: 5px;'>");
  document.write("<script>show_date();</script>");
  document.write("</td>");
  document.write("</tr>");
  document.write("<tr><td valign='top' background='/images/right_design_middle.jpg'>");
  document.write("<p align='right' style='margin-right: 35px'>");
  document.write("....................................................");
  document.write("</p>");
  document.write("<p style='margin-left: 20px; color: #6e6e6e;'>");
  document.write("<img src='/images/st_sophia_cathedral_interior_185px.jpg'  border='0' alt='[Saint Sophia Cathedral]'>");
  document.write("</p>");
  document.write("<p align='right' style='margin-right: 35px'>");
  document.write("....................................................");
  document.write("</p>");
  document.write("</td></tr>");
  document.write("<tr><td>");
  document.write("<img src='/images/right_design_middle_bottom.jpg' width='255' height='95'>");
  document.write("</td></tr>");
  document.write("<tr><td background='/images/right_design_bottom.jpg' style='font: 10pt; arial, helvetica, sans-serif; line-height: 1.3; text-align: center; vertical-align: top;'>");
  document.write("<b>Saint Sophia Cathedral</b><br>");
  document.write("1324 S. Normandie Avenue<br>");
  document.write("Los Angeles, CA 90006<br>");
  document.write("(323) 737-2424<br>");
  document.write("</td>");
  document.write("</tr>");
  document.write("</table>");
  document.write("</td>");
}

function footer()
{
  document.write("<tr><td colspan='2' style='background-image: url(/images/footer_tan_gradient_60px.jpg); height: 60px; text-align: center; vertical-align: middle; border-right: solid 1px #3F3A34;'>");
  document.write("<img src='/images/bullet_diamond_red.gif' border='0' alt='[Bullet]'> ");
  document.write("<a href='#top' class='text_9pt'>Top of Page</a> :: ");
  document.write("<a href='javascript:history.back()' class='text_9pt'>Back to Last Page</a><br>");
  document.write("</td></tr>");
}

function footer_no_border()
{
  document.write("<tr><td colspan='2' style='background-image: url(/images/footer_tan_gradient_60px.jpg); height: 60px; text-align: center; vertical-align: middle;'>");
  document.write("<img src='/images/bullet_diamond_red.gif' border='0' alt='[Bullet]'> ");
  document.write("<a href='#top' class='text_9pt'>Top of Page</a> :: ");
  document.write("<a href='javascript:history.back()' class='text_9pt'>Back to Last Page</a><br>");
  document.write("</td></tr>");
}

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_diamond_red.gif' border='0' alt='[Bullet]'> ");
  document.write("<a href='http://lists.stsophia.ws/mailman/listinfo/stsophia_members/' class='text_10pt' target='_blank'>Sign-up for the Saint Sophia Cathedral e-mail list!</a></div>");
  document.write("<img src='/images/bullet_diamond_red.gif' border='0' alt='[Bullet]'> ");
  document.write("<a href='http://lists.lagreekfest.com/mailman/listinfo/lagreekfest_members/' class='text_10pt' target='_blank'>Sign-up for the LA 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 sunday_school_years()
{
  document.write("<img src='/images/bullet.gif' border='0' alt='[Bullet]'> ");
  document.write("<a href='/photo/' class='text_10pt'>Return to Photo Gallery</a> :: ");
  document.write("<a href='javascript:history.back()' class='text_10pt'>Back to Last Page</a><br>");
  document.write("<div style='padding-top: 3px; padding-left: 13px;'>");
  document.write("<a href='/photo/sunday_school/2011-2012/' class='text_10pt'>2011-2012</a> :: ");
  document.write("<a href='/photo/sunday_school/2010-2011/' class='text_10pt'>2010-2011</a> :: ");
  document.write("<a href='/photo/sunday_school/2009-2010/' class='text_10pt'>2009-2010</a> :: ");
  document.write("<a href='/photo/sunday_school/2009-06-14/' class='text_10pt'>Panayiri on June 14, 2009</a> :: ");
  document.write("<a href='/photo/sunday_school/2008-2009/' class='text_10pt'>2008-2009</a></div>");
}  

function audio_player()
{
  document.write("<div style='z-index:-1;'>");
  document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,47,0' width='277' height='284' id='wimpy' align='center'>");
  document.write("<param name='allowScriptAccess' value='always' />");
  document.write("<param name='movie' value='mp3s/wimpy.swf' />");
  document.write("<param name='loop' value='false' />");
  document.write("<param name='menu' value='false' />");
  document.write("<param name='quality' value='high' />");
  document.write("<param name='scale' value='noscale' />");
  document.write("<param name='salign' value='lt' />");
  document.write("<param name='bgcolor' value='#FFFFE1' />");
  document.write("<param name='wmode' value='opaque' />");

  document.write("<param name=\"flashvars\" value=\"wimpyReg=M3klMjdMYiU1QjdGVyU3RVBzM24xTm53aW8yZVZqYSUyQ2l6R3lV&wimpyApp=mp3s/wimpy.php&wimpySkin=mp3s/skin_itunes7.xml&startPlayingOnload=yes\" />");
  document.write("<embed src=\"mp3s/wimpy.swf\" flashvars=\"wimpyReg=M3klMjdMYiU1QjdGVyU3RVBzM24xTm53aW8yZVZqYSUyQ2l6R3lV&wimpyApp=mp3s/wimpy.php&wimpySkin=mp3s/skin_itunes7.xml&startPlayingOnload=yes\" loop=\"false\" menu=\"false\" quality=\"high\" width=\"277\" height=\"284\" scale=\"noscale\" salign=\"lt\" name=\"wimpy4573\" align=\"center\" bgcolor=\"#FFFFE1\" wmode='opaque' allowScriptAccess=\"always\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />");

  document.write("</object>");
  document.write("</div	>");
}

function audio_player_orthodoxy_biz()
{
  document.write("<div style='z-index:-1;'>");
  document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,47,0' width='277' height='284' id='wimpy' align='center'>");
  document.write("<param name='allowScriptAccess' value='always' />");
  document.write("<param name='movie' value='mp3s/wimpy.swf' />");
  document.write("<param name='loop' value='false' />");
  document.write("<param name='menu' value='false' />");
  document.write("<param name='quality' value='high' />");
  document.write("<param name='scale' value='noscale' />");
  document.write("<param name='salign' value='lt' />");
  document.write("<param name='bgcolor' value='#FFECAC' />");
  document.write("<param name='wmode' value='opaque' />");

  document.write("<param name=\"flashvars\" value=\"wimpyReg=M3klMjdMYiU1QjdGVyU3RVBzM24xTm53aW8yZVZqYSUyQ2l6R3lV&wimpyApp=mp3s/wimpy.php&wimpySkin=mp3s/skin_itunes7.xml&startPlayingOnload=yes\" />");
  document.write("<embed src=\"mp3s/wimpy.swf\" flashvars=\"wimpyReg=M3klMjdMYiU1QjdGVyU3RVBzM24xTm53aW8yZVZqYSUyQ2l6R3lV&wimpyApp=mp3s/wimpy.php&wimpySkin=mp3s/skin_itunes7.xml&startPlayingOnload=yes\" loop=\"false\" menu=\"false\" quality=\"high\" width=\"277\" height=\"284\" scale=\"noscale\" salign=\"lt\" name=\"wimpy4573\" align=\"center\" bgcolor=\"#FFECAC\" wmode='opaque' allowScriptAccess=\"always\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />");

  document.write("</object>");
  document.write("</div	>");
}

function pcase(str) 
{
strlen = str.length
jj = str.substring(0,1).toUpperCase()
jj = jj + str.substring(1,strlen).toLowerCase()
for (i = 2; i <= strlen; i++) {
  if (jj.charAt(i)==" ") {
    lefthalf = jj.substring(0,i+1)
    righthalf = jj.substring(i+1,strlen)
    righthalf = righthalf.substring(0,1).toUpperCase()+righthalf.substring(1,strlen)
    jj=lefthalf+righthalf
  }
}
return jj
}

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);
}

