function pagestart()
{
  document.write( '<table>' )
  document.write( '  <tr>' )
  document.write( '    <td rowspan="5" class="sidemenu">' )
  document.write( '        <br><br><br><br><br><br><br>' )
  
  document.write( '      <p>' )
  document.write( '      <table width="150px" cellpadding=0 cellspacing=0>' )
  document.write( '        <script language=javascript> button( "1",  "Welcome",   "default.htm" )    </script>' )
  document.write( '        <script language=javascript> button( "2",  "Diary",     "eecdiary.htm" )   </script>' )
  document.write( '        <script language=javascript> button( "4",  "Children",  "eecchild.htm" )   </script>' )
  document.write( '        <script language=javascript> button( "5",  "Teens",     "eecteens.htm" )   </script>' )
  document.write( '        <script language=javascript> button( "6",  "Students",  "eecstdnt.htm" )   </script>' )
  document.write( '        <script language=javascript> button( "7",  "Adults",    "eecadult.htm" )   </script>' )
  document.write( '        <script language=javascript> button( "8",  "Location",  "eecloc.htm" )     </script>' )
  document.write( '        <script language=javascript> button( "9",  "Christianity","eeccex.htm" )     </script>' )
  document.write( '        <script language=javascript> button( "10", "Resources", "eecres.htm" )     </script>' )
  document.write( '        <script language=javascript> button( "11", "Sermons", "eecaud.htm" )     </script>' )
  document.write( '      </table>' )
  document.write( '      </p>' )
  document.write( '    </td>' )
  document.write( '    <td rowspan="4">&nbsp;</td>' )
  document.write( '  </tr>' )
  document.write( '  <tr>' )
  document.write( '    <td colspan="2" class="titletext">' )
  document.write( '    <image src="Main_Lo.jpg" width="200"px>' )
  document.write( '      <hr />' )
  document.write( '    </td>' )
  document.write( '  </tr>' )
  document.write( '  <tr>' )
  document.write( '    <td valign="top" width="100%" height="100%">' )
} 

function pageend()
{
  document.write( '      </td>' )
  document.write( '      <td rowspan="2" class="messagebox">' )
  document.write( '        <table width="150px" cellspacing=0 cellpadding=0>' )
  document.write( '          <script language=javascript> messageboxtitle( "Meetings" ) </script>' )
  document.write( '          <tr>' )
  document.write( '            <td class="mbl">&nbsp;</td>' )
  document.write( '            <td class="mb">' )
  document.write( '              <table cellspacing="1" cellpadding="1">' )
  document.write( '                <script language=javascript> messageboxheading( "Sunday Services:" )           	 	</script>' )
  document.write( '                <script language=javascript> messageboxbullet(  "10:30am at North Leamington School, and", "10" ) 		</script>' )
  document.write( '                <script language=javascript> messageboxbullet(  "&nbsp;&nbsp;6:30pm at<br> Heath Terrace", "10" )</script>' )
  document.write( '                <script language=javascript> messageboxheading( "Seniors on Sunday:" )          		</script>' )
  document.write( '                <script language=javascript> messageboxbullet(  "&nbsp;&nbsp;4:30pm", "10" )    		</script>' )
  document.write( '                <script language=javascript> messageboxcomment( "(first Sunday of the month)" ) 		</script>' )
  document.write( '              </table>' )
  document.write( '            </td>' )
  document.write( '            <td class="mbr">&nbsp;</td>' )
  document.write( '          </tr>' )
  document.write( '          <script language=javascript> messageboxtrailer() </script>' )
  document.write( '        </table>' )
  document.write( '        <br><br>' )
  document.write( '        <table width="150px" cellspacing=0 cellpadding=0>' )
  document.write( '          <script language=javascript> messageboxtitle( "Remember" ) </script>' )
  document.write( '          <tr>' )
  document.write( '            <td class="mbl">&nbsp;</td>' )
  document.write( '            <td class="mb">' )
  document.write( '              <table cellspacing="1" cellpadding="1">' )
  document.write( '                <script language=javascript> messageboxbullet(' )
  document.write( '                  "For an informal introduction to the christian faith see our Christianity Explored Course. click on the [Christianity] menu button for more information.", "0" )' )
  document.write( '                </script>' )
  document.write( '                <script language=javascript> messageboxbullet(' )
  document.write( '                  "For sermon downloads click on the [Sermons] button on the menu bar", "0" )' )
  document.write( '                </script>' )
  document.write( '              </table>' )
  document.write( '            </td>' )
  document.write( '            <td class="mbr">&nbsp;</td>' )
  document.write( '          </tr>' )
  document.write( '          <script language=javascript> messageboxtrailer() </script>' )
  document.write( '        </table>' ) 
  document.write( '      </td>' )
  document.write( '    </tr>' )
  document.write( '    <tr>' )
  document.write( '      <td class="footer">' )
  document.write( '        <p>' )
  document.write( '          Emmanuel Church is a registered charity no.1040807. For feedback or information about this website, please contact' )
  document.write( '          <script language=javascript> mail( "webmaster", "emmanuel-church.org.uk") </script>.' )
  document.write( '        </p>' )
  document.write( '      </td>' )
	
  document.write( '    </tr>' )
  document.write( '  </table>' )
}

