

var doc = this.document;

function makeButtonCell(bText,bURL,bClass,bHovColor,bWidth) {
  var wTxt = ""; if (bWidth!=null) wTxt='width="'+bWidth+'"';
  doc.write('<td '+wTxt+' align="center" onmouseover="this.style.backgroundColor=\''+bHovColor+'\'"');
  doc.write(' onmouseout="this.style.backgroundColor=\'\'" onclick="doc.location=\''+bURL+'\'"');
  doc.write(' class="'+bClass+'"><a href="'+bURL+'" class="lsNavBtnLink">'+bText+'</a></td>');
  }

function pageTop(pageTitle,root){

  var borderColor = 'bordercolor="#111111"';
  if (pageTitle==null) pageTitle = "";
  if (root==null) root = "../..";

  doc.write('<table border="2" cellpadding="0" cellspacing="0" style="border-collapse:collapse;" '+borderColor+' width="100%" bgcolor="#00CC66">');
  doc.write('<tbody><tr>');
  doc.write('<td width="180" rowspan="2" bgcolor="#006600" align="center">');
  doc.write('<a href="'+root+'/" style="text-decoration:none"><img src="'+root+'/img/MastHeadName.png" border="0" alt="LAST STAND"></a></td>');
  doc.write('<td height="64" bgcolor="#339933">');

  doc.write('  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse;" '+borderColor+' width="100%">');
  doc.write('  <tbody><tr>');
  doc.write('  <td width="1%">&nbsp;</td>');
  doc.write('  <td width="98%" bgcolor="#CCFFFF" background="'+root+'/HTML/backgrounds_artwork/tealbak.gif">');

  doc.write('    <table border="0" width="100%" style="border-collapse:collapse"><tbody><tr>');
  doc.write('    <td align="center"><img SRC="'+root+'/HTML/backgrounds_artwork/protectingthekeys.png" width="300" height="30"></td>');
  doc.write('    <td width="120" rowspan="2" align="right"><a target="_blank" href="http://facebook.com/KeysLastStand" style="text-decoration:none">');
  doc.write('    <font face="Arial,Helv"><b>Visit us on&nbsp;&nbsp;</b></font><br />');
  doc.write('    <img border="0" src="'+root+'/img/FacebookIcon.gif" width="88" height="26">&nbsp;</a></td>');
  doc.write('    </tr><tr>');
  doc.write('    <td class="lsPTitle" align="center">'+pageTitle+'</td>');
  doc.write('    </tr></tbody></table>');

  doc.write('  </td>');
  doc.write('  <td width="1%" height="38">&nbsp;</td>');
  doc.write('  </tr></tbody></table>');

  doc.write('</td>');
  doc.write('</tr><tr>');
  doc.write('<td>');

  doc.write('  <table border="1" cellpadding="0" cellspacing="0" style="border-collapse:collapse;" '+borderColor+' width="100%">');
  doc.write('  <tbody><tr>');
  makeButtonCell('Home',root,'lsNavBtn','lime','20%');
  makeButtonCell('About Us',root+'/HTML/navigation_pages/about_us.htm','lsNavBtn','lime','20%');
  makeButtonCell('Hot Topics',root+'/HTML/navigation_pages/hot_topics.html','lsNavBtn','lime','20%');
  makeButtonCell('Calendar',root+'/HTML/content_pages/cal_current_and_next.htm','lsNavBtn','lime','20%');
  makeButtonCell('Donations',root+'/HTML/navigation_pages/donation_page.htm','lsNavBtn','lime','20%');
  doc.write('  </tr><tr>');
  makeButtonCell('Join Us!',root+'/HTML/navigation_pages/membform.htm','lsNavBtn','lime','20%');
  makeButtonCell('What\'s New?',root+'/HTML/navigation_pages/whatsnew.html','lsNavBtn','lime','20%');
  makeButtonCell('Our Stands',root+'/HTML/navigation_pages/our_stands.htm','lsNavBtn','lime','20%');
  makeButtonCell('Green Links',root+'/HTML/navigation_pages/links.htm','lsNavBtn','lime','20%');
  makeButtonCell('Community Partners',root+'/partners/index.html','lsNavBtn','lime','20%');
  doc.write('  </tr></tbody></table>');

  doc.write('</td>');
  doc.write('</tr></tbody></table>');
  }



