//alert(location.href)

//page is called 'anglesin.html'
//find it in the array - use multi-dimensions though
//alert(MENU_ITEMS[3][2])

//alert(a + " " + b +" " + c +" " + d)	

var ArrayStart = 1; // ( == 0 if return to old version of menu)

if(d != 0)
	{var related = MENU_ITEMS[a][b];}
else
	{var related = MENU_ITEMS[a];}
	
related = related.slice(2, related.length);
var related2 = MENU_ITEMS[a];
related2 = related2.slice(2, related2.length);

var fs = "";

if(related.length > 0 && location.href != "http://www.coolwebeffects.co.uk/cm/")
{
	if(d != 0)
		{document.write("<hr size='4' style='color:navy;'><u>Related Links</u> in <a href='" + MENU_ITEMS[a][b][1] + "'>" + MENU_ITEMS[a][b][0] + "</a><Br><BR>");}
	else
		{document.write("<hr size='4' style='color:navy;'><u>Related Links</u> in <a href='" + MENU_ITEMS[a][1] + "'>" + MENU_ITEMS[a][0] + "</a><Br><BR>");}


	for(x = ArrayStart; x < (related.length - 1) ; x++)
	{	
		if(related[x][1] != page && related[x][1] != null)
		{
			document.write("<a href='" + related[x][1] + "' style='font-size:10pt;text-decoration:none;'>" + related[x][0] + "</a>&nbsp;&nbsp;&nbsp;&nbsp;");
		}
	}
	try
	{
		if(related[related.length - 1][1] != page && related[related.length - 1][1] != null)
		{
			document.write("<a href='" + related[related.length - 1][1] + "' style='font-size:10pt;text-decoration:none;'>" + related[related.length - 1][0] + "</a>");
		}
	}
	catch(e)
	{}
	
	document.write("<BR><BR>")
	
	if(d != 0)
	{
		document.write("<u>Related Links</u> in <a href='" + MENU_ITEMS[a][1] + "'>" + MENU_ITEMS[a][0] + "</a><Br><BR>")
	
		for(x = ArrayStart; x < (related2.length - 1) ; x++)
		{	
			if(related2[x][1] != MENU_ITEMS[a][b][1] && related2[x][1] != null)
			{
				document.write("<a href='" + related2[x][1] + "' style='font-size:10pt;text-decoration:none;'>" + related2[x][0] + "</a>&nbsp;&nbsp;&nbsp;&nbsp;")
			}
		}
		try
		{
			if(related2[related2.length - 1][1] != MENU_ITEMS[a][b][1] && related2[related2.length - 1][1] != null)
			{
				document.write("<a href='" + related2[related2.length - 1][1] + "' style='font-size:10pt;text-decoration:none;'>" + related2[related2.length - 1][0] + "</a>");
			}
		}
		catch(e)
		{}
	}
	
	
	
	fs += "<hr size='4' noshade><center>";
}
else
{
	fs += "<hr size='4' style='color:navy;'><center>";
}





fs += "<font size='-1'><a href='index.html'>[Home]</a> &nbsp; <a href='calc.html'>[Calculator]</a> &nbsp; <a href='contactus.html'>[Contact Us]</a> &nbsp; <a href='http://www.coolwebeffects.co.uk'>[Cool Web Effects]</a> &nbsp; <a href='../design/index.php'>[Website Design]</a> &nbsp; <a href='../games/index.html'>[Games]</a><BR><BR>";
fs += "<font size=-2>Navigation menu design is &copy; Copyright <a href='http://www.softcomplex.com/products/tigra_menu/'>SoftComplex Inc</a>. 2003</font><BR>";
fs += "<font size='-2'>Everything else &copy Copyright Coolwebeffects 2003-2005.</font>";
fs += "</center>";

document.write(fs);