// Created with MAX's HTML Beauty++ 2004

function AbreJanela(destino,x,y,prt1) {
 var prt = prt1.split(",");
 var prt2 = 'width='+x+', height='+y+', toolbar='+prt[0]+',directories='+prt[1]+',status='+prt[2]+',location='+prt[3]+', menubar='+prt[4]+', resizable='+prt[4]+', scrollbars='+prt[5];
 var janela = window.open(destino,'',prt2);
 if (janela === false) { window.alert("Este site utiliza popups!\nPor favor desabilite seu bloqueador de popups e tente novamente!"); }
}

function Foco(id) { document.getElementById(id).focus(); }

function Mascara() { 
 var objeto = document.getElementById("edCodValidacao");
 if (objeto.value.indexOf("-") == -1 && objeto.value.length > 7){ objeto.value = ""; }
 if (objeto.value.length == 7){ objeto.value += "-"; }
}

function Sel(id) {
 document.getElementById(id).style.background = "#F2F2F2"; /*E2ECE5*/
 document.getElementById(id).style.color = "#004000";
// document.getElementById(id).style.fontWeight = 'bold';
}

function MudaBotao(id, source) {
 document.getElementById(id).src = source;
}

function VoltaBotao(id, source) {
 document.getElementById(id).src = source;
}

function Normal(id) {
 document.getElementById(id).style.background = "";
 document.getElementById(id).style.color = "#000000";
 document.getElementById(id).style.fontWeight = 'normal'; 
 
}

function fechar(){
  window.close();
}

function DoPrinting(){
  if (!window.print){
	  alert("Use o Netscape  ou Internet Explorer \n nas versões 4.0 ou superior!"); 
	  return;}
  window.print();
}

function PrintElementID(id, pg, atos) {
	
	var oPrint, oJan;
	oPrint = window.document.getElementById(id).innerHTML;
	oJan = window.open(pg);
	oJan.document.body = oPrint;
	//oJan.document.write(oPrint);
	
	oJan.document.title = 'Impressão do resultado da pesquisa';
  	oJan.window.print();
    oJan.document.close();
    oJan.focus();
}
