
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('../shared/inc/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 hideDefault(input){
  if(typeof(input.defaultValue)=="undefined")
    input.defaultValue = input.value;
  if(input.value == input.defaultValue)
    input.value = "";
  return true;
}
function showDefault(input){
  if(input.value == "" && typeof(input.defaultValue)!="undefined")
    input.value = input.defaultValue;
  return true;
}
// ex: <INPUT onFocus="return hideDefault(this);" onBlur="return showDefault(this);" value="Type your full name here" />


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.form_tam_fonte.diversos.value);

	switch(acao){
		case '+':
			FonteTamNovo	=	FonteTamAtual+2;
			break;
		case '-':
			FonteTamNovo	=	FonteTamAtual-2;
			break;
		case 'r':
			FonteTamNovo	=	11;
			break;
	}
	
	document.form_tam_fonte.diversos.value	=	FonteTamNovo;
	ObjTexto.style.fontSize				=	FonteTamNovo+"px";
}


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	=	FonteTamAtual+2;
			break;
		case '-':
			FonteTamNovo	=	FonteTamAtual-2;
			break;
		case 'r':
			FonteTamNovo	=	10;
			break;
	}
	
	document.query_busca.diversos.value	=	FonteTamNovo;
	ObjTexto.style.fontSize				=	FonteTamNovo+"px";
}