function over( index )
{
  document.getElementById( 'tl' + index ).style.backgroundImage = 'url( "overtopleft.bmp" )';
  document.getElementById( 't'  + index ).style.backgroundImage = 'url( "overtop.bmp" )';
  document.getElementById( 'tr' + index ).style.backgroundImage = 'url( "overtopright.bmp" )';
  document.getElementById( 'l'  + index ).style.backgroundImage = 'url( "overleft.bmp" )';
  document.getElementById( 'r'  + index ).style.backgroundImage = 'url( "overright.bmp" )';
  document.getElementById( 'bl' + index ).style.backgroundImage = 'url( "overbottomleft.bmp" )';
  document.getElementById( 'b'  + index ).style.backgroundImage = 'url( "overbottom.bmp" )';
  document.getElementById( 'br' + index ).style.backgroundImage = 'url( "overbottomright.bmp" )';
}

function out( index )
{
  document.getElementById( 'tl' + index ).style.backgroundImage = 'url( "topleft.bmp" )';
  document.getElementById( 't'  + index ).style.backgroundImage = 'url( "top.bmp" )';
  document.getElementById( 'tr' + index ).style.backgroundImage = 'url( "topright.bmp" )';
  document.getElementById( 'l'  + index ).style.backgroundImage = 'url( "left.bmp" )';
  document.getElementById( 'r'  + index ).style.backgroundImage = 'url( "right.bmp" )';
  document.getElementById( 'bl' + index ).style.backgroundImage = 'url( "bottomleft.bmp" )';
  document.getElementById( 'b'  + index ).style.backgroundImage = 'url( "bottom.bmp" )';
  document.getElementById( 'br' + index ).style.backgroundImage = 'url( "bottomright.bmp" )';
}

function mail( name1, name2 )
{
  document.write( '<a href="mailto:' + name1 + '@' + name2 + '">' )
  document.write( name1 + '@' + name2 + '</a>' )
}

