var isSubDir = false;
var stPath = "";
var navLoC = "navLo";

function opt(st) {
  document.write(st);
  }

function hSpace(numPix) {
  opt('<img src="../sp.gif" width=' + numPix + ' height=1 border=0 alt=""><br>');
  }

function vSpace(numPix) {
  opt('<img src="../sp.gif" width=1 height=' + numPix + 'border=0 alt=""><br>');
  }

function loLink(linkTxt,pageName) {
  document.write('<a href="' + stPath + pageName + '" class=' + navLoC + '>' + linkTxt + '</a>');
  }

function hiLink(linkTxt,pageName) {
  document.write('<span class=navHi>' + linkTxt + '</span>');
  }

function aLink(linkTxt,pageName,fPage,addBar) {
  if (fPage) hiLink(linkTxt,pageName);
  else if (location.pathname.indexOf(pageName) == -1) loLink(linkTxt,pageName);
  else hiLink(linkTxt,pageName);
  if (addBar) opt('&nbsp;|&nbsp;');
  }

function swNav(fPage) {
  stPath = (isSubDir ? "../" : "");
  document.writeln('<img src="sp.gif" width=1 height=8 border=0 alt=""><br>');
  document.writeln('<div align=center><table border=0 cellspacing=0 cellpadding=1>');
  document.writeln('<tr><td bgcolor="#000000">');
  document.writeln('<table border=0 cellspacing=0 cellpadding=11>')
  document.writeln('<tr><td bgcolor="#ECECEC" align=center>');
  navLoC = "navHome";
  aLink("Departure",'index.html',fPage=="H",true);
  navLoC = "navLo";
  aLink('News from Bill!!!!!!','news1.html',fPage=="1",true);
  aLink('Position on July 30th','position1.html',fPage=="2",true);
  aLink('Three Days Out!','news2.html',fPage=="3",true);
  aLink('Bill Arrives Hilo!','news3.html',fPage=="4");
  opt('</div>');
  document.writeln('</td></tr></table>');
  document.writeln('</td><td>&nbsp;</td><td align=center><font size="-1"><a href="Alaska1.html" class=navLo>Alaska<br>Voyage!</a></font></td><td>&nbsp;</td>');
  document.writeln('</tr></table></div>');
  document.writeln('<img src="sp.gif" width=1 height=8 border=0 alt=""><br>');
  }

function swNav2(fPage) {
  stPath = (isSubDir ? "../" : "");
  document.writeln('<img src="sp.gif" width=1 height=8 border=0 alt=""><br>');
  document.writeln('<div align=center><table border=0 cellspacing=0 cellpadding=1>');
  document.writeln('<tr><td bgcolor="#000000">');
  document.writeln('<table border=0 cellspacing=0 cellpadding=11>')
  document.writeln('<tr><td bgcolor="#ECECEC" align=center>');
  navLoC = "navHome";
  aLink("Beginning",'Alaska1.html',fPage=="B",true);
  navLoC = "navLo";
  aLink('Prince Rupert','Alaska2.html',fPage=="A2", true);
  aLink('Petersburg','Alaska3.html',fPage=="A3", true);
  aLink('Juneau','Alaska4.html',fPage=="A4", true);
  aLink('Glacier Bay','Alaska5.html',fPage=="A5", true);
  aLink('Kake','Alaska6.html',fPage=="A6", true);
  aLink('Rocky Pass','Alaska7.html',fPage=="A7", true);
  aLink('Craig','Alaska8.html',fPage=="A8", true);
  navLoC = "navHome";
  aLink('Part 2','Alaska9.html',fPage=="A9", false);
  document.writeln('</td></tr></table>');
  document.writeln('</td><td>&nbsp;</td><td align=center><font size="-1"><a href="index.html" class=navLo>Hawaii<br>Voyage!</a></font></td><td>&nbsp;</td>');
  document.writeln('</tr></table></div>');
  document.writeln('<img src="sp.gif" width=1 height=8 border=0 alt=""><br>');
  }

function swNav3(fPage) {
  stPath = (isSubDir ? "../" : "");
  document.writeln('<img src="sp.gif" width=1 height=8 border=0 alt=""><br>');
  document.writeln('<div align=center><table border=0 cellspacing=0 cellpadding=1>');
  document.writeln('<tr><td bgcolor="#000000">');
  document.writeln('<table border=0 cellspacing=0 cellpadding=11>')
  document.writeln('<tr><td bgcolor="#ECECEC" align=center>');
  navLoC = "navHome";
  aLink("Part 1",'Alaska1.html',fPage=="B",true);
  navLoC = "navLo";
  aLink('Oakland','Alaska9.html',fPage=="A9", true);
  aLink('Ilwaco','Seattle1.html',fPage=="S1", true);
  aLink('Ilwaco 2','Seattle2.html',fPage=="S2", false);
  document.writeln('</td></tr></table>');
  document.writeln('</td><td>&nbsp;</td><td align=center><font size="-1"><a href="index.html" class=navLo>Hawaii<br>Voyage!</a></font></td><td>&nbsp;</td>');
  document.writeln('</tr></table></div>');
  document.writeln('<img src="sp.gif" width=1 height=8 border=0 alt=""><br>');
  }

