/*

The fontsize buttons don't work in Nav3.01 (Win95 or Mac).
The second button (down) often doesn't appear; once this happens,
going anywhere else causes Nav to crash.
Therefore they have been disabled in Nav3.01.

*/

// any_navigator() and navv401() were lifted from n4c2.js and can be
// deleted if/when things are reorganized to include that elsewhere.

//- - - - - - - - - - - - - - - - - - - - - - - - - - - 
function any_navigator()
{
	if (navigator.appName.toLowerCase().indexOf("netscape") != -1)
		return 1;
	return 0;
}
//- - - - - - - - - - - - - - - - - - - - - - - - - - - 
function navv401()
{
	if (!any_navigator())
		return 0;
	if (4.01 <= parseFloat(navigator.appVersion))
		return 1;
	return 0;
}
//- - - - - - - - - - - - - - - - - - - - - - - - - - - 
function n4_ok(ask4n4)
{
	if (!navv401())
	{
		if (ask4n4)
		{
			alert("Sorry, font size control does not work in\n" +
			"the browser you are using. Please upgrade to\n" +
			"Netscape Navigator 4.01 or later if you wish to\n" +
			"project with larger fonts. (www.netscape.com)");
		}
		return 0;
	}
	return 1;
}


//- - - - - - - - - - - - - - - - - - - - - - - - - - - 

function up_fontsize()
{
	if (!n4_ok(1))
		return;
	if (parent.FontSize < 6)
	{
		parent.FontSize += 1;
		location.reload();
	}
	else
	{
		alert('Font size is already at maximum (6)');
	}
}

function down_fontsize()
{
	if (!n4_ok(1))
		return;
	if (parent.FontSize > 3)
	{
		parent.FontSize -= 1;
		location.reload();
	}
	else
	{
		alert('Font size is already at minimum (3)');
	}
}

function set_basefont()
{
	with (document)
	{
		open();
		writeln("<basefont size='" + parent.FontSize + "'>");
		close();
	}
}
function fontsize_controls()
{
	fontsize_control_up();
	fontsize_control_down();
	put_spin_toggle();
}

function fontsize_control_up()
{
	with (document)
	{
		open();
		write("<a href='javascript: up_fontsize()'>")
		writeln("<img src='up.gif' border=0></a>")
		close();
	}
}
function fontsize_control_down()
{
	if (!n4_ok(0))
		return;
	with (document)
	{
		open();
		write("<a href='javascript: down_fontsize()'>")
		writeln("<img src='down.gif' border=0></a>")
		close();
	}
}

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
function put_spin_toggle()
{
	with (document)
	{
		writeln("<embed");
		writeln("	type='application/x-spt'");
		writeln("	height=15");
		writeln("	width=20");
		writeln("	target='chime_graphic'");
		writeln("	button='toggle'");
//		writeln("	buttonstate=1");
		writeln("	script='spin on'");
		writeln("	altscript='spin off'");
		writeln("> Spin");
	}
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

