

var fullIndex = new Array("Educational", "", "", 0x1,
			  "Mandarin Tutor", "MandarinTutor", "/MandarinTutor/", 0x11,
			  "Screenshots", "MandarinTutor", "/MandarinTutor/lesson1.html", 0x111,
			  //"Readme", "MandarinTutor", "/MandarinTutor/readme.html", 0x211,

			  "Entertainment", "", "", 0x2,
			  "Dome Wars", "DomeWars", "/DomeWars/", 0x12,
			  "Screenshots", "DomeWars", "/DomeWars/screen.html", 0x112,
			  "Sheepshead", "Sheepshead", "/Sheepshead/", 0x22,
			  "SV Racer", "SVRacer", "/SVRacer/", 0x32,
			  "Screenshots", "SVRacer", "/SVRacer/screen.html", 0x132,
			  "Wooden Puzzle", "WoodenPuzzle", "/WoodenPuzzle/", 0x42,
			  "Java Version", "WoodenPuzzle", "/WoodenPuzzle/java/puzzle.html", 0x142,
			  "xinxin (Hearts)", "Hearts", "/Hearts/", 0x52,

			  "Utilities", "", "", 0x3,
			  "abcFonts", "abcFonts", "/abcFonts/", 0x13,
			  "Screenshot 1",  "abcFonts", "/abcFonts/screen1.html", 0x113,
			  "Screenshot 2", "abcFonts", "/abcFonts/screen2.html", 0x213,
			  "Print Sample", "abcFonts", "/abcFonts/screen3.html", 0x313,
			  "FreeVCD", "FreeVCD", "/FreeVCD/", 0x23,
			  "Key Reference", "FreeVCD", "/FreeVCD/keys.html", 0x123,
			  "OS X VCD Tutorial", "VCDCopyX", "/VCDCopyX/tutorial.html", 0x223,
			  "PreDView", "PreDView", "/PreDView/", 0x33,
			  "VCD Copy X", "VCDCopyX", "/VCDCopyX/", 0x43,
			  "OS X VCD Tutorial", "VCDCopyX", "/VCDCopyX/tutorial.html", 0x143,
			  "Yazi", "Yazi", "/Yazi/", 0x53,
			  "Quick Start Guide", "Yazi", "/Yazi/quickstart.html", 0x153,
			  "Adding Chars", "Yazi", "/Yazi/add.html", 0x253,
			  "Yazi Screenshots", "Yazi", "/Yazi/screen.html", 0x353,
			  "Yazi Services", "Yazi", "/Yazi/services.html", 0x453,
			  "Extending Dicts", "Yazi", "/Yazi/extending.html", 0x553,

			  "Other", "", "", 0x4,
			  "Feedback", "feedback", "/bug.html", 0x14
			  );


function printTitle(currentPage)
{
  count = 0;
  document.write("<title>");
  for (x = 0; x < fullIndex.length/4; x++)
    if (((fullIndex[x*4+3])&0xFF) == (currentPage&0xFF))
      {
	document.write(fullIndex[x*4]);
	count++;
	break;
      }
  if (count == 0)
    document.write("NS Software");
  document.write("</title>");
}

function indexBar(currentPage)
{
  for (x = 0; x < fullIndex.length/4; x++)
	{
		var pageID = fullIndex[x*4+3];
		
		if (pageID>>4 == 0)
		{
			selectedVar = ((currentPage&0x00F)==(pageID&0x00F))?"Selected":"";
			document.write('<div class="sidebarCategory'+selectedVar+'">'+fullIndex[x*4]+'</div>');
		}
		else if (pageID>>8 == 0)
		{
			selectedVar = ((currentPage&0x0FF)==(pageID&0x0FF))?"Selected":"";
			document.write('<a href = "'+fullIndex[x*4+2]+'" class="sidebarProgram'+selectedVar+
										 '">'+fullIndex[x*4]+'</a><br>');
		}
		else if ((pageID&0xFF) == (currentPage&0xFF))
		{
			selectedVar = ((currentPage&0xFFF)==(pageID&0xFFF))?"Selected":"";
			document.write('<a href = "'+fullIndex[x*4+2]+'" class="sidebarProgramInfo'+selectedVar+
										 '">'+fullIndex[x*4]+'</a><br>');
		}
	}
	document.writeln('&nbsp;<p>');

  document.writeln('<center><script type="text/javascript"><!--');
  document.write(' google_ad_client = "pub-1576654934490329";');
	document.write('google_alternate_ad_url = "http://www.ns-software.com/blank.html";');
	document.write('google_ad_width = 120;');
	document.write('google_ad_height = 240;');
	document.write('google_ad_format = "120x240_as";');
	document.write('google_ad_type = "text";');
	document.write('google_ad_channel ="";');
	document.write('google_color_border = "336699";');
	document.write('google_color_bg = "0000CC";');
	document.write('google_color_link = "CCCCCC";');
	document.write('google_color_url = "FFFF66";');
	document.write('google_color_text = "FFFFFF";');
	document.write('//--></script>');
  document.write('<script type="text/javascript"');
  document.write('  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">');
	document.write('</script></center>');
}

