// Version 2 dated 14.11.03 by PS

var page = document.location.href;

// each element of array made up of:
// [Name,Link,External Link?,Sub menu?]

var Menu 	= new Array();


Menu[0] 	= 
["Grécia Antiga - Página Principal","../_home/index.shtml",0,0];


Menu[1] 	= 
["Linha do Tempo da Grécia","../timeline/index.shtml",0,0];

Menu[2] 	= 
["Política","",0,1,
	["As Cidades-estado","../politics/feature1.shtml",0,0],
	["Governo","../politics/feature2.shtml",0,0],
	["Os Tiranos","../politics/feature3.shtml",0,0]		
];

Menu[3] 	= 
["Deuses e Heróis","",0,1,
	["Zeus","../gods/feature1.shtml",0,0],
	["Apolo","../gods/feature2.shtml",0,0],
	["Atena","../gods/feature3.shtml",0,0],
	["Afrodite","../gods/feature4.shtml",0,0],
	["Hércules","../gods/feature5.shtml",0,0],
	["Aquiles","../gods/feature6.shtml",0,0],
	["Teseu","../gods/feature7.shtml",0,0],
	["Perseu","../gods/feature8.shtml",0,0]
];

Menu[4] 	= 
["Expansão Grega","",0,1,
	["Felipe, Rei da Macedônia","../expansion/feature1.shtml",0,0],
	["Alexandre, O Grande","../expansion/feature2.shtml",0,0]	
];

Menu[5] 	= 
["Guerra e Conflito","",0,1,
	["A Guerra de Tróia","../war/feature1.shtml",0,0],
	["As Guerras Persas","../war/feature2.shtml",0,0],	
	["A guerra do Peloponeso","../war/feature3.shtml",0,0]	
];

Menu[6] 	= 
["Língua","../language/feature1.shtml",0,0];

Menu[7] 	= 
["Educação","../education/feature1.shtml",0,0];

Menu[8] 	= 
["Ciência e Medicina","../science/feature1.shtml",0,0];

Menu[9] 	= 
["Filosofia","../philosophy/feature1.shtml",0,0];

Menu[10] 	= 
["Arte e Arquitetura","",0,1,
	["Arquitetura","../art/feature1.shtml",0,0],
	["Cerâmica","../art/feature2.shtml",0,0],
	["Esculturas","../art/feature3.shtml",0,0]
];

Menu[11] 	= 
["Entretenimento","",0,1,
	["Contador de histórias","../entertainment/feature1.shtml",0,0],
	["Teatro","../entertainment/feature2.shtml",0,0]
];

Menu[12] 	= 
["Os Jogos Olímpicos","",0,1,
	["As Origens","../olympics/feature1.shtml",0,0],
	["Olímpia","../olympics/feature2.shtml",0,0],
	["Eventos","../olympics/feature3.shtml",0,0],
	["Desenvolvimento","../olympics/feature4.shtml",0,0],			
	["Olimpíadas 2004","../olympics/feature5.shtml",0,0]
];


Menu[13] 	= 
["Jogar: O Jogo Olímpico","../games/index.shtml",0,0];





// -------------------------------------------------------------------------

// do not edit below this line!!
// Last Update 27/11/03


// variables for highlighting section/subsection

var showSection = false;

var showSubSection = false;

var output = output2 = output3 = "";

var breadcrumbs = "";
var sectionLink = "";


var next_link = "";
var next_text = "";

for (i=0; i<Menu.length;i++)

