
<!-- Created on May 27, 2003 12:11:22 PM -->

// Write the contents menu with a specific background color.
function writeContents(backgroundColor) {
  var backgroundUrl = '';
  
  backgroundUrl = "url(/Images/Backgrounds/k_" + backgroundColor + "Stars.jpg)";
  document.open();
  document.writeln('<div align="center" id="contents" style="background-image: ' + backgroundUrl + '">');
  document.writeln('  <br/>');
  document.writeln('  <p><img src="Buttons/b_MainPage.gif" width="120" height="24" alt="Main Page"><br/>');
  document.writeln('      <img src="/Images/hr_Gold.jpg" width="120" height="3"><br/>');
  document.writeln('      <a class="Gold" href="index.shtml">Welcome</a><br/>');
  document.writeln('      <a class="Gold" href="CommandStaff.html">Command Staff</a><br/>');
  document.writeln('      <a class="Gold" href="KentaurusPrime.html">Kentaurus Prime</a><br/>');
  document.writeln('      <a class="Gold" href="AlTari.html">The Al\'Tari</a><br/>');
  document.writeln('      <a class="Gold" href="NaTari.html">The Na\'Tari</a><br/>');
  document.writeln('      <a class="Gold" href="PrivateThoughts/index.html">Private Thoughts</a><br/>');
  document.writeln('      <a class="Gold" href="RussianWinter.html">Russian Winter</a><br/>');
  document.writeln('      <a class="Gold" href="TauCeti.html">Tau Ceti</a><br/>');
  document.writeln('      <a class="Gold" href="SolSystem/index.html">Sol System</a><br/>');
  document.writeln('      <a class="Gold" href="StarSystems/index.html">Other Systems</a><br/>');
  document.writeln('      <a class="Gold" href="About_the_Author.html">About the Author</a></p>');
  document.writeln();  
  document.writeln('    <p><img src="Buttons/b_History.gif" width="120" height="24" align="center" alt="History"><br/>');
  document.writeln('      <img src="/Images/hr_Green.jpg" width="120" height="3"><br/>');
  document.writeln('      <a class="Green" href="BattleofSaturn.html">Battle of Saturn</a><br/>');
  document.writeln('      <a class="Green" href="Timeline.html">Timeline</a><br/>');
  document.writeln('      <a class="Green" href="TychoIncident.html">Tycho Incident</a><br/>');
  document.writeln('      <a class="Green" href="TiShanIncident.html">Ti\'Shan Incident</a><br/>');
  document.writeln('      <a class="Green" href="SekhmetIncident.html">Sekhmet Incident</a><br/>');
  document.writeln('      <a class="Green" href="AlphaCentauriBlitzed.html">Centauri Blitzkrieg</a></p>');
  document.writeln();  
  document.writeln('    <p><img src="Buttons/b_SolarNetNews.gif" width="120" height="24" alt="Blue News"><br/>');
  document.writeln('      <img src="/Images/hr_Blue.gif" width="120" height="3"><br/>');
  document.writeln('      <a class="Blue" href="SpecialReport.html">Special Report</a><br/>');
  document.writeln('      <a class="Blue" href="OnAssignment.html">On Assignment</a><br/>');
  document.writeln('      <a class="Blue" href="SNNArchives/index.html">SNN Archives</a><br/>');
  document.writeln();  
  document.writeln('    <p><img src="Buttons/b_ShortStories.gif" width="120" height="24" alt="Short Stories"/><br/>');
  document.writeln('      <img src="/Images/hr_Cyan.jpg" width="120" height="3"><br/>');
  document.writeln('      <a class="Cyan" href="/Documents/Attack_on_Ross_154.pdf" target="_blank">Attack on Ross 154</a><br/>');
  document.writeln('      <a class="Cyan" href="/Documents/Stephanie.pdf" target="_blank">\'Stephanie\'</a><br/>');
  document.writeln('      <a class="Cyan" href="/Documents/Dark_Ecstasy.pdf" target="_blank">Dark Ecstasy</a> ');
  document.writeln('      <span class="Cyan" style="font-size: 7pt">(NSFW)</span><br/>');
  document.writeln();  
  document.writeln('    <p><img src="Buttons/b_OtherAreas.gif" width="120" height="24" alt="Other Areas"><br/>');
  document.writeln('      <img src="/Images/hr_Gray.gif" width="120" height="3"><br/>');
  document.writeln('      <a class="Silver" href="http://www.kalishonor.net/">KalisHonor.Net</a><br/><br/>');
  document.writeln('      <a class="Silver" href="StationUpdates.html">Station Updates</a><br/>');
  document.writeln('      <a class="Silver" href="SciFiLinks.html">Sci-Fi Links</a><br/>');
  document.writeln('      <a class="Silver" href="PaganLinks.html">Pagan Links</a><br/>');
  document.writeln('      <a class="Silver" href="WebRings.html">Web Rings</a><br/>');
  document.writeln('      <a class="Silver" href="MilPaganRing.html">Military Pagans</a><br/>');
  document.writeln('      <a class="Silver" href="http://books.dreambook.com/coyote/station.sign.html" target="_blank">Sign Registry</a><br/>');
  document.writeln('      <a class="Silver" href="http://books.dreambook.com/coyote/station.html" target="_blank">View Registry</a><br/>');
  document.writeln();  
  document.writeln('    <br/>');
  document.writeln('</div>');
  document.close();
  return true;
}  // end function

