
function ContentShowHide(exibir) {
	div_all	=	new Array('hist_ontem','hist_evolucao','hist_hoje');
	bt_all	=	new Array('bt_hist_ontem','bt_hist_evolucao','bt_hist_hoje');

	for(i=0;i<div_all.length;i++){
		este	=	div_all[i];
		este_bt	=	bt_all[i];
		if(este==exibir){
			document.getElementById(exibir).style.display	=	'block';
			document.getElementById(este_bt).style.display	=	'none';
		}else{
			document.getElementById(este).style.display		=	'none';
			document.getElementById(este_bt).style.display	=	'inline';
		}
	}

}


function open_image(imagem, w, h, opcoes) {
	instan	=	imagem.replace(/\./g,"");
	instan	=	instan.replace(/\?/g,"");
	instan	=	instan.replace(/\//g,"");
	instan	=	instan.replace(/=/g,"");
	instan	=	instan.replace(/;/g,"");
	instan	=	instan.replace(/-/g,"");

	largura = screen.width;
	altura 	= screen.height;
	XX 		= (largura-w)/2;
	YY		= (altura-h)/2;

	janela = window.open('../img/fotos/img.php?img='+imagem,'POP_UP'+instan,'width='+w+',height='+h+',left='+XX+',top='+YY+','+opcoes);
	janela.focus();  
}


function pop_up_center_flex(local, w, h, carac)
{
instan	=	local.replace(/\./g,"");
instan	=	instan.replace(/\?/g,"");
instan	=	instan.replace(/\//g,"");
instan	=	instan.replace(/=/g,"");
instan	=	instan.replace(/;/g,"");

largura = screen.width;
altura 	= screen.height;
XX 		= (largura-w)/2;
YY		= (altura-h)/2;
janela = window.open(local,'POP_UP'+instan,'width='+w+',height='+h+',left='+XX+',top='+YY+','+carac);
janela.focus();
}


function pop_up_center(local, w, h, scrol)
{
	instan	=	local.replace(/\./g,"");
	instan	=	instan.replace(/\?/g,"");
	instan	=	instan.replace(/\//g,"");
	instan	=	instan.replace(/=/g,"");
	instan	=	instan.replace(/;/g,"");

	largura = screen.width;
	altura 	= screen.height;
	XX 		= (largura-w)/2;
	YY		= (altura-h)/2;
	janela = window.open(local,'POP_UP'+instan,'width='+w+',height='+h+',left='+XX+',top='+YY+',scrollbars='+scrol+',status=no,resizable=yes, toolbar=no,directories=no,menubar=no');
	janela.focus();
}


function _go(selObj)
{
	valor = selObj.options[selObj.selectedIndex].value;
	if(valor != "#"){
		self.location = valor;
	}
}

function excluir(){
	return confirm('Confirma remoção do item?');
}

function addToFavorites(){
	if(document.all){
		window.external.AddFavorite(window.location,document.title);
	}else{
		window.sidebar.addPanel(document.title,location.href,"");
	}
}


function ChangeFontSize(acao) {
	var ObjTexto		= (document.getElementById) ? document.getElementById('conteudo') : document.all('conteudo');
	if(ObjTexto==null){
		var ObjTexto	= (document.getElementById) ? document.getElementById('conteudo') : document.all('conteudo');
	};
	
	var FonteTamAtual	= parseInt(document.query_busca.diversos.value);

	switch(acao){
		case '+':
			FonteTamNovo	=	11;
			break;
		case '++':
			FonteTamNovo	=	13;
			break;
		case '+++':
			FonteTamNovo	=	14;
			break;
	}
	
	document.query_busca.diversos.value	=	FonteTamNovo;
	ObjTexto.style.fontSize				=	FonteTamNovo+"px";
}


function mouseEmCima(imagem,caminho) {
   imagem.src = caminho;
}

function mouseFora(imagem,caminho) {
   imagem.src = caminho;
}

function $(id) {
	return document.getElementById(id);
}

function trim(str) {
	return str.replace(/^\s+|\s+$/g, '');
}	