//These are a set of pairs of strings:
//document.title (between<title> and </title>)  and filename
//They will appear in the sidebar menu. If the filename is "" there is
//no link and the text has the class nolink
var MenuItems = new Array(
"HOME", "../index.html",
"March 2007 NEWSLETTER","",
"Contents","contents.html",
"Editorial","editorial.html",
"Combustion People","",
"Chris Lawn","lawn.html",
"Jim Whitelaw 1936-2006","whitelaw.html",
"Meredith Thring 1915-2006","thring.html",
"Andreas Kronenburg","Kronenburg.html",
"31st Symposium Award","award.html",
"Recent Section Meetings","",
"CO2 reduction meeting","CO2.html",
"Biofuels meeting","biofuels.html",
"Symposium Thoughts","symposium.html",
"British Section Business","",
"2006 AGM","AGM2006.doc",
"British Section Rules", "../rules.doc",
"Combustion Calendar","../calendar.html"
);
function WriteSidebar()
{
        for(var i=0; i<MenuItems.length;i+=2)
        {
                if(document.title == MenuItems[i])
                        //This is the current page; no link required
                        document.write('<p>'
                        + MenuItems[i]
                        + '<img src="../squares.gif" border="0" /></p>');
                else
                  if(MenuItems[i+1]=="")
                  {   document.write('<p class="nolink">'
                     + MenuItems[i]);
                  }
                  else
                  {      //link to file with name derived from MenuItem
                        document.write('<p><a href="'
                        + MenuItems[i+1] + '">' //filename
                        + MenuItems[i]                          //menu item text
                        + '<img src="../squares.gif" border="0" /></a></p>');
                  }
        }
}

function WriteFramework(Pname)
{
  //Pname is only for the visible title on the page.
  //document.title is used to identify pages

  document.write(

    '<div id="top1">Combustion Institute British Section </div>'
  + '<div id="top2"><img src="../Fire.jpg" /></div>'
  + '<div id="top3" >Newsletter March 2007</div>'
  + '<div id="title">'
  + Pname
  + '</div>'
  + '<div id="sidebar">');

  WriteSidebar();
  document.write('</div>');

//  WriteNavButtons();
}

function email(nam, dom)
{document.write(
  '<a href="mailto:' + nam + '@' + dom + '"> '
 + nam + '@' + dom + '</a>');}


function WriteNavButtons()
{
  for(var i=0; i<MenuItems.length;i+=2)
  {
    if(document.title == MenuItems[i])
    {  //i has the index of the current page;
      document.write('<div class="navbuttons">');
      var j = i;
      while(j>0 && MenuItems[j-1]==""){j-=2;}
      if(j>0)
      { //Add back button
        document.write('<a href="'
        + MenuItems[j-1]
        + '"><img src="../back.gif" alt="previous page" /></a>');
      }
      j = i;
      while(j<MenuItems.length-2 && MenuItems[j+3]==""){j+=2;}
      if(j<MenuItems.length-2)
      { //Add next button
        document.write('<a href="'
        + MenuItems[j+3]
        + '"><img src="../next.gif" alt="next page" /></a>');
      }
      document.write('</div>');
    }
  }
}