// Write the header <div> with a specific background and header image.
function writeHeader(backgroundName, titleName) {
  var backgroundImg  = '';
  var titleImg      = '';
  
  titleImg      = '/Station/Headers/h_' + titleName + '.gif';
  backgroundImg  =  'url(/Images/Backgrounds/k_' + backgroundName + '.jpg)';
  
  document.open();
  document.writeln('<div id="header" style="background-image: ' + backgroundImg + '">');
  document.writeln('<img src="' + titleImg + '" border="0">');
  document.writeln('</div>');
  document.close();
  return true;

} // end function

// Change the window status to read "Return to the Welcome Page"
function statusGoBack() {
  window.status = "Return to the Welcome Page";
} // end of statusGoBack function

// Change the window status to read "Return to the Top of the Page"
function statusGoTop() {
  window.status = "Return to the Top of the Page";
} // end of statusGoTop function

// Change the window status to read "Go to the Bottom of the Page"
function statusGoBottom() {
  window.status = "Go to the Bottom of the Page";
} // end of statusGoBottom function

// Clear the window status display
function statusClear() {
  window.status = "";
  return true;
} // end of statusClear function

// Write a formatted Solarnet News caption
function writeSNNHeader (dateline, location, system) {
  document.open();
  document.write  ('<p style="font: 12pt \'Century Gothic\', Arial; color: #3090C0; font-style: italic">');
  document.writeln('  ' + dateline + '<br>');
  document.writeln('  ' + location + '<br>');
  document.writeln('  ' + system + '</p>');
  document.close();
} // end of writeSNNCaption function

// obfuscate an e-mail address
function writeAddress (username, domain, alias) {
  document.open();
  document.write('<a href="mailto:' + username + '@' + domain + '">');

  if (alias == "") {
    document.write(username + '@' + domain);
  } else {
    document.write(alias);
  } // end if

  document.write('</a>');
  document.close();
  return true;
}

