/* Simplify building of TOC */
var css_class;
var remove_breaks;

function TOC_Embed()
{
	remove_breaks = false;
	css_class = "toc-embed";
	document.write('<DIV class="toc-embed-outer"><DIV class="' + 
		css_class + '"><DIV class="toc-embed-title"><A href="index.html">wx.NET Manual</A></DIV>');
	TOC_Bullets();
	document.write('</DIV></DIV>');
}

function TOC_Simple()
{
	remove_breaks = true;
	css_class = "toc-full";
	document.write('<DIV class="' + css_class + '">');
	TOC_Bullets();
	document.write("</DIV>");
}

function TOC_Bullets()
{
	List_Start();
		Entry("What is wx.NET?", "about.html");
		Entry("Building from Source", "build.html");
		List_Start();
			Entry("Linux", "build-linux.html");
			Entry("Mac OS X", "build-mac.html");
			Entry("Windows", "build-win-vsnet.html");
		List_End();
		Entry("Install Package", "package.html");
		Entry("Samples", "samples.html");
		Entry("Runtime Library<br>Components", "libraries.html");
		Entry("Contributors", "contributors.html");
		Entry("Community & Help", "help.html");
		Entry("Appendices");
		List_Start();
			Entry("License", "license.html");
			Entry("Make Options", "make-options-unix.html");
			Entry("Premake Details", "premake.html");
			Entry("Release Checklist", "release.html");
		List_End();
	List_End();
}

function List_Start()
{
	document.write('<UL class="' + css_class + '">');
}

function Entry(label, url)
{
	if (remove_breaks)
		label = label.replace(/<br>/gi, " ");
	document.write('<LI class="' + css_class + '">');
	if ( (url != "") && (url != null) )
		document.write('<A href="' + url + '">' + label + '</A>');
	else
		document.write(label);
	document.write('</LI>');
}

function List_End()
{
	document.write('</UL>');
}
