function AbreJanelaGaleria(URL) {
  var width = 900;
  var height = 650;
  var left = 50;
  var top = 10
  window.open(URL, 'ema3', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=no, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');
}

function AbreJanelaEnsaio(URL) {
  var width = 555;
  var height = 395;
  var left = 50;
  var top = 10
  window.open(URL, 'ensaio', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=no, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');
}

function AbreAlbum(URL) {
  var width = 550;
  var height = 355;
  var left = 50;
  var top = 10
  window.open(URL, 'Album', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=no, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');
}

function EnviaFotoAlbum(URL) {
  var width = 460;
  var height = 229;
  var left = 50;
  var top = 10
  window.open(URL, 'EnviaFotoAlbum', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=no, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');
}

function indica(url) {
  window.open(url,'indica','width=438, height=220, top=12, left=15, scrollbars=no, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no')
}

function Comprar(url) {
  window.open(url,'comprar','width=535, height=230, top=12, left=15, scrollbars=no, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no')
}

function AddAlbum(url) {
  window.open(url,'addalbum','width=535, height=218, top=12, left=15, scrollbars=no, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no')
}

function cores(url) {
  window.open(url,'cores','width=225, height=169, top=10, left=10, scrollbars=no, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no')
}

function Amplia(url) {
  window.open(url,'amplia','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}

function AbreCartoon(url) {
  window.open(url,'cartoon','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=25,height=25,screenX=150,screenY=150,top=15,left=15')
}

function AbreFotoMural(url) {
  window.open(url,'muralfotos','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}

function AbreFotoAgenda(url) {
  window.open(url,'fotoagenda','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}

function fotos_noticias(url) {
  window.open(url,'popupImageWindow','width=400, height=300, screenX=0, screenY=0, top=150, left=20, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no')
}

function AbreAudio(URL) {
  var width = 300;
  var height = 195;
  var left = 50;
  var top = 10
  window.open(URL, 'audio', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=no, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');
}

function fotos_produtos(url) {
  window.open(url,'fotos_produtos','width=400, height=300, screenX=0, screenY=0, top=150, left=20, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no')
}

function RedimensionaIframe() {
	 var IFR = document.getElementById('vereadores');	
	IFR.style.height = (IFR.contentWindow)?
	IFR.contentWindow.document.body.scrollHeight:
	document.frames['vereadores'].document.body.scrollHeight;		
}

// FUNCAO SELEIONA TODOS REGISTROS PRA EXCLUIR
cont321 = 0;
function SelectAll() { 
   for (var i=0;i<document.FORMLISTA.elements.length;i++) {
     var x = document.FORMLISTA.elements[i];
     if (x.id == 'check_sel') { 
	   if (cont321 == 0)
         x.checked = true;
       else
         x.checked = false;	   
     } 
   }
   if (cont321 == 0)
   {    
     var elem = document.getElementById("sel_todos");
     elem.value = "Desmarcar todos";
     cont321 = 1;
   } 
   else 
   {
     var elem = document.getElementById("sel_todos");
     elem.value = "Selecionar todos";
     cont321 = 0;
   }  
}

// FUNCAO SELEIONA TODOS REGISTROS PRA EXCLUIR
function checkdeletetion(){
   if (!confirm("Você realmente deseja deletar este registro.") == false )
   FORMLISTA.submit();
}


function confirmaBloqueio(aURL) {
	if(confirm('Você tem certeza disso?')) {
	location.href = aURL;
	}
}


function AbreLei(URL) {
  var width = 550;
  var height = 355;
  var left = 50;
  var top = 10
  window.open(URL, 'Lei', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=yes, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');
}