function writeNavButtons (homePageName, showEmail, showTopButton, showBottomButton) {
  document.open();
  document.writeln('<table width="550" border="0" align="center">');
  document.writeln('  <tr>');
  document.writeln('    <td width="510" class="Footer" valign="top">');

  // show an e-mail address and a "return to the welcome page" link if the showEmail parameter specifies to do so.
  if (showEmail == 'Y') {
    document.writeln('      <a href="/' + homePageName.substring(0, homePageName.length - 4) + '/' + homePageName + '.shtml"' + 
      ' onMouseOver="window.status=\'Return to Welcome Page\';return true" onMouseOut="window.status=\'\';return true">');

    // Show a different alias for the e-mail address depending on the homePageName provided.
    if (homePageName == 'StationHome') {
      document.writeln('  Send E-Mail to <a href="mailto:webmaster@phoenixblue.net">Station SysAdmin</a>.</td>');
    } else if (homePageName == 'HunterHome') {
      document.writeln('  Send E-Mail to <a href="mailto:webmaster@phoenixblue.net">Phoenix Blue</a>.</td>');
    } // end inner if

  } else if (showEmail == 'N') {
    document.writeln('&nbsp;</td>');
  } else {
    document.writeln('  <h2>' + showEmail + '</h2></td>');
  }// end outer if

  document.writeln('  <td width="20" valign="top">');

  //  If both buttons are to be displayed, display the top button first.  Otherwise, don't display anything.
  if (showTopButton == 'Y' && showBottomButton == 'Y') {
    document.writeln('    <a href="#Top" onMouseOver="window.status=\'Return to Top of Page\';return true"');
    document.writeln('      onMouseOut="window.status=\'\';return true">');
    document.writeln('    <img src="/Images/Buttons/b_ArrowUp.gif" width="20" height="20" border="0" alt="Top of Page">');
  }  else {
    document.writeln('    &nbsp;')
  }  // end if

  document.writeln('  </td>');
  document.writeln('  <td width="20" valign="top">');

  /*  If *only* the top button is displayed, display the top button here.  If the bottom button is to be displayed instead,
      display it.  Otherwise, don't display anything.
  */
  if (showTopButton == 'Y' && showBottomButton !== 'Y') {
    document.writeln('    <a Href="#Top" onMouseOver="window.status=\'Return to Top of Page\';return true"');
    document.writeln('      onMouseOut="window.status=\'\';return true">');
    document.writeln('    <img Src="/Images/Buttons/b_ArrowUp.gif" width="20" height="20" border="0" alt="Top of Page"></a>');
  } else if (showBottomButton == 'Y') {
    document.writeln('    <a Href="#Bottom" onMouseOver="window.status=\'Return to Bottom of Page\';return true"');
    document.writeln('      onMouseOut="window.status=\'\';return true">');
    document.writeln('    <img Src="/Images/Buttons/b_ArrowDown.gif" width="20" height="20" border="0" alt="Bottom of Page"></a>');
  }  else {
    document.writeln('    &nbsp;');
  }  // end if

  document.writeln('  </td>');
  document.writeln('</tr></table><br>');
  document.close();

  return true;
}

// add a footer to the bottom of the page
function writeFooter(homePageName) {
  document.open();
  document.writeln('<a name="Bottom"><!-- Bottom --></a>');
  document.writeln('<table border="0" width="550" align="center">');
  document.writeln('  <tr>');
  document.writeln('    <td Width="510" valign="top" class="Footer">');

  if (homePageName == 'StationHome') {
    document.writeln('      Send E-Mail to <a class="Blue" href="mailto:webmaster@phoenixblue.net">Station SysAdmin</a>.</td>');
  } else if (homePageName == 'HunterHome') {
    document.writeln('      Send E-Mail to <a class="Blue" href="mailto:webmaster@phoenixblue.net">Phoenix Blue</a>.</td>');
  } // end if

  document.writeln('    <td Width="20">');
  document.writeln('    <a Href="#Top" onMouseOver="window.status=\'Return to Top of Page\';return true"');
  document.writeln('      onMouseOut="window.status=\'\';return true">');
  document.writeln('      <img Src="/Images/Buttons/b_ArrowUp.gif" align="right" Alt="Top" Width="20" Height="20" border="0"></a></td>');
  document.writeln('    <td Width="20">');
  document.writeln('      <a href="/' + homePageName.substring(0, homePageName.length - 4) + '/' + homePageName + '.shtml"' +
    ' onMouseOver="window.status=\'Return to Welcome Page\';return true" onMouseOut="window.status=\'\';return true">');
  document.writeln('      <img Src="/Images/Buttons/b_ArrowLeft.gif" align="right" Alt="Back" Width="20" Height="20" border="0"></a>');
  document.writeln('    </td>');
  document.writeln('  </tr>');
  document.writeln('</table><br>');
  document.close();

  return true;    
}