function ErgoSum_AbrirPopup(URL, Largura, Altura, Nome)
	{
	var Lar = (screen.width - Largura) / 2;
	var Alt = (screen.height - Altura) / 2;
	window.open(URL, Nome, 'width='+Largura+', height='+Altura+', top='+Alt+', left='+Lar+', toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, fullscreen=no');
	//return true;
	}
function perguntaDeletar(ID, Pergunta)
	{
	Retorno = confirm("Voce tem certeza que deseja apagar PERMANENTEMENTE:\n\n" + Pergunta );
	if(Retorno == true)
		{
		$('#apagarFormID').val(ID);
		$('#apagarForm').submit();
		}
	}
function MudaCSS(ID, Tipo)
	{
	if(Tipo == 1)
		{
		$('#' + ID).addClass('SobreTR');
		}else{
		$('#' + ID).removeClass('SobreTR');
		}
	}
function MostraEscondeStatus()
		{
		if(document.getElementById("Status").style.display == "none")
			{
			$("#Status").fadeIn();
			}else{
			$("#Status").fadeOut();
			}
		}
		
var MostraID=new Array();
function MostraEsconde(ID)
	{
	
	if(MostraID[ID] == '')
		{
		MostraID[ID] = 2;
		}
	
	ME = document.getElementById('Local_' + ID);
	NME = document.getElementById('MostraEsconde_' + ID);
	
	if(MostraID[ID] == 2)
		{
		
		NME.innerHTML = '<span class="Icone Mais">Detalhes</span>';
		ME.style.display = 'none';
		
		MostraID[ID] = 1;
		
		}else{
		
		NME.innerHTML = '<span class="Icone Menos">Detalhes</span>';
		ME.style.display = '';
		
		MostraID[ID] = 2;
		
		}
	}