ativo = null;
cellAtivo = null;
timeId = null;
document.onclick = new Function("show()");

function show(cell,obj)
{
	obj = document.getElementById(obj);
	if(ativo!=null) { ativo.style.visibility = "hidden"; ativo=null;  cellAtivo.style.backgroundColor=''; }
	if(cell)
	{
		cell.style.backgroundColor='#aeffd7';
		cellAtivo = cell;
	}
	if(timeId!=null){ clearTimeout(timeId); }
	if(obj)
	{
		obj.style.visibility = "visible";
		ativo = obj;
	}
}


function timerHidePop()
{
	if(ativo!=null)
	{
		timeId = setTimeout("ativo.style.visibility = 'hidden'; timeId=null; cellAtivo.style.backgroundColor=''; ativo=null;",3000);
	}
	else { 
	if(ativo==null){ cellAtivo.style.backgroundColor=''; }
	}
}

function escreveMenu(stringFinal){
 if ( document.all )
        {
                menu.innerHTML = stringFinal;
                menu.style.visibility = 'visible';
		        }
        else if ( !document.all && document.getElementById )
        {
                document.getElementById( "menu" ).innerHTML = stringFinal;
                document.getElementById( "menu" ).style.visibility = 'visible' ;
		        }
        else
        {
                menu.innerHTML = stringFinal;
                menu.style.visibility = 'visible' ;
		        }
}

function escreveColab(stringFinal){
 if ( document.all )
        {
                colab.innerHTML = stringFinal;
                colab.style.visibility = 'visible';
		        }
        else if ( !document.all && document.getElementById )
        {
                document.getElementById( "colab" ).innerHTML = stringFinal;
                document.getElementById( "colab" ).style.visibility = 'visible' ;
		        }
        else
        {
                colab.innerHTML = stringFinal;
                colab.style.visibility = 'visible' ;
		        }
}
 
institution = new Array(
	Array('History','http://www.abequa.org.br/english/historico.htm',''),
	Array('Statute','http://www.abequa.org.br/english/estatuto.htm',''),
	Array('How To Became<br>&nbsp;&nbsp;a Member','http://www.abequa.org.br/english/associar.htm',''),
	Array('Who´s Who','http://www.abequa.org.br/english/quem.htm',''),
	Array('Mural','http://www.abequa.org.br/english/mural.htm',''),
	Array('Events','http://www.abequa.org.br/english/eventos.htm',''),
	Array('News','http://www.abequa.org.br/english/noticias.htm',''),
	Array('Contact US','http://www.abequa.org.br/english/contato.htm','')
	);

publications = new Array(
	Array('Archaeology','http://www.abequa.org.br/english/publicacoes/arqueologia.htm',''),
	Array('Soil Science','http://www.abequa.org.br/english/publicacoes/ciencias.htm',''),
	Array('Ecology','http://www.abequa.org.br/english/publicacoes/ecologia.htm',''),
	Array('Continental and<br>&nbsp;&nbsp;Coastal Geomorphology<br>','http://www.abequa.org.br/english/publicacoes/geomorfo.htm',''),
	Array('Environmental Studies','http://www.abequa.org.br/english/publicacoes/ambiente.htm',''),
	Array('Neotectonics','http://www.abequa.org.br/english/publicacoes/neotectonica.htm',''),
	Array('Oceanography','http://www.abequa.org.br/english/publicacoes/oceanografia.htm',''),
    Array('Paleoclimate<br>&nbsp;&nbsp;and Climatology<br>','http://www.abequa.org.br/english/publicacoes/paleoclima.htm',''),
	Array('Palynology','http://www.abequa.org.br/english/publicacoes/palinologia.htm',''),
	Array('Politics','http://www.abequa.org.br/english/publicacoes/politica.htm',''),
	Array('Continental Quaternary','http://www.abequa.org.br/english/publicacoes/quatcont.htm',''),
	Array('Coastal Quaternary','http://www.abequa.org.br/english/publicacoes/quatcost.htm',''),
	Array('Marine Quaternary','http://www.abequa.org.br/english/publicacoes/quatmar.htm',''),
	Array('Natural Resources','http://www.abequa.org.br/english/publicacoes/recurso.htm',''),
	Array('Sedimentology','http://www.abequa.org.br/english/publicacoes/sedimentologia.htm',''),
	Array('Remote Sensing','http://www.abequa.org.br/english/publicacoes/sensoriamento.htm','')
	);

titulo = new Array(institution,publications);
titulonome = new Array('Institution','Publications');

var stringFinalMenu = '';

for(j=0; titulo[j]; j++)
{
	
	stringFinalMenu = stringFinalMenu+"<table width=\"132\" height=\"23\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\"><tr><td width=\"4\" height=\"8\" bgcolor=\"#027E82\"></td><td rowspan=\"3\" bgcolor=\"#027E82\" class=\"arial cFFFFFF size11\"> &nbsp;&nbsp;<strong>"+titulonome[j]+"</strong></td></tr><tr><td width=\"4\" height=\"7\" bgcolor=\"#b0b000\"></td></tr><tr><td width=\"4\" height=\"8\" bgcolor=\"#027E82\"></td></tr></table>"
	stringFinalMenu = stringFinalMenu+"<table width=\"132\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\" class=\"arial size11 c333333\">";
	for(y=0; titulo[j][y]; y++)
	{
		
		if(y!=0){ estilo  = "class=\"bordaTop bcFFFFFF\"";} else{ estilo = "";}
		if(titulo[j][y][2]){ strmouseover = "show(this,'"+titulo[j][y][2]+"')"; seta = " <a href=\""+titulo[j][y][1]+"\" class=\"c333333 nlink\"><img src=\"http://www.imasters.com.br/img/outros/seta_menu.gif\" width=\"4\" height=\"6\" border=\"0\"></a>"; } else { strmouseover = "show(this);"; seta = "";}
		stringFinalMenu = stringFinalMenu+"<tr><td height=\"24\" colspan=\"2\" onMouseOver=\""+strmouseover+";\" onMouseOut=\"timerHidePop()\" "+estilo+"><img src=\"/img/pixels/pixel_transparente.gif\" width=\"1\" height=\"24\" align=\"absmiddle\">&nbsp;&nbsp;<a href=\""+titulo[j][y][1]+"\" class=\"c333333 nlink\">"+titulo[j][y][0]+"</a>"+seta+"</td></tr>";
	}
	
	stringFinalMenu = stringFinalMenu+"</table>";
}

var stringFinalColab = '';

stringFinalColab = '<br />';

for(z=0; arrColab[z]; z++)
{

stringFinalColab = stringFinalColab+"<table width=\"126\" height=\"34\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"arial size10\"><tr><td height=\"18\" bgcolor=\"#EAF9F9\" align=\"left\">&nbsp;<a href=\"http://www.imasters.com.br/artigo.php?cc="+arrColab[z][0]+"\" class=\"c545353 decNone\" >"+arrColab[z][2]+"</a></td><td width=\"29\" height=\"34\" rowspan=\"2\"><a href=\"http://www.imasters.com.br/artigo.php?cc="+arrColab[z][0]+"\" class=\"c053669 decNone\" ><img src=\"http://www.imasters.com.br/conteudo/"+arrColab[z][1]+"/_dados/capa.gif\" width=\"29\" border=\"0\" height=\"34\" /></a></td></tr><tr><td height=\"16\" bgcolor=\"#C7EAEA\" align=\"left\">&nbsp;<a href=\"http://www.imasters.com.br/artigo.php?cc="+arrColab[z][0]+"\" class=\"c053669 decNone\" >"+arrColab[z][3]+"</a></td></tr></table><br />";

}
