var href_head = "www.umass.edu/microbio/";
var file_html = get_file_html();

var file_html_message = 
"<p><table border=1 cellpadding=10 bgcolor='#80FF80'><tr><td>" +
"<b>Note about using this resource in local file mode:</b> " +
"You are displaying html files directly from your " +
"local hard disk rather than through the Internet from " +
"the original web server. " +
"Links will be given first as relative links to avoid requesting the file " +
"through the	Internet, in case it is on your local hard disk or in case " +
"you are not connected to the Internet.  If the first " +
"link fails ('unable to find the file ...') " +
"and you are connected to the Internet, " +
"use the immediately following link <b><a href='#'>[URL]</a></b>, " +
"which is an absolute link " +
"to the server." +
"</td></tr></table>";

//For example: <a href='../chime'>Umass Chime Resources Site.</a>\
//[<a href='http://www.umass.edu/microbio/chime'>www.umass.edu/microbio/chime</a>]\

if (!file_html) file_html_message = "";


function show_file_html_message()
{
	document.writeln(file_html_message);
}

function makelink(lklabel, href_rel, href_tail, wintarg)
{
	with (document)
	{
		write("<a href=\"");
		write(href_rel + "\"");
		if (wintarg != "")
			writeln(" target=\"" + wintarg + "\">");
		else
			writeln(">");
		writeln(lklabel + "</a>");

		if (file_html)
		{
			write("<a href=\"http://" + href_head + href_tail + "\">");
			writeln("[URL]</a>");
		}
	}
}

function get_file_html()
{
	var the_url = ""; // necessary to make substring be a method of the_url
	the_url += document.location;
	if (the_url.substring(0,4) == "file")
		return true;
	return false;
}
