// Return the browser to the Welcome page.
function goBack() {
  parent.location.replace(parent.location.href)
}

// Return the browser to the top of a page.
function goTop() {
  this.location.replace(this.location.href)
}

// Return the browser to the welcome page.
function goHome(siteName) {
  this.location.replace("../" + [siteName] + "/" + [siteName] + "Home.html");
}

// Obfuscate an e-mail address to prevent spam harvesting.
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;
} // end of writeAddress function

// add the menu onto the Rashieka's Path pages
function writeRashiekaMenu () {
	document.open();
	document.writeln('	<div id="links">');
	document.writeln('		<table width="740" border="0" align="center">');
	document.writeln('		<tbody><tr>');
	document.writeln('		<td width="20%" class="Rashieka"><a class="Rashieka" href="/index.shtml">Main</a></td>');
	document.writeln('		<td width="20%" class="Rashieka"><a class="Rashieka" href="index.html">Chronicles</a></td>');
	document.writeln('		<td width="20%" class="Rashieka"><a class="Rashieka" href="chapter1.html">Chapter 1</a></td>');
	document.writeln('		<td width="20%" class="Rashieka"><a class="Rashieka" href="bios_knights.html">Knights</a></td>');
	document.writeln('		<td width="20%" class="Rashieka"><a class="Rashieka" href="bios_candidates.html">Candidates</a></td>');
	document.writeln('		</tr></tbody>');
	document.writeln('		</table>');
	document.writeln('	</div><br>');
	document.close();
	return true;
}	// end of writeMenu function	

// add the menu onto the Reluctant Heroes pages
function writeHeroesMenu () {
	document.open();
	document.writeln('	<div id="links">');
	document.writeln('		<table width="740" border="0" align="center">');
	document.writeln('		<tbody><tr>');
	document.writeln('		<td width="25%" class="Heroes"><a class="Heroes" href="/index.shtml">Main</a></td>');
	document.writeln('		<td width="25%" class="Heroes"><a class="Heroes" href="index.html">Reluctant Heroes</a></td>');
	document.writeln('		<td width="25%" class="Heroes"><a class="Heroes" href="chapter1.html">Chapter 1</a></td>');
	document.writeln('		<td width="25%" class="Heroes"><a class="Heroes" href="cast_and_crew.html">Cast &amp; Crew</a></td>');
	document.writeln('		</tr></tbody>');
	document.writeln('		</table>');
	document.writeln('	</div><br>');
	document.close();
	return true;
}	// end of writeMenu function	


// write text to the window status
function writeStatus(statusText) {
  window.status = statusText;
  return true;
} // end of writeStatus function
 
// write a footer for poetry pages
function writeFooter(textColor) {

  document.writeln('<table width="500" border="0" align="center">');
  document.writeln('<tr>');
  document.writeln('<td width="470" valign="top" style="color: ' + textColor + '">');
  document.write('  Send E-mail to ');
    writeAddress    ('feedback', 'kalishonor.net', 'Honor');
    document.writeln('.<br>');
  document.write('  Send E-mail to the ');
    writeAddress    ('webmaster', 'kalishonor.net', 'Webmaster');
    document.writeln('.<br>');
  document.writeln('</td>');
  document.writeln('<td width="30" align="center" valign="top">');
  document.writeln('<a href="javascript:history.back(1)">');
  document.writeln('  <img src="/Images/Buttons/b_ArrowLeft.gif" align="right" height="30" width="30" border="0"');
  document.writeln('    onMouseOver="writeStatus(\'Back to Menu Page\');"');
  document.writeln('    onMouseOut="writeStatus(\'Document: Done\');"></a>');
  document.writeln('</td>');
  document.writeln('</table><br>');
  
} // end of writeFooter function
