function verAyuda(url) {
 	msgWindow=window.open(url,"AYUDA","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=530,height=450");
}

function verCon(url) {
 	msgWindow=window.open(url,"CON","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=530,height=550");
}

function opencal(url)
{
    var ancho=200; var alto=250;
    var posX= 100;
    var posY= 200;
    props= "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=0,copyhistory=0,width="+ancho+",height="+alto+",left=" +posX+ ",top=" +posY;
    nuevaventana = window.open(url,'CALENDARIO',props);
}
function abrirventana(url)
{
    var ancho=700; var alto=450;
    var posX= (screen.width-ancho)/2;
    var posY= (screen.height-(alto+70))/2;
    props= "toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=no,resizable=1,copyhistory=0,width="+ancho+",height="+alto+",left=" +posX+ ",top=" +posY;
    nuevaventana = window.open(url,'VENTANA',props);
}
function abrircoimbra(url)
{
    var ancho=700; var alto=450;
    var posX= (screen.width-ancho)/2;
    var posY= (screen.height-(alto+70))/2;
    props= "toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,copyhistory=0,width="+ancho+",height="+alto+",left=" +posX+ ",top=" +posY;
    nuevaventana = window.open(url,'VENTANA',props);
}

function Todas() {
var checkboxes = document.formulario;
	for (var x=0; x < checkboxes.length; x++) {
		if (!checkboxes[x].checked) {
			checkboxes[x].checked = true;
			checkboxes[x].className = "selbd"
		} else if (checkboxes[x].checked) {
			checkboxes[x].checked = false;
			checkboxes[x].className = "unselbd"
		}

	}
LE(checkboxes);
}

function verPdf(url) {
 	msgWindow=window.open(url,"Colectaneas","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=400");

}
var ActualFecha 	= new Date();
var nombredialargo 	= new Array("Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado");
var mesestexto 		= new Array( "Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro" );
function phoje (){
	document.write(ActualFecha.getDate() +" de "+mesestexto[ActualFecha.getMonth()] + " de " + ActualFecha.getFullYear() + " " );
}
function NomeDia (){
	document.write("<a href='index.html' target='_top' class=fechoje>"+nombredialargo[ActualFecha.getDay()] +"<br>" +  ActualFecha.getDate() +" de "+mesestexto[ActualFecha.getMonth()] + " de " + ActualFecha.getFullYear() + "</a>" );
}
function MenLatIni (){
   	document.write('<div class="b1">');
   	document.write('<br><a href="javascript:abrirventana(\'buzon.html\')"><img src="images/clique.gif" border="0" width="100" height="50" hspace="10"></a>');
   	document.write('</div>');
   	document.write('<br><a href="javascript:abrirventana(\'ajuda.html\')"    class="MenLat"> <img src="images/li2.gif" border="0" width="5" height="5" hspace="10">Créditos</a>');
   	document.write('<br><a href="javascript:abrirventana(\'ajuda.html\')"    class="MenLat"> <img src="images/li2.gif" border="0" width="5" height="5" hspace="10">Ajuda </a>');
   	document.write('<br><a href="javascript:abrirventana(\'buzon.html\')"    class="MenLat"> <img src="images/li2.gif" border="0" width="5" height="5" hspace="10">Apoio ao Cliente</a>');
}
function MenLatBD (){
   	document.write('<br><a href="javascript:abrirventana(\'ajuda.html\')"    class="MenLat"> <img src="images/li2.gif" border="0" width="5" height="5" hspace="10">Créditos</a>');
   	document.write('<br><a href="javascript:abrirventana(\'ajuda.html\')"    class="MenLat"> <img src="images/li2.gif" border="0" width="5" height="5" hspace="10">Ajuda </a>');
   	document.write('<br><a href="javascript:abrirventana(\'buzon.html\')"    class="MenLat"> <img src="images/li2.gif" border="0" width="5" height="5" hspace="10">Apoio ao Cliente</a>');
}
function externo(url){
	window.parent.document.getElementById('fbuscador').src = 'buscador_externo.html';
	window.parent.document.getElementById('texto').src = url;
}
function busca_vacio(url){
	window.parent.document.getElementById('fbuscador').src = 'buscainicio.html';
	window.parent.document.getElementById('texto').src = url;
}
function verDCO(url){
			top.document.texto.navega.location = 'navegacoddoc.html';
			top.document.texto.resultados.location = 'buscador.html';
			top.document.texto.TXT.location = url;
}


