var currLocation = window.location + "";
document.write('<div id="logo">');
document.write('<img src="');
if ( currLocation.indexOf("index") == -1 ) {
  document.write('../');
  }
document.write('images/mathlogo.jpg" width="165" />');
document.write('</div>');
document.write('<div id="vertmenu">'); 
document.write('<h1>&nbsp;</h1>');
document.write('<ul>');
for ( a = 1; a < menuItem.length; a++ ) {
  document.write('<li ');
  if ( a != currPage && menuItem[a].heading != "Contact Us") {
    document.write('onmouseover="window.status=\'Click to go to our ' + menuItem[a].heading + ' page\'; return true;" onmouseout="window.status=\'\'; return true;"');
    }
  else if ( menuItem[a].heading == "Contact Us" ) {
    document.write('onmouseover="window.status=\'Click to email us\'; return true;" onmouseout="window.status=\'\'; return true;"');
    }
  else {
    document.write('id="currentPage"');
    }
  document.write('>');
  if ( a != currPage ) {
    document.write('<a href="');
    if ( menuItem[a].heading == "Contact Us" ) {
      document.write('mailto:' + contactEmail);
      }
    else {
      document.write(menuItem[a].root + menuItem[a].path + menuItem[a].URL);
      }
    document.write('" tabindex="' + a + '" onfocus="if(this.blur) this.blur()">');
    }
  else {
    document.write('<span>');
    }
  document.write('&nbsp;' + menuItem[a].heading);
  if ( a != currPage ) {
    document.write('</a>');
    }
  else {
    document.write('</span>');
    }
  document.write('</li>');
  }
document.write('</ul>');
document.write('</div>');

var currentDate = new Date();

var currentDateYear = currentDate.getFullYear();

document.write('<div id="upDate"><p>&copy; Mark Riedel 2006 - ' + currentDateYear + '</p><p>Site last updated:<br />' + siteUpdate + '</p><a href="http://mathsonline.org/feed.xml"><img src="');
if ( currLocation.indexOf("index") == -1 ) {
  document.write("../");
  }
document.write('images/feed-icon.png" style="border:0" alt="Subscribe to the feed for this site" title="Subscribe to the feed for this site" /></a><br />rss feed');
document.write('');


document.write('<center><form action="https://www.paypal.com/cgi-bin/webscr" method="post">');
document.write('<input type="hidden" name="cmd" value="_xclick">');
document.write('<input type="hidden" name="business" value="mark@riedel.fsnet.co.uk">');
document.write('<input type="hidden" name="item_name" value="Mathsonline.org">');
document.write('<input type="hidden" name="buyer_credit_promo_code" value="">');
document.write('<input type="hidden" name="buyer_credit_product_category" value="">');
document.write('<input type="hidden" name="buyer_credit_shipping_method" value="">');
document.write('<input type="hidden" name="buyer_credit_user_address_change" value="">');
document.write('<input type="hidden" name="no_shipping" value="1">');
document.write('<input type="hidden" name="return" value="http://www.mathsonline.org">');
document.write('<input type="hidden" name="cancel_return" value="http://www.mathsonline.org">');
document.write('<input type="hidden" name="cn" value="Say how the site helped you">');
document.write('<input type="hidden" name="currency_code" value="GBP">');
document.write('<input type="hidden" name="tax" value="0">');
document.write('<input type="hidden" name="lc" value="GB">');
document.write('<input type="hidden" name="bn" value="PP-DonationsBF">');
document.write('<input type="image" src="');
if ( currLocation.indexOf("index") == -1 ) {
  document.write('../');
  }
document.write('images/x-click-but.gif" border="0" name="submit" alt="Make a donation with PayPal if this site has been helpful - it\'s fast, free and secure!">');
document.write('<img alt="" border="0" src="');
if ( currLocation.indexOf("index") == -1 ) {
  document.write('../');
  }
document.write('images/pixel.gif" width="1" height="1">');
document.write('</form></center></div>');
