
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(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 indique_vida(id, tit)
{
w		= 580;
h		= 390;
largura = screen.width;
altura 	= screen.height;
XX 		= (largura-w)/2;
YY		= (altura-h)/2;
janela = window.open('../internas/indique.vidaesaude.php?show='+id+'&showtit='+tit,'POP_UP_INDIQUEVIDA','width='+w+',height='+h+',left='+XX+',top='+YY+',scrollbars=yes,status=no,resizable=yes, toolbar=no,directories=no,menubar=no');
janela.focus();
}

function indique_noticias(id, tit)
{
w		= 580;
h		= 390;
largura = screen.width;
altura 	= screen.height;
XX 		= (largura-w)/2;
YY		= (altura-h)/2;
janela = window.open('../internas/indique.noticias.php?show='+id+'&showtit='+tit,'POP_UP_INDIQUENOTICIAS','width='+w+',height='+h+',left='+XX+',top='+YY+',scrollbars=yes,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(pageName){
	if(window.external){
		window.external.AddFavorite(window.location,pageName);
	}else{
		window.sidebar.addPanel(pageName,location.href,"");
	}
}


function ChangeFontSize(acao) {
	var ObjTexto		= (document.getElementById) ? document.getElementById('internas-central') : document.all('internas-central');
		if(ObjTexto==null){
			var ObjTexto	= (document.getElementById) ? document.getElementById('internas-miolo') : document.all('internas-miolo');
		};
	
	var FonteTamAtual	= parseInt(document.query_busca.diversos.value);



	switch(acao){
		case '+':
			FonteTamNovo	=	FonteTamAtual+2;
			break;
		case '-':
			FonteTamNovo	=	FonteTamAtual-2;
			break;
		case 'r':
			FonteTamNovo	=	11;
			break;
	}
	
	document.query_busca.diversos.value	=	FonteTamNovo;
	ObjTexto.style.fontSize				=	FonteTamNovo+"px";
}

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_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}