
function header(site,channel,menu1,menu2) {

  var breadcrumb = ""
  var pageName = ""
  var menu1Page = menu1.replace(/ /ig, "-");
  var menu2Page = menu2.replace(/ /ig, "-");

  if (menu1 != "") {
    breadcrumb = breadcrumb + ">" + "<a href='" + menu1Page + ".htm'>" + menu1 + "</a>"
  }
  
  if (menu2 != "") {
    breadcrumb = breadcrumb + ">" + "<a href='" + menu2Page + ".htm'>" + menu2 + "</a>"
  }
    
  document.writeln("<body leftmargin='0' rightmargin='0' topmargin='0' bottommargin='0'>");


  // Background Image
  document.writeln("<div id='backgroundLayer'style='position:absolute; left: 0; top: 0'><img src='images/p1a.jpg'</div>");

  document.writeln("<div id='Layer2' style='position:absolute; left: 0; top: 0'>");

  // 1st Table

  document.writeln("<table border='0' class='topMenuBackground' cellpadding='0' width='800' cellspacing='0' border='0' height='100'>");

  document.writeln("  <tr height='96'>");
  document.writeln("    <td width='177' valign='top'");
  document.writeln("     ");
  document.writeln("    </td>");
  document.writeln("    <td class='topMenuLinks' colspan='2' width='623'>");

  document.writeln("    </td>");
  document.writeln("  </tr>");
  document.writeln("</table>");

// 2nd Table

  document.writeln("<table class='topMenuBackground' cellpadding='0' cellspacing='0' border='0' width='800' height='107'>");

  document.writeln("  <tr height='70'>");
  document.writeln("    <td width='137' valign='top'>");

  if (channel != "") {
     document.writeln("   <img border='0' src='images/" + channel + ".jpg'>");
  }

  document.writeln("    </td>");
  document.writeln("    <td valign='top'>");
  
  document.writeln("      <table border='0' width='100%'>");
  document.writeln("        <tr>");
  document.writeln("          <td align='left' height='50'>");
  document.writeln("          </td>");
  document.writeln("        </tr>");
  document.writeln("        <tr>");
  document.writeln("          <td>");
  document.writeln("            <table border='0'");
  document.writeln("              <tr>");
  document.writeln("                <td class='topMenuLinks' width='332' align='left'>");
  document.writeln("                  " + breadcrumb);
  document.writeln("                </td>");
  document.writeln("                <td class='topMenuLinks' width='332' align='right'>");  
  document.writeln("                  <a href='About-Us.htm'>About Us</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href='Contact-Us.htm'>Contact Us</a>&nbsp;&nbsp; ");
  document.writeln("                </td>");
  document.writeln("              </tr>");
  document.writeln("            </table>");
  document.writeln("          </td>");
  document.writeln("        </tr>");
  document.writeln("      </table>");
  
  document.writeln("    </td>");
  document.writeln("  </tr>");
  document.writeln("</table>");

  
  
  


}

