function gotoPage(varItem){
	if (varItem != "null"){
		location.href= document.frmSitesGoverno.menu.value;
	}else{
		alert("Por favor, selecione uma das opções abaixo.");
	}
}

function addFlash(URL, WIDTH, HEIGHT, TRANSPARENT){
	document.write (' <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ');
	document.write (' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ');
	document.write (' width="'+ WIDTH +'" height="'+ HEIGHT +'">');
	document.write (' <param name="movie" value="'+ URL +'" />');
	document.write (' <param name="quality" value="high" />');

	if ( TRANSPARENT ) {
	  document.write (' <param name="Wmode" value="Transparent" />');
	}

	document.write (' <embed src="'+ URL +'" quality="high" ');

	if ( TRANSPARENT ) {
	document.write (' Wmode = "transparent" ');
	}

	document.write (' pluginspage="http://www.macromedia.com/go/getflashplayer" ');
	document.write (' type="application/x-shockwave-flash" width="'+ WIDTH +'" height="'+ HEIGHT +'"></embed> ');
	document.write (' </object>');
}

function onFocus(aFrm, aBorderStatus, aBGStatus, aCampo){
	if(aBorderStatus){
		document.forms[aFrm].elements[aCampo.name].style.border = "1px solid #A8A8A8";
	}
	if(aBGStatus){
		document.forms[aFrm].elements[aCampo.name].style.background = "#CECECE";
	}
}

function onBlur(aFrm, aBorderStatus, aBGStatus, aCampo){
	if(aBorderStatus){
		document.forms[aFrm].elements[aCampo.name].style.border = "1px solid #5B5B5B";
	}
	if(aBGStatus){
		document.forms[aFrm].elements[aCampo.name].style.background = "#CECECE";
	}
}

function abrePopup(anUrl, aTituloPagina, anOpcao){
	window.open(anUrl, aTituloPagina, anOpcao); 
}

function displaySetor(anObj) {
	if (document.getElementById(anObj).style.display == 'none') {
		document.getElementById(anObj).style.display = '';
	}else{
		document.getElementById(anObj).style.display = 'none';
	}
}

function escreverLabelHTML(anObj, mensagem){
	document.getElementById(anObj).innerHTML = mensagem;
}

function centralizarPopup(aLargura, anAltura){
	var popup_largura = aLargura;
	var popup_altura  = anAltura;
	
	var alturaTela  = window.screen.availHeight;
	var larguraTela = window.screen.availWidth;
	
	var ponto_x = parseInt(larguraTela / 2) - parseInt(popup_largura / 2);
	
	var ponto_y = parseInt(alturaTela / 2) - parseInt(popup_altura / 2);
	
	window.moveTo(ponto_x, ponto_y)
}


var maxTextSize   = 15;
var minTextSize   = 10;
var textSizeAtual = 11;
function alterarFontSize(anAcao, anObj){
	switch (anAcao){
		case 'aumentar':
			if((textSizeAtual) < maxTextSize){
				textSizeAtual++;
			}
		break;

		case 'diminuir':
			if((textSizeAtual) > minTextSize){
				textSizeAtual--;
			}
		break;
	}

	document.getElementById(anObj).style.fontSize   = (textSizeAtual) + "px";
}


function escreverLabelHTML(anObj, mensagem){
	document.getElementById(anObj).innerHTML = mensagem;
}

function abrirDescricao(label, descricao){
	if (document.getElementById(descricao).style.display == 'none'){
		escreverLabelHTML(label, "x Fechar informações adicionais");
	}else{
		escreverLabelHTML(label, "Saiba mais &raquo;");
	}
	displaySetor(descricao);
}

function manterMenuSelecionado(anOidMenu, anAction){

	menu = document.getElementById(anOidMenu);

	if (anAction == 'OVER'){
		menu.style.background = '#E7E6C3';
	}

	if (anAction == 'OUT'){
		menu.style.background = 'none';
	}

}

function displayMenu(anObj) {
	if (document.getElementById(anObj).style.display == 'none') {
		document.getElementById(anObj).style.display = 'inline';
	}else{
		document.getElementById(anObj).style.display = 'none';
	}
}