function verCOD(url){
	top.document.getElementById('ISIS').src = 'isis_blanco.html';

	if (url == "labo") {

			top.document.texto.navega.location = 'navegacodl.html';
			top.document.texto.resultados.location = 'buscador.html';
			top.document.texto.TXT.location = "tdc_"+url+".html";
	}
	if (url == "civi") {

			top.document.texto.navega.location = 'navegacodc.html';
			top.document.texto.resultados.location = 'buscador.html';
			top.document.texto.TXT.location = "tdc_"+url+".html";
	}
	if (url == "pena") {

			top.document.texto.navega.location = 'navegacodp.html';
			top.document.texto.resultados.location = 'buscador.html';
			top.document.texto.TXT.location = "tdc_"+url+".html";
	}
	if (url == "advo") {

			top.document.texto.navega.location = 'navegacoda.html';
			top.document.texto.resultados.location = 'buscador.html';
			top.document.texto.TXT.location = "tdc_"+url+".html";
	}

}

function verDFO(url){
			top.document.texto.navega.location = 'navegafordoc.html';
			top.document.texto.resultados.location = 'buscador.html';
			top.document.texto.TXT.location = url;
}

function verFOR(url){
	top.document.getElementById('ISIS').src = 'isis_blanco.html';
	if (url == "labo") {
			top.document.texto.navega.location = 'navegaforl.html';
			top.document.texto.resultados.location = 'buscador.html';
			top.document.texto.TXT.location = "tdc_"+url+"_f.html";
	}
	if (url == "civi") {

			top.document.texto.navega.location = 'navegaforc.html';
			top.document.texto.resultados.location = 'buscador.html';
			top.document.texto.TXT.location = "tdc_"+url+"_f.html";
	}
	if (url == "pena") {

			top.document.texto.navega.location = 'navegaforp.html';
			top.document.texto.resultados.location = 'buscador.html';
			top.document.texto.TXT.location = "tdc_"+url+"_f.html";
	}
	if (url == "advo") {

			top.document.texto.navega.location = 'navegafora.html';
			top.document.texto.resultados.location = 'buscador.html';
			top.document.texto.TXT.location = "tdc_"+url+"_f.html";
	}

}


function verdoc(url){
//  		var clave1 =  top.document.usuario.user.value;
//  		var clave2 =  top.document.usuario.pass.value;

//  		if ( (clave1 =="") || (clave2 =="")) {
//  			verAyuda('login.html');
//  		} else {
			top.document.texto.navega.location = 'navegadoc.html';
			top.document.texto.resultados.location = 'buscador.html';
			top.document.texto.TXT.location = url;
//		}
}
function verVacio(url){
	window.parent.document.getElementById('ISIS').src = 'isis_blanco.html';
	window.parent.document.getElementById('texto').src = url;
}
function verSELBD(url){
	window.parent.document.getElementById('ISIS').src = 'isis_blanco.html';
	window.parent.document.getElementById('texto').src = url;
}
function verUNIVERSAL(url){
	window.parent.document.getElementById('ISIS').src = 'isis_blanco.html';
	window.parent.document.getElementById('texto').src = url;
}
function verUNIVERSAL_a(url){
	window.parent.document.getElementById('ISIS').src = 'isis_blanco.html';
	window.parent.document.getElementById('texto').src = url;
}



function LE(form) {
	if  ((form.Civi.checked == false) & (form.Labo.checked == false) & (form.Pena.checked == false) & (form.Admo.checked == false)) {
		 alert('Selecione as bases de dados antes de preencher a pesquisa dos campos'	);
			Todas();
			window.document.getElementById('COMUN').style.display="block";
			window.document.getElementById('VJUR').style.display="none";
	} else  if ((form.Civi.checked == true) || (form.Labo.checked == true) || (form.Pena.checked == true) || (form.Admo.checked == true)){
			window.document.getElementById('COMUN').style.display="block";
			window.document.getElementById('VJUR').style.display="none";
	}
}


function abrir_pop(URL){

		window.open(URL,"ventana1","width=400, height=350, scrollbars=no, menubar=no, location=no, resizable=no");


	}

