
/* Abre uma janela o e-Cint */
function resize_iframe(){
	document.getElementById("ifrmCentral").height=null // required for Moz bug, value can be "", null, or integer
	document.getElementById("ifrmCentral").height=window.frames["ifrmCentral"].document.body.scrollHeight+20;
}

function AbreeCint() {
	window.open('http://www.trf1.jus.br/ecint/','popup','width=1024px,height=768px,scrolling=auto,scrollbars=yes,maximized=yes,resizable=yes');
}

function atualizalink(texto) {
	parent.document.getElementById('txtlink').innerHTML=texto;
}

function AbreDocPlantao(nome)	{		
	var w = screen.availWidth -12 ; 
	var h = screen.availHeight - 50; 			
	local = "/docs/plantao/" + nome;
	var Jan = window.open(local,'','top=0,left=0,width='+w+',height='+h+',toolbar=no,location=yes,status=no,menubar=no,scrollbars=no,resizable=yes');
}

	function mudaCorIn(obj) {
		obj.style.background = "#E9E9E9";
	}
	function mudaCorOut(obj) {
		obj.style.background = "#FFF";	
	}

function AbreDocumento(nome)	{		
	var w = screen.availWidth -12 ; 
	var h = screen.availHeight - 50; 			
	local = "/docs/" + nome;
	var Jan = window.open(local,'','top=0,left=0,width='+w+',height='+h+',toolbar=no,location=yes,status=no,menubar=no,scrollbars=no,resizable=yes');
}

function AbreDocTRF(nome)	{		
	var w = screen.availWidth -12 ; 
	var h = screen.availHeight - 50; 			
	local = "http://www.trf1.jus.br/Consulta/DocOficial/DocOficialAbrePdf.php?numeroenvia=" + nome;
	var Jan = window.open(local,'','top=0,left=0,width='+w+',height='+h+',toolbar=no,location=yes,status=no,menubar=no,scrollbars=no,resizable=yes');
}

function AbrePubTRF(arq) {
	local = "http://www.jfpa.jus.br/objetos/abrePublicacaoTRF.php?arquivo="+arq;
	var Jan = window.open(local,'','top=0,left=0,width=0,height=0,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no');
}

/*
**  Pega dados da Licitação no Comprasnet 
*/

   function Dados_Ata(tpPregao, numPregao){	
	  	  var codUasg = '90003';
		  var url
		  if (tpPregao == 'E') {		
			  url = "http://www.comprasnet.gov.br/livre/pregao/ata2.asp?co_no_uasg=090003&numprp="+numPregao+
					"&f_lstSrp=S&f_Uf=&f_numPrp="+numPregao
					+"&f_codUasg=090003&f_tpPregao=E&f_lstICMS=T"
					+"&f_dtAberturaIni=&f_dtAberturaFim=";
		  }		
		  else {		
			  url = "http://www.comprasnet.gov.br/livre/pregao/ataPres.asp?coduasg="+codUasg+"&numprp="+numPregao+
					"&f_lstSrp=S&f_Uf=&f_numPrp="+numPregao
					+"&f_codUasg=090003&f_tpPregao=E"
					+"&f_dtAberturaIni=&f_dtAberturaFim=";
		  }
		  window.top.location.href = url;	
		  return false;
	}

	function DadosPregaoComprasnet(pCod, pTp) {
		switch (pTp) {
			case "PE": pTp=5; break;
			case "CC": pTp=3; break;
			case "CV": pTp=1; break;			
			default  : pTp=5;
		}
		var url = "http://www.comprasnet.gov.br/ConsultaLicitacoes/download/download_editais_detalhe.asp?coduasg=90003&modprp="+pTp+"&numprp="+pCod	
		window.open(url, 'DadosPregao', 'maximized=yes, screenX=250, screenY=0, toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=750,height=500');
		return false;
	}