function button( id, text, link )
{
  document.write( '<tr>' )
  document.write( '  <td class="sp"></td>' )
  document.write( '  <td Id="tl' + id + '" class="topleft"></td>' )
  document.write( '  <td Id="t'  + id + '" class="top"></td>' )
  document.write( '  <td Id="tr' + id + '" class="topright"></td>' )
  document.write( '  <td class="sp"></td>' )
  document.write( '</tr>' )
  document.write( '<tr>' )
  document.write( '  <td class="sp"></td>' )
  document.write( '  <td Id="l'  + id + '" class="left"></td>' )
  document.write( '  <td Id="m'  + id + '" onmouseover="over(' + id + ');" onmouseout="out(' + id + ');" class="mid">' )
  document.write( '    &nbsp;' )
  document.write( '    <a href="' + link + '" class="link">' )
  document.write( '    ' + text )
  document.write( '    </a>' )
  document.write( '    &nbsp;' )
  document.write( '  </td>' )
  document.write( '  <td Id="r' + id + '" class="right"></td>' )
  document.write( '  <td class="sp"></td>' )
  document.write( '</tr>' )
  document.write( '<tr>' )
  document.write( '  <td class="sp"></td>' )
  document.write( '  <td Id="bl' + id + '" class="botleft"></td>' )
  document.write( '  <td Id="b'  + id + '" class="bot"></td>' )
  document.write( '  <td Id="br' + id + '" class="botright"></td>' )
  document.write( '  <td class="sp"></td>' )
  document.write( '</tr>' )
  document.write( '<tr>' )
  document.write( '  <td colspan="5"</td>' )
  document.write( '</tr>' )
}

function messageboxtitle( text )
{
  document.write( '<tr>' )
  document.write( '  <td class="mbtl"></td>' )
  document.write( '  <td rowspan="2" class="mbt">' )
  document.write( '    ' + text )
  document.write( '  </td>' )
  document.write( '  <td class="mbtr"></td>' )
  document.write( '</tr>' )
  document.write( '<tr>' )
  document.write( '  <td class="mbhl">' )
  document.write( '    &nbsp;' )
  document.write( '  </td>' )
  document.write( '  <td class="mbhr">' )
  document.write( '    &nbsp;' )
  document.write( '  </td>' )
  document.write( '</tr>' )
}

function messageboxheading( text )
{
  document.write( '<tr>' )
  document.write( '  <td colspan="2" class="mbit">' )
  document.write( '    ' + text )
  document.write( '  </td>' )
  document.write( '</tr>' )
}

function messageboxbullet( text, pad )
{
  document.write( '<tr>' )
  document.write( '  <td width="' + pad +'px">' )
  document.write( '    &nbsp;' )
  document.write( '  </td>' )
  document.write( '  <td class="mbi">' )
  document.write( '    <img src="bullet.gif">' )
  document.write( '    ' + text )
  document.write( '  </td>' )
  document.write( '</tr>' )
}

function messageboxcomment( text )
{
  document.write( '<tr>' )
  document.write( '  <td colspan="2" class="mbis">' )
  document.write( '    ' + text )
  document.write( '  </td>' )
  document.write( '</tr>' )
}

function messageboxtrailer()
{
  document.write( '<tr>' )
  document.write( '  <td class="mbbl"></td>' )
  document.write( '  <td class="mbb"></td>' )
  document.write( '  <td class="mbbr"></td>' )
  document.write( '</tr>' )
}

function stdrotaheading( text )
{
  document.write( '<p class="heading">' + text + '</p>' )
  document.write( '<table border="1" bordercolor="2FC8BF" bordercolordark="1C212A" bordercolorlight="B7FAF1"' )
  document.write( '       cellpadding="10" width="100%" bgcolor="#FFFFFF">' )
  document.write( '  <tr>' )
  document.write( '    <th align="center"><font color="#243BD1" face="Arial" size="3"><b>Date</b></th>' )
  document.write( '    <th align="center"><font color="#243BD1" face="Arial" size="3"><b>Host 1</b></th>' )
  document.write( '    <th align="center"><font color="#243BD1" face="Arial" size="3"><b>Host 2</b></th>' )
  document.write( '    <th align="center"><font color="#243BD1" face="Arial" size="3"><b>Host 3</b></th>' )
  document.write( '    <th align="center"><font color="#243BD1" face="Arial" size="3"><b>Minibus</b></th>' )
  document.write( '  </tr>' )
}