function sideMenu(channel,menu1,menu2) {

if (channel == "") {

  document.writeln("<table border='0' class='topMenuBackground' cellpadding='0' cellspacing='0' border='0' width='800' height='107'>");
  document.writeln("<tr>");
  document.writeln("  <td class='topMenuBackground' valign='top' width='137'>");
  document.writeln("    <table cellspacing='3' border='0' cellpadding='0' width='100%'>");
  document.writeln("      <tr>");
  document.writeln("      <td><a href='http://www.scriptureunion.org.uk'><img src='images/sulogo125.gif' border='0'width='125' height='80'></a></td>");  
  document.writeln("      </tr>");


  menuArray = new Array (14);

  menuArray [0] = new Array (1);
  menuArray [0][0] = "Home";

  menuArray [1] = new Array (1);
  menuArray [1][0] = "Our Mission";
    
  menuArray [2] = new Array (6);
  menuArray [2][0] = "Age Groups";
  menuArray [2][1] = "Splashers";
  menuArray [2][2] = "Swimmers";   
  menuArray [2][3] = "Surfers";   
  menuArray [2][4] = "Rowers";   
  menuArray [2][5] = "Jet Skis";   

  menuArray [3] = new Array (5);
  menuArray [3][0] = "Activities";
  menuArray [3][1] = "Roadshow";
  menuArray [3][2] = "Coffee House";
  menuArray [3][3] = "Cocktails";
  menuArray [3][4] = "Church Services";
  
  menuArray [4] = new Array (1);
  menuArray [4][0] = "Events";
 
  menuArray [5] = new Array (1);
  menuArray [5][0] = "Opportunities";
  
  menuArray [6] = new Array (1);
  menuArray [6][0] = "Location";
 
  menuArray [7] = new Array (1);
  menuArray [7][0] = "Prayer Letter";

  menuArray [8] = new Array (1);
  menuArray [8][0] = "Downloads";
 
  menuArray [9] = new Array (1);
  menuArray [9][0] = "Finances";
  
  menuArray [10] = new Array (1);
  menuArray [10][0] = "Feedback";

  menuArray [11] = new Array (2);
  menuArray [11][0] = "2008";
  menuArray [11][1] = "2008 Gallery"

  menuArray [12] = new Array (3);
  menuArray [12][0] = "2007";
  menuArray [12][1] = "2007 Gallery"
  menuArray [12][2] = "Delabole";

  menuArray [13] = new Array (4);
  menuArray [13][0] = "2006";
  menuArray [13][1] = "Tidefight";
  menuArray [13][2] = "Quiz";  
  menuArray [13][3] = "2006 Gallery"

  menuArray [14] = new Array (5);
  menuArray [14][0] = "2005";
  menuArray [14][1] = "Golden Jubilee";
  menuArray [14][2] = "Songs Of Praise";
  menuArray [14][3] = "Kato"; 
  menuArray [14][4] = "Beach Footie"; 

  menuArray [15] = new Array (1);
  menuArray [15][0] = "Links";
 
  menuArray [16] = new Array (5);
  menuArray [16][0] = "Site Info";
  menuArray [16][1] = "About Us";
  menuArray [16][2] = "Contact Us";   
  menuArray [16][3] = "Accessibility";   
  menuArray [16][4] = "Site Map";   

}
  
  for (i=0;i<menuArray.length; i++) {
  
    if (menuArray[i][0] == menu1) {
      document.writeln("  <tr><td class='selectedSideMenu'>&nbsp;<a href='" + menuArray[i][0].replace(/ /ig, "-") + ".htm'><font color='#FEFCB9'>" + menuArray[i][0] + "</font></a></td></tr>");
    }  
    else {  
      document.writeln("  <tr><td class='unselectedSideMenu'>&nbsp;<a href='" + menuArray[i][0].replace(/ /ig, "-") + ".htm'>" + menuArray[i][0] + "</a></td></tr>");
    }
    if (menuArray[i][0] == menu1) {
      for (j=1;j<menuArray[i].length;j++) {
        if (menuArray[i][j] == menu2) {
           document.writeln("  <tr><td class='selectedSmallSideMenu'>&nbsp;<a href='" + menuArray[i][j].replace(/ /ig, "-") + ".htm'><font color='#FEFCB9'>&nbsp;-&nbsp;" + menuArray[i][j] + "</font></a></td></tr>");
        }
        else {
           document.writeln("  <tr><td class='unselectedSmallSideMenu'>&nbsp;<a href='" + menuArray[i][j].replace(/ /ig, "-") + ".htm'>&nbsp;-&nbsp;" + menuArray[i][j] + "</font></a></td></tr>");      
        } 
      }
    }
  }

//  document.writeln("  <tr><td height='50' class='unselectedSideMenu'><br><a href='http://www.scriptureunion.org.uk'><img src='images/sulogo125.gif' border='0'width='125' height='80'></a></td></tr>");
  document.writeln("  <tr><td height='50' class='unselectedSideMenu'>&nbsp;</a></td></tr>");
  document.writeln("</table>");
  document.writeln("<td class='topMenuBackground' width='663' valign='top' colspan='2'>");

}

function footer(site) {

  var d = new Date()

  document.writeln("      <br></td>");
  document.writeln("  </tr>");
  document.writeln("  <tr class='footerBackground'>");
  document.writeln("    <td class='topMenuLinks'></td>");
  document.writeln("    <td colspan='2'>");
  
  document.writeln("      <table width='100%' border='0'>");
  
  document.writeln("        <tr>");
  document.writeln("          <td class='topMenuLinks' align='left'>");
  document.writeln("              &#169; Copyright " + "PFM" + " " + d.getFullYear() + ". ")
  document.writeln("              Updated " + document.lastModified + "");
  document.writeln("          </td>");
  document.writeln("          <td class='topMenuLinks' align='right'>");
  document.writeln("              <a href='mailto:hills93@btinternet.com'>Webmaster</a>");
  document.writeln("              &nbsp;&nbsp;|&nbsp;&nbsp;<a href='Accessibility.htm'>Accessibility</a>");
  document.writeln("              &nbsp;&nbsp;|&nbsp;&nbsp;<a href='Site-Map.htm'>Site Map</a>");
  document.writeln("          </td>");
  document.writeln("          <td>");
  document.writeln("        </tr>");
  
  document.writeln("      </table>");
  
  document.writeln("    </td>");
  document.writeln("  </tr>");

}

function bob(bab) {

  if (bab == 'pwd') {
     document.location.href="Team-Pages-1.htm"
  }
}
