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()
{
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/masthead_915px.jpg' width='915' 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 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 player_ipod_choir()
{
  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 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);
}
