function addEvent(obj, evType, fn){
		if (obj.addEventListener)
				obj.addEventListener(evType, fn, true)
		if (obj.attachEvent)
				obj.attachEvent("on"+evType, fn)
}


// JavaScript Document
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_jumpMenuGo(selName,targ,restore){ //v3.0
  var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}

function VaiCampus() {  
  MM_jumpMenu('parent',document.getElementById("select_outroscampus"),0);
}

function VaiGoverno() {  
  MM_jumpMenu('parent',document.getElementById("select_governo"),0);
}

function CarregaEventos() {
  addEvent(document.getElementById("select_outroscampus"),"change",VaiCampus);
  addEvent(document.getElementById("select_governo"),"change",VaiGoverno);
/*  PreencheNavegacaoConteudo(); */
}

if(window.addEventListener)
{
	window.addEventListener("load", CarregaEventos, false);
} else
if(window.attachEvent)
{
	window.attachEvent("onload", CarregaEventos);
}

function ExibirEmail(objeto,usuario,dominio) {
	datahora = new Date();
	ancora = datahora.getTime() + Math.floor(Math.random()*100);
	endemail = usuario + '@' + dominio;
	objeto.parentNode.innerHTML = '<a name="' + ancora + '"></a><strong>' + endemail + '</strong> <a href="#' + ancora + '" class="antispamemail" onclick="OcultarEmail(this,\'' + usuario + '\',\'' + dominio + '\')">Ocultar E-mail</a>';
}

function OcultarEmail(objeto,usuario,dominio) {
	datahora = new Date();
	ancora = datahora.getTime() + Math.floor(Math.random()*100);
	if (objeto) {
	  objeto.parentNode.innerHTML = '<a name="' + ancora + '"></a><i>e-mail oculto</i> <a href="#' + ancora + '" class="antispamemail" onclick="ExibirEmail(this,\'' + usuario + '\',\'' + dominio + '\')">Exibir E-mail</a>';
	} else {
  	  document.write('<a name="' + ancora + '"></a><i>e-mail oculto</i> <a href="#' + ancora + '" class="antispamemail" onclick="ExibirEmail(this,\'' + usuario + '\',\'' + dominio + '\')" title="Email: ' + usuario + ' em ' + dominio + '">Exibir E-mail</a>');
	}
}