function onNavLink(href, newWindow)
{
	if (newWindow)
	{
		var win = window.open(root+href, "_blank", "<%=newwindow%>");
		win.focus();
	}
	else
		window.location.href=root+href;
}

function onMouseOver(comment, style)
{
	highlightNavOption("nav"+style, 1);
	st(comment);

	return true;
}

function onMouseOut(comment, style)
{
	highlightNavOption("nav"+style, 0);
	st(comment);
	
	return true;
}

function writeNavLine(name, link, comment, style, newWindow)
{
	var line;

	link="'"+link+"'";
	if (newWindow)
		link += ", 1";

	var icon = style;
	icon = icon.toLowerCase();
	var anchor = "<A onMouseOver=\"Javascript:return onMouseOver('"+comment+"', '"+style+"');\" onMouseOut=\"Javascript:return onMouseOut('', '"+style+"');\" HREF=\"javascript:onNavLink("+link+")\" CLASS=\"nav"+style+"\">";
	line = anchor+"<IMG VALIGN=\"MIDDLE\" STYLE=\"navImg\" SRC=\""+root+"images/icons/"+icon+".gif\" WIDTH=\"16\" HEIGHT=\"16\" BORDER=\"0\"></A> ";
	line = "<NOBR>"+line+anchor+name+"</A></NOBR><BR>";
	
	document.write("<TD style=\"padding-right: 10px\">"+line+"</TD>");
	//document.write(line+"\r\n");
}

function writeNavStart()
{
	document.write("<TR><TD CLASS=\"navBkGnd\" HEIGHT=\"16\" COLSPAN=\"3\"><TABLE BORDER=\"0\">");
	document.write("<TR>");
	//document.write("<TD WIDTH=\""+navWidth+"\" VALIGN=\"TOP\" CLASS=\"navBkGnd\" NOWRAP>");
}

function writeNavEnd()
{
	document.write("</TR></TABLE>");
	document.write("</TD></TR>");

	//document.write("<P>");
	//document.write("</TD>");
}

writeNavStart();
writeNavLine("Home", "index.html", "The home page", "Home");
writeNavLine("Conventions", "conventions/index.html", "An encyclopedia of over 200 bidding conventions", "Conventions");
writeNavLine("Signals", "signals/index.html", "Details of the common signalling and discard methods", "Signals");
writeNavLine("Systems", "systems/index.html", "Overview of the major bidding systems", "Systems");
writeNavLine("History", "history/index.html", "The history of the game", "History");
writeNavLine("Contact Us", "contact.html", "Contact Us", "Contact");
writeNavLine("Links", "links.html", "More useful bridge resources", "Links");
writeNavEnd();

