
// this function write the section menu of the appropriate section


function writeSection(sPage, urlPageUp)
{

	var Sections = new Array();
	var Index = 0;

	// ADD SECTIONS HERE --------------------------------------------------------------------
	Sections[Index++] = new AddItem("Introduction","index.htm");
	Sections[Index++] = new AddItem("Downloads","downloads.htm");
	Sections[Index++] = new AddItem("Amiga","amiga.php");
	Sections[Index++] = new AddItem("Sampling","edu-sampling.htm");
	Sections[Index++] = new AddItem("Links","links.htm");


	// writes the protected menu items and sPage is the page currently being viewed
	document.write("<DIV ALIGN=RIGHT class='pageMenu'>");
	document.write("<table height=\"31\" background=\"../images/t2.jpg\" border=0 cellpadding=0 cellspacing=0>");
	document.write("<TR><td background=\"../images/t1.jpg\" width=50px>&nbsp;</td><td><FONT COLOR=#ffffff><SMALL><NOBR>");

	var idx=0;
	var idxCurrentSection=0;
	var fontColour="";
	for( idx=0; idx<Sections.length;idx++)
	{
		if( sPage == Sections[idx].SectionName ) 
		{
			fontColour="<FONT COLOR=#c0c0c0>";
			idxCurrentSection=idx;
		}
		else
			fontColour="<FONT COLOR=WHITE>";

		document.write("<A href=\""+Sections[idx].URL + "\">"+fontColour+Sections[idx].SectionName + "</font></a>");


		if( idx != (Sections.length-1) ) document.write(" | ");
	}

	document.write("</NOBR></TD><TD>&nbsp;&nbsp;&nbsp;&nbsp;<NOBR>");

	// section left/right and up navigation
	if( idxCurrentSection==0 ) // at first section
		document.write("<img src=\"../images/arrow-left-disabled.jpg\" height=\"20\" width=\"20\" border=\"0\">");
	else
		document.write("<A HREF=\""+Sections[idxCurrentSection-1].URL+"\"><img src=\"../images/arrow-left.jpg\" height=\"20\" width=\"20\" border=\"0\" title=\"Previous Item\"></a>");



	// -- UP ARROW -----------------------------------------------------------------------
	if( typeof(urlPageUp) == "undefined" )
	{
		document.write("<A HREF=\"../contents/index.php\"><img src=\"../images/arrow-up.jpg\" height=\"20\" width=\"20\" border=\"0\" title=\"Up Level\"></a>");
	}
	else
	{
		document.write("<A HREF=\"" + urlPageUp + "\"><img src=\"../images/arrow-up.jpg\" height=\"20\" width=\"20\" border=\"0\" title=\"Up Level\"></a>");
	}



	if( idxCurrentSection == Sections.length-1 )
		document.write("<img src=\"../images/arrow-right-disabled.jpg\" height=\"20\" width=\"20\" border=\"0\">");
	else
		document.write("<A HREF=\""+Sections[idxCurrentSection+1].URL+"\"><img src=\"../images/arrow-right.jpg\" height=\"20\" width=\"20\" border=\"0\" title=\"Next Item\"></a>");

	document.write("</NOBR></td><td background=\"../images/t3.jpg\" width=16px>&nbsp;</td></TR></table></DIV>"); 
	
	// title GIF for section
	document.write("<img src=\"title.gif\" width=\"90\" height=\"40\">");

}

function AddItem(sTitle, sURL )
{
	this.SectionName = sTitle;
	this.URL = sURL
	return this;
}




    

  




