//Função usada para mostrar e ocultar uma div
function DivOculta(div)
{
	// Verifica se a div está visivel ou invisivel
	if(document.getElementById(div).style.display == "none")
	{
		document.getElementById(div).style.display = "block";
	}
	else
	{	
		document.getElementById(div).style.display = "none";
	}
}

//funcao para abrir uma div e fechar as outras listadas
function GrupoDivOculta(abrir, fechar)
{
	//quebra o array
	div_fechar = fechar.split(";");
	
	//percorre e fecha todas as divs listadas	
	for (var f in div_fechar)
	{
		document.getElementById(div_fechar[f]).style.display = "none";
	}
	
	//abre (ou fecha caso ja esteja aberta) a div em questão.
	if(document.getElementById(abrir).style.display == "block")
	{
		document.getElementById(abrir).style.display = "none";
	}
	else
	{
		document.getElementById(abrir).style.display = "block";
	}

}



//funcao para exibir ocultar níveis do menu
	var gId=0;
	var gValor='hide';

	function popMenu(pId, pValor)
	{
		// Evita ficar fricando o menu... só faz se houve mudança

		if ((gId != pId) || (gValor != pValor))
		{
			gId = pId;
			gValor = pValor;

			obj = document.getElementById(pId);

			if (obj != null)
			{
				// sobrepoeSelect(pId, pValor);

				if (obj.style)
				{
					obj=obj.style;
					pValor=(pValor=='show')?'visible':(pValor='hide')?'hidden':pValor;
				}

				obj.visibility=pValor;
			}
		}
	}

	function janela_foto(pValue, pWidth, pHeight)
	{
		var janela = window.open(pValue, "_blank", "width="+(pWidth+20)+",height="+(pHeight+25)+",scrollbars=no,status=no");
	}
