// Original Guestbook was provided june 22, 1998

/* DISABLED GUESTBOOK 11/5/03
//var gb_url_prefix = "http://www.webpub.com/~mahuja/guestbk/";
var gb_url_prefix = "http://molvis.sdsc.edu/guestbk/";
var gb_mainfile = "guestbkc.htm";

var gb_section = new Array();

gb_section[1] = "biochem";
gb_section[2] = "chemistr";
gb_section[3] = "edhow";
gb_section[4] = "edmols";
gb_section[5] = "mailnews";
gb_section[6] = "gallerie";
gb_section[7] = "nonengli";
gb_section[8] = "pdbs";
gb_section[9] = "software";
gb_section[10] = "other";
gb_section[11] = "";

var gb_short_descrip = new Array();

gb_short_descrip[1] = "Biochemistry sites";
gb_short_descrip[2] = "Chemistry sites";
gb_short_descrip[3] = "Education: How to use software/Workshops";
gb_short_descrip[4] = "Education: Molecules";
gb_short_descrip[5] = "Email lists/Newsgroups";
gb_short_descrip[6] = "Galleries";
gb_short_descrip[7] = "Non-English resources";
gb_short_descrip[8] = "PDBs/sources of atomic coordinate files";
gb_short_descrip[9] = "Software";
gb_short_descrip[10] = "None of the above (suggest new categories here)";

function gb_main(tail)
{
	with (document)
	{
		writeln("<a href=\"" + gb_url_prefix + gb_mainfile + "\">");
		writeln("Guestbook</a>" + tail);
	}
}

function write_gb_section(sect)
{
	var gbi;

	gbi = get_gb_sect(sect);

	with (document)
	{
		if (gbi == -1)
			writeln("[ERROR: Can't find guestbook section \"" + sect + "\"]");
		else
		{
			writeln("Links to additional resources, contributed by visitors");
			writeln("to this site, will be found in the");
			writeln("<a href=\"" + gb_url_prefix + gb_section[gbi] + ".htm\">");
			writeln(gb_short_descrip[gbi] + "</a>");
			writeln("section of our");
		}
	}
	gb_main(".");
}

function write_gb_sections(sect1, sect2)
{
	var gbi;

	gbi1 = get_gb_sect(sect1);
	gbi2 = get_gb_sect(sect2);

	with (document)
	{
		if (gbi1 == -1)
			writeln("[ERROR: Can't find guestbook section \"" + sect1 + "\"]");
		else if (gbi2 == -1)
			writeln("[ERROR: Can't find guestbook section \"" + sect2 + "\"]");
		else
		{
			writeln("Links to additional resources, contributed by visitors");
			writeln("to this site, will be found in the");

			writeln("<a href=\"" + gb_url_prefix + gb_section[gbi1] + ".htm\">");
			writeln(gb_short_descrip[gbi1] + "</a>");

			writeln(" and ");

			writeln("<a href=\"" + gb_url_prefix + gb_section[gbi2] + ".htm\">");
			writeln(gb_short_descrip[gbi2] + "</a>");

			writeln("sections of our");
		}
	}
	gb_main(".");
}

function get_gb_sect(sect)
{
	var i;
	for (i = 1; gb_section[i] != ""; i++)
		if (gb_section[i] == sect)
			break;
	if (gb_section[i] == "")
	{
		alert("Error: can't find guestbook section \"" + sect + "\"");
		return -1;
	}
//	alert("Found guestbook section \"" + sect + "\": " + gb_section[i]);
	return i;
}

*/

function write_gb_section(sect)
{
	with (document)
	{
		writeln("The most up-to-date list of additional resources is in the");
		writeln("relevant section of the");
		writeln("<i>World Index of Molecular Visualization Resources</i>,");
		writeln("<a href=\"http://molvisindex.org\">molvisindex.org</a>");
		writeln("(which is maintained largely by visitors to that site).");
		writeln("(<a href=\"http://molvisindex.org\">molvisindex.org</a>");
		writeln("has superceded the Guest Book formerly linked here.)");
	}
}

function write_gb_sections(sect1, sect2)
{
	write_gb_section();
}

function gb_main()
{
	write_gb_section();
}