function navBar()
{
  document.write('<table cellspacing=0 cellpadding=0 width=100% border=0>');
  document.write('<tr><td>&nbsp;</td>');
  document.write('<td background=/images/top_bar.gif height=56 width=425 valign=top>');
  document.write('<table cellpadding=5 border=0><tr><td><a href=/index.html class=topbar>Software</a> ');
  document.write('<a href=/services.html class=topbar>Services</a> ');
  document.write('<a href=/about.html class=topbar>About</a></td></tr></table></td>');
  document.write('</tr></table>');
}

function printFooter(currentPage)
{
  name = "software";
  for (x = 0; x < fullIndex.length/4; x++)
    if (fullIndex[x*4+3] == currentPage)
      { name = fullIndex[x*4+1]; break; }

  var d = new Date(document.lastModified);
  document.write('<table width=100%><tr>');

  document.write('<td align=left size=50%><small>You\'re visitor: ');
  document.write('<IMG align=center SRC="http://www.ns-software.com/cgi-sys/Count.cgi?dd=D&trgb=000000&prgb=101010&ft=0&df=nathanst-'+
		 name+'.html">');
  document.write('</td>');


  document.write('<td align=right size=50%><small>'+
                 '<a href="mailto:'+name+'@');
  document.write('ns-software.com">'+name+'@');
  document.write('ns-software.com</a>');
  document.write('</small></td>');


  document.write('</tr><tr><td colspan=2>');
  document.write('<center><small>&copy;2003-2005 NS Software, All rights'+
                 ' reserved.<br>This software is provided without warranty'+
                 ' implied or otherwise.</small></center>');
  document.write('</td></tr><tr>');
  document.write('<td colspan=2 align=center><small>Last modified '+
                 document.lastModified+'</small></td></tr></table>');


	document.writeln('<hr><center>');
	document.writeln('<script type="text/javascript"><!--');
	document.write(' google_ad_client = "pub-1576654934490329";');
	document.write('	google_ad_width = 468;');
	document.write('	google_ad_height = 15;');
	document.write('	google_ad_format = "468x15_0ads_al_s";');
	document.write('	google_ad_channel ="";');
	document.write('	google_color_border = "336699";');
	document.write('	google_color_bg = "FFFFFF";');
	document.write('	google_color_link = "0000FF";');
	document.write('	google_color_url = "008000";');
	document.write('	google_color_text = "000000";');
	document.write('	//--></script>');
	document.write('<script type="text/javascript"');
	document.writeln('  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">');
  document.writeln('</script>');
  
document.write('<!-- Search Google -->');
document.write('<center>');

document.write('<form method="get" action="http://www.google.com/custom" target="google_window">');
document.write('<table bgcolor="#ffffff">');
document.write('<tr><td nowrap="nowrap" valign="top" align="left" height="32">');
document.write('<input type="text" name="q" size="25" maxlength="255" value=""></input>');
document.write('<input type="submit" name="sa" value="Google Search"></input>');
document.write('<input type="hidden" name="client" value="pub-1576654934490329"></input>');
document.write('<input type="hidden" name="forid" value="1"></input>');
document.write('<input type="hidden" name="ie" value="ISO-8859-1"></input>');
document.write('<input type="hidden" name="oe" value="ISO-8859-1"></input>');
document.write('<input type="hidden" name="safe" value="active"></input>');
document.write('<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1;"></input>');
document.write('<input type="hidden" name="hl" value="en"></input>');
document.write('</td></tr></table>');
document.write('</form>');
document.write('</center>');
document.write('<!-- Search Google -->');

	document.writeln('</center>');

}

function printDonations(where)
{
  document.write('<center>');
  document.write('<small>Please consider making a donation to help support this site!</small>');
  document.write('<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="donations');
  document.write('@ns-software.com">');
  document.write('<input type="hidden" name="item_name" value="');
  document.write(where);	
  document.write('">');
  document.write('<input type="hidden" name="item_number" value="1.0">');
  document.write('<input type="hidden" name="no_shipping" value="1">');
  document.write('<input type="hidden" name="no_note" value="1">');
  document.write('<input type="hidden" name="currency_code" value="USD">');
  document.write('<input type="hidden" name="tax" value="0">');
  document.write('<input type="image" src="https://www.paypal.com/images/x-click-but21.gif" name="submit" alt="Make payments with PayPal - it\'s fast, free and secure!">');
  document.write('</form>');
  document.write('</center>');
}
