
	//Abrir popup... se for com imagem pega a pagina e a imagem, se năo pega a pagina e o tamanho da popup.
	function AbrePopUp(pagina,imagem,width,height) {
		var caminho = pagina + imagem;
		if (imagem != '') {
			var janela = window.open(pagina + imagem, '_blank', 'width=20,height=20,top=20,left=20');
		}else{
			var janela = window.open(pagina, '_blank', 'width=' + width + ',height=' + height + ',top=20,left=20');
		}
		janela.focus();
	}
	//fim
	
	//Redimencioar o tamanho da popup.
	function TamanhoJanela() {
		var x = document.getElementById('img').width;      
		var y = document.getElementById('img').height;
		
		x = x + 10 
		y = y + 28
		
		window.resizeTo(x, y)    
	}
	//fim
		
	//Fechar a janela.
	function Fechar() {
		window.close();
	}
	//fim
	
	//Voltar para a pagina anterior.
	function Voltar() {
		history.back();
	}
	//fim
	
	//Focus nos campos nome,email,usuário,senha.
	function FocusCampo(valor) {
		if (valor == 'nome') {
			if (document.getElementById('Seu Nome_TXT1')){
				document.getElementById('Seu Nome_TXT1').value = '';
			}
		}
		if (valor == 'email') {
			if (document.getElementById('Seu Email_EML1')){
				document.getElementById('Seu Email_EML1').value = '';
			}
		}
		if (valor == 'email') {
			if (document.getElementById('Usuário_TXT1')){
				document.getElementById('Usuário_TXT1').value = '';
			}
		}
		if (valor == 'senha') {
			if (document.getElementById('Sua Senha_PW1')){
				document.getElementById('Sua Senha_PW1').value = '';
			}
		}
	}
	//fim
	
	//Blur nos campos nome,enail,usuário,senha.
	function BlurCampo(id,valor) {
		if (id == 'Seu Nome_TXT1') {
			if (valor == '') {
				if (document.getElementById('Seu Nome_TXT1')){
					document.getElementById('Seu Nome_TXT1').value = 'nome';
				}
			}
		}
		if (id == 'Seu Email_EML1') {
			if (valor == '') {
				if (document.getElementById('Seu Email_EML1')){
					document.getElementById('Seu Email_EML1').value = 'email';
				}
			}
		}
		if (id == 'Usuário_TXT1') {
			if (valor == '') {
				if (document.getElementById('Usuário_TXT1')){
					document.getElementById('Usuário_TXT1').value = 'email';
				}
			}
		}
		if (id == 'Sua Senha_PW1') {
			if (valor == '') {
				if (document.getElementById('Sua Senha_PW1')){
					document.getElementById('Sua Senha_PW1').value = 'senha';
				}
			}			
		}
	}
	//fim
	
	//Redireciona para pagina com parametro para busca.
	function MostraBusca(pagina,cod) {
		document.location = pagina + cod;
	}
	//fim
	
	function EsqueciSenha(pagina){
		var email = document.getElementById('E-mail_EML1').value;
		document.getElementById('ifrEditora').src = pagina + '&email=' + email;
	}
	
	function abreCatalogo(){
		window.open('editora-catalogo-imprimir.asp','POP','width=700px,height=600px,top=20px,left=20px,scrollbars = yes')
	}
	
	function ShowCursos(conteudo){
		if (conteudo != 'email'){
			if (conteudo != ''){
				document.getElementById('divnewsinteresse').style.display = '';
				document.getElementById('btoEnviarNews').style.display = 'none';
			}else{
				document.getElementById('divnewsinteresse').style.display = 'none';
				document.getElementById('btoEnviarNews').style.display = '';
			}
		}else{
			document.getElementById('divnewsinteresse').style.display = 'none';
			document.getElementById('btoEnviarNews').style.display = '';
		}
	}
	