// JavaScript Document


		function janelaModal(url,width,height,titulo){
			var index= 0;
			var contentWin = null;
			var win = new Window('jnl'+url,
			{className: "alphacube", title: titulo ,top:100, left:100,
			width:width, height:height, opacity:1, resizable: false, maximizable: false, minimizable: false})
			win.setURL(url);
			win.showCenter(true);
			win.setDestroyOnClose();	
		}
	function openAlertDialog() {
		Dialog.alert("Test of alert panel, check out debug window after closing it", 
				        {windowParameters: {width:300, height:100}, okLabel: "close", 
						    ok:function(win) {debug("validate alert panel"); return true}
						    });
	}
	
	
	
		function Impressao( preVisualizar ) 
{
	var CorpoMensagem = document.getElementById('ImprimirConteudo').innerHTML;
	document.body.innerHTML = CorpoMensagem;
	if( preVisualizar ) 
	{
		PreVisualizar();
	} 
	else 
	{
		window.print();
		window.refresh();
	}
	document.body.innerHTML = CorpoMensagem;
}

function PreVisualizar() 
{
	try 
	{
		
		/*  WebBrowser1.ExecWB( i, 1 ); values para i : 
		
		* 6 - print 
		* 7 - print preview 
		* 8 - page setup (for printing) 
		* 1 - open window 
		* 4 - Save As 
		* 10 - properties 
		*/ 

		 //Utilizando o componente WebBrowser1 registrado no MS Windows Server 2000/2003 ou XP/Vista
		 var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH="400px" HEIGHT="500px" CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>'; 
		 document.body.insertAdjacentHTML('beforeEnd', WebBrowser); 
		 WebBrowser1.ExecWB( 7, 1 ); 
		 WebBrowser1.outerHTML = ""; 
	} 
	catch(e) 
	{
		alert("Para visualizar a impressão você precisa habilitar o uso de controles ActiveX na página.");
		return;
	}
}



// Início do código de Aumentar/ Diminuir a letra
 
// Para usar coloque o comando: "javascript:mudaTamanho('tag_ou_id_alvo', -1);" para diminuir
// e o comando "javascript:mudaTamanho('tag_ou_id_alvo', +1);" para aumentar
 
var tagAlvo = new Array('p'); //pega todas as tags p//
 
// Especificando os possíveis tamanhos de fontes, poderia ser: x-small, small...
var tamanhos = new Array( '10pt','11pt','12pt');
var tamanhoInicial = 0;
	function mudaTamanho( idAlvo,acao ){
  if (!document.getElementById) return
  var selecionados = null,tamanho = tamanhoInicial,i,j,tagsAlvo;
  tamanho += acao;
  if ( tamanho < 0 ) tamanho = 0;
  if ( tamanho > 6 ) tamanho = 6;
  tamanhoInicial = tamanho;
  if ( !( selecionados = document.getElementById( idAlvo ) ) ) 
         selecionados = document.getElementsByTagName( idAlvo )[ 0 ];
  
  selecionados.style.fontSize = tamanhos[ tamanho ];
  
  for ( i = 0; i < tagAlvo.length; i++ ){
    tagsAlvo = selecionados.getElementsByTagName( tagAlvo[ i ] );
    for ( j = 0; j < tagsAlvo.length; j++ ) tagsAlvo[ j ].style.fontSize = tamanhos[ tamanho ];
  }
}

	function popUpCursoDireitoObrigacoes(){
		window.open('teste.php','ESNOR','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=600,height=800');  

	}


// Função que fecha o pop-up ao clicar no link fechar
function fechar(){
document.getElementById('popup').style.display = 'none';
}
// Aqui definimos o tempo para fechar o pop-up
function abrir(){
document.getElementById('popup').style.display = 'block';
setTimeout ("fechar()", 50000);
}
