// 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 = "#E2ECE5";
 document.getElementById(id).style.color = "#004000";
// document.getElementById(id).style.fontWeight = 'bold';
}

function MudaBotao(id) {
 var sSourceOriginal = document.getElementById(id).src; 

  document.getElementById(id).src = sSourceOriginal.substr(0, (sSourceOriginal.length -7) )  + "2_"+ sSourceOriginal.substr( sSourceOriginal.length - 6 );
}

function VoltaBotao(id) {
var sSourceOriginal = document.getElementById(id).src; 

  document.getElementById(id).src = sSourceOriginal.substr(0, (sSourceOriginal.length -8) ) + "_" +  sSourceOriginal.substr( sSourceOriginal.length - 6 );
}

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 Maximizar(){
  window.moveTo(0,0);
    if (document.all) {
      top.window.resizeTo(screen.availWidth,screen.availHeight);
     }
     else{
       if (document.layers||document.getElementById) {
         if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
           top.window.outerHeight = screen.availHeight;
           top.window.outerWidth = screen.availWidth;
         }
    	 }
     }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


function DoPrinting(){
  if (!window.print){
	  alert("Use o Netscape  ou Internet Explorer \n nas versões 4.0 ou superior!"); 
	  return;}
    window.print();
}

function move_i(what) { what.style.background='#FFFFCC';
                        what.style.color='#FFFFCC';}

function move_o(what) { what.style.background='#660000';
                        what.style.color='#660000';}

function move_ifont(what) { what.style.color='#660000';}
function move_ofont(what) { what.style.color='#FFFFCC';}


function retornar() { history.go(-1); }   