{

	showSection = comparePage(Menu[i][1],page) ? true : false;

	output3="";

	if (Menu[i][3]==1 && Menu[i][4]!="undefined") // sub nav

	{

		

		for (j=4; j<Menu[i].length;j++)

		{

			breadcrumbsSec="<span class=\"darkgreen1\"> > </span><a href=\"" + Menu[i][j][1] + "\" class=\"darkgreenlink1\">" + Menu[i][j][0] + "</a> " + breadcrumbs;

		

			showSubSection = comparePage(Menu[i][j][1],page) ? true : false;



			output2="";

			for (k=4; k<Menu[i][j].length;k++)
			{

				if (comparePage(Menu[i][j][k][1],page))
				{

					output2 += showTable(Menu[i][j][k][0],Menu[i][j][k][1],showSection,20,true,"",Menu[i][j][k][2]);
				if (k+1 <Menu[i][j].length)
				next_link = Menu[i][j][k+1][1];
				else if (k!=4)
				next_link = Menu[i][j][4][1];
				next_text = "Sub Article";

					showSubSection=showSection=true;

					breadcrumbs+=breadcrumbsSec;

					breadcrumbs+="<span class=\"darkgreen1\"> > </span><a href=\"" + Menu[i][j][k][1] + "\" class=\"darkgreenlink1\">" + Menu[i][j][k][0] + "</a> ";

				}

			}

			

			if (comparePage(Menu[i][j][1],page))

			{

				showSection=true;
				if (j+1 <Menu[i].length)
				{
					next_link = Menu[i][j+1][1];
					next_text = Menu[i][j+1][0];
				}
				else if (j!=4)
				{
					next_link = Menu[i][4][1];
					next_text = Menu[i][4][0];
				}



				breadcrumbs=breadcrumbsSec + breadcrumbs;
			}

			output3 += showTable(Menu[i][j][0],Menu[i][j][1],showSection,15,comparePage(Menu[i][j][1],page) ? true: false,"",Menu[i][j][2]) + output2;

			output3 = output3.replace("replace"," bgcolor='#ffffff'");
			if (showSection && next_text=="")
			{
				if (i+1 < Menu.length)
				next_link = Menu[i+1][1];
				else
				next_link = Menu[0][1];
				next_text = "Feature";
			}

		}

		if (!showSubSection && !showSection)
		output3="";
		else 
		{
			var featureLink=Menu[i][1];
			
			if (Menu[i][1]=="undefined" || Menu[i][1]=="")
			featureLink=Menu[i][4][1];

			breadcrumbs="<a href=\"" + featureLink + "\" class=\"darkgreenlink1\">" + Menu[i][0] + "</a> " + breadcrumbs;
		}
				

	}

	if (Menu[i][1]=="")
	sectionLink = Menu[i][4][1];
	else 
	sectionLink = Menu[i][1];

	output += showTable(Menu[i][0],sectionLink,showSection,10,comparePage(Menu[i][1],page) ? true : false,showSubSection || showSection ? "" : "bgcolor='#fffff'",Menu[i][2]) + output3;

}

breadcrumbs = "<a href=\"" + Menu[0][1] + "\" class=\"darkgreen2\">Grécia Antiga</a><span class=\"darkgreenlink1\"> > </span>" + breadcrumbs;
output = "<table><tr><td height=\"30\"><img src=\"../_includes/sitewide_images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"/></td></tr></table>" + output.replace ("replace"," ");









function comparePage (check,current)
{

	var returnValue = false;

	check = check.replace ("\.\.\/","");

	if (current.match(check)) returnValue=true;

	if (check==current) returnValue=true;

	if (check=="") returnValue=false;

	return returnValue;
}


function showNext()
{
	if (next_link!="")
	return "<a href=\"" + next_link + "\" class=\"greenlink2\"><b>" + next_text + "</b> <img src=\"../_includes/sitewide_images/arrow_next.gif\" width=\"7\" height=\"6\" alt=\"\" border=\"0\"/></a>";
	else
	return "";
}


function showTable(name,link,show,pixels,highlight,bgcolor2,target)

{

	bgcolor = show ? "bgcolor='ffffff'" : "replace";

	nav 	= highlight ? "greenlink2" : "nav";

	target 	= target==1 ? "target=_new" : "";

	isOn 	= highlight ? "_on" : "";



	return  "<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\" " + bgcolor + "><tr>" +

	"<td width=\"10\"><img src=\"../_includes/sitewide_images/blank.gif\" width=\"" + pixels + "\" height=\"1\" alt=\"\" border=\"0\"/></td>" + 

	"<td width=\"166\" height=\"20\" valign=\"middle\"><a href=\"" + link + "\" " + target + " class=\"" + nav + "\"><b>" + name + "</b></a></td>" +

	"<td width=14><a href=\"" + link + "\" " + target + " class=\"" + nav + "\"><img src=\"../_includes/sitewide_images/arrow_nav" + isOn + ".gif\" width=\"7\" height=\"6\" alt=\"\" border=\"0\"/></a>" + 

	"<img src=\"../_includes/sitewide_images/blank.gif\" width=\"5\" height=\"1\" alt=\"\" border=\"0\"/></td>" + 

	"</tr></table>" + 

	"<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"  " + bgcolor2 + ">" + 

	"<tr><td height=\"1\" " + bgcolor2 + "><img src=\"../_includes/sitewide_images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"/></td>" + 

	"</tr></table>";

}

next = showNext();