function stdrota( date, name1, name2, name3, name4 )
{
  document.write( '<tr>' )
  document.write( '  <td align="center"><font color="#243BD1" face="Arial" size="2"><b>' + date + '</b></td>' )
  document.write( '  <td align="center"><font face="Arial" size="2"><b>' + name1 + '</b></td>' )
  document.write( '  <td align="center"><font face="Arial" size="2"><b>' + name2 + '</b></td>' )
  document.write( '  <td align="center"><font face="Arial" size="2"><b>' + name3 + '</b></td>' )
  document.write( '  <td align="center"><font face="Arial" size="2"><b>' + name4 + '</b></td>' )
  document.write( '</tr>' )
}

function stdrotatrailer()
{
  document.write( '</table>' )
}

function bssrotaheading( text )
{
  document.write( '<p class="heading">' + text + '</p>' )
  document.write( '<table border="1" bordercolor="2FC8BF" bordercolordark="1C212A" bordercolorlight="B7FAF1"' )
  document.write( '       cellpadding="10" width="100%" bgcolor="#FFFFFF">' )
  document.write( '  <tr>' )
  document.write( '    <th align="center"><font color="#243BD1" face="Arial" size="3"><b>Date</b></th>' )
  document.write( '    <th align="center"><font color="#243BD1" face="Arial" size="3"><b>Teacher</b></th>' )
  document.write( '    <th align="center"><font color="#243BD1" face="Arial" size="3"><b>Assistant 1</b></th>' )
  document.write( '    <th align="center"><font color="#243BD1" face="Arial" size="3"><b>Assistant 2</b></th>' )
  document.write( '  </tr>' )
}

function bssrota( date, name1, name2, name3 )
{
  document.write( '<tr>' )
  document.write( '  <td align="center"><font color="#243BD1" face="Arial" size="2"><b>' + date + '</b></td>' )
  document.write( '  <td align="center"><font face="Arial" size="2"><b>' + name1 + '</b></td>' )
  document.write( '  <td align="center"><font face="Arial" size="2"><b>' + name2 + '</b></td>' )
  document.write( '  <td align="center"><font face="Arial" size="2"><b>' + name3 + '</b></td>' )
  document.write( '</tr>' )
}

function bssrotatrailer()
{
  document.write( '</table>' )
}

function refrotaheading( text )
{
  document.write( '<p class="heading">' + text + '</p>' )
  document.write( '<table border="1" bordercolor="2FC8BF" bordercolordark="1C212A" bordercolorlight="B7FAF1"' )
  document.write( '       cellpadding="10" width="100%" bgcolor="#FFFFFF">' )
  document.write( '  <tr>' )
  document.write( '    <th align="center"><font color="#243BD1" face="Arial" size="3"><b>Date</b></th>' )
  document.write( '    <th align="center"><font color="#243BD1" face="Arial" size="3"><b>Name</b></th>' )
  document.write( '    <th align="center"><font color="#243BD1" face="Arial" size="3"><b>Name</b></th>' )
  document.write( '    <th align="center"><font color="#243BD1" face="Arial" size="3"><b>Name</b></th>' )
  document.write( '    <th align="center"><font color="#243BD1" face="Arial" size="3"><b>Name</b></th>' )
  document.write( '  </tr>' )
}

function refrota( date, name1, name2, name3, name4 )
{
  document.write( '<tr>' )
  document.write( '  <td align="center"><font color="#243BD1" face="Arial" size="2"><b>' + date + '</b></td>' )
  document.write( '  <td align="center"><font face="Arial" size="2"><b>' + name1 + '</b></td>' )
  document.write( '  <td align="center"><font face="Arial" size="2"><b>' + name2 + '</b></td>' )
  document.write( '  <td align="center"><font face="Arial" size="2"><b>' + name3 + '</b></td>' )
  document.write( '  <td align="center"><font face="Arial" size="2"><b>' + name4 + '</b></td>' )
  document.write( '</tr>' )
}

function refrotatrailer()
{
  document.write( '</table>' )
}