function validasenha(formsenha){
if (formsenha.senha.value != "123"){
alert("Senha incorreta!Para ter acesso à página com o conteúdo programático completo, solicite sua senha pelo email lufe@lufeherlinger.com ou pelo formulário de contato!");
formsenha.senha.focus();
return(false);
}
else{
window.close('janelasenha');
window.open('conteudocomp.html','_parent', "width=320, height=450, scrollbars=no left=350 top=200 status=no ");
}
return(true);
}
//Desativa botão direito
function clickIE() {
if (document.all) {
return false;
}
} 
function clickNS(e) {
if (document.layers||(document.getElementById&&!document.all)) { 
if (e.which==2||e.which==3) {
return false;
}
}
} 
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS;
} 
else{
document.onmouseup=clickNS;
document.oncontextmenu=clickIE;
} 
document.oncontextmenu=new Function("return false") 

//Mensagem na barra de status
var texto = " Bem vindo ao site do músico e publicitário Lufe Herlinger!!  ";
	var parada = 150;
	var contador = 1;

function textopassando(){
	var tamanhoMaximo;
	tamanhoMaximo = texto.length.all;
	window.status = texto;
	contador++;
	texto = texto.substring (1,texto.length) + texto.substring (0,1);
	if(contador>=tamanhoMaximo){
		window.status = ' ';
		return; 	   
	}else{

	setTimeout("textopassando()", 150); 
	}
}
	
//mede o tamanho do monitor INDEX
function maximize(){
	var largura;
	var altura;
	window.moveTo(0,0);
	window.resizeTo(screen.availWidth, screen.availHeight);
	largura = screen.width; 
	altura = screen.height; 
	if(largura>=1024){
	window.open("home1.html", "_self");
	}
	else
	window.open("800/home2.html", "_self");
}

//mede tamanho da tela APRESENTAÇÃO
function maximizeap(){
	
	var largura;
	var altura;
	window.moveTo(0,0);
	window.resizeTo(screen.availWidth, screen.availHeight);
	largura = screen.width; 
	altura = screen.height; 
	if(largura>=1024){
	window.open("apresentacao1.html", "_self");
	}
	else
	window.open("../800/biografia/apresentacao2.html", "_self");
}

//mede tamanho da tela CONTATO
function maximizecont(){
	
	var largura;
	var altura;
	window.moveTo(0,0);
	window.resizeTo(screen.availWidth, screen.availHeight);
	largura = screen.width; 
	altura = screen.height; 
	if(largura>=1024){
	window.open("contato1.html", "_self");
	}
	else
	window.open("../800/contato/contato2.html", "_self");
}

//mede tamanho da tela LOCAL E ESTRUTURA
function maximizelocal(){
	
	var largura;
	var altura;
	window.moveTo(0,0);
	window.resizeTo(screen.availWidth, screen.availHeight);
	largura = screen.width; 
	altura = screen.height; 
	if(largura>=1024){
	window.open("localestrut1.html", "_self");
	}
	else
	window.open("../800/estudio/localestrut2.html", "_self");
}

//mede tamanho da tela CONTEÚDO AULAS
function maximizecontaulas(){
	
	var largura;
	var altura;
	window.moveTo(0,0);
	window.resizeTo(screen.availWidth, screen.availHeight);
	largura = screen.width; 
	altura = screen.height; 
	if(largura>=1024){
	window.open("conteudoaulas1.html", "_self");
	}
	else
	window.open("../800/estudio/conteudoaulas2.html", "_self");
}

//mede tamanho da tela ENVIADO
function maximizeenv(){
	
	var largura;
	var altura;
	window.moveTo(0,0);
	window.resizeTo(screen.availWidth, screen.availHeight);
	largura = screen.width; 
	altura = screen.height; 
	if(largura>=1024){
	window.open("enviado1.html", "_self");
	}
	else
	window.open("../800/contato/enviado2.html", "_self");
}

//mede tamanho da tela GALERIA ALUNOS
function maximizegalerialun(){
	
	var largura;
	var altura;
	window.moveTo(0,0);
	window.resizeTo(screen.availWidth, screen.availHeight);
	largura = screen.width; 
	altura = screen.height; 
	if(largura>=1024){
	window.open("../salasom/galerialun1.html", "_self");
	}
	else
	window.open("../800/salasom/galerialun2.html", "_self");
}

//mede tamanho da tela GRAVACOES
function maximizegravacoes(){
	
	var largura;
	var altura;
	window.moveTo(0,0);
	window.resizeTo(screen.availWidth, screen.availHeight);
	largura = screen.width; 
	altura = screen.height; 
	if(largura>=1024){
	window.open("gravacoes1.html", "_self");
	}
	else
	window.open("../800/salasom/gravacoes2.html", "_self");
}
//mede tamanho da tela MATERIAL
function maximizematerial(){
	
	var largura;
	var altura;
	window.moveTo(0,0);
	window.resizeTo(screen.availWidth, screen.availHeight);
	largura = screen.width; 
	altura = screen.height; 
	if(largura>=1024){
	window.open("material1.html", "_self");
	}
	else
	window.open("../800/estudio/material2.html", "_self");
}
//mede tamanho da tela CONTEÚDO COMPLETO
function maximizeconteudocomp(){
	
	var largura;
	var altura;
	window.moveTo(0,0);
	window.resizeTo(screen.availWidth, screen.availHeight);
	largura = screen.width; 
	altura = screen.height; 
	if(largura>=1024){
	window.open("conteudocomp1.html", "_self");
	}
	else
	window.open("../800/estudio/conteudocomp2.html", "_self");
}

//mede tamanho da tela EQUIPAMENTOS 
function maximizeequipamentos(){
	
	var largura;
	var altura;
	window.moveTo(0,0);
	window.resizeTo(screen.availWidth, screen.availHeight);
	largura = screen.width; 
	altura = screen.height; 
	if(largura>=1024){
	window.open("equipamentos1.html", "_self");
	}
	else
	window.open("../800/equipamentos/equipamentos2.html", "_self");
}

//mede tamanho da tela MATERIAL DIDÁTICO 
function maximizematdid(){
	
	var largura;
	var altura;
	window.moveTo(0,0);
	window.resizeTo(screen.availWidth, screen.availHeight);
	largura = screen.width; 
	altura = screen.height; 
	if(largura>=1024){
	window.open("matdid1.html", "_self");
	}
	else
	window.open("../800/biblioteca/matdid2.html", "_self");
}

//mede tamanho da tela MATBIBLIO 
function maximizematbiblio(){
	
	var largura;
	var altura;
	window.moveTo(0,0);
	window.resizeTo(screen.availWidth, screen.availHeight);
	largura = screen.width; 
	altura = screen.height; 
	if(largura>=1024){
	window.open("matbiblio1.html", "_self");
	}
	else
	window.open("../800/biblioteca/matbiblio2.html", "_self");
}


//valida formulario CONTATO
function checa_contato(senddata){
	if (senddata.assunto.value == ""){
		alert("Preencha um assunto!");
		senddata.assunto.focus();
		return (false);
	}
	if(senddata.nome.value == ""){
		alert ("Por favor, digite seu nome!");
		senddata.nome.focus();
		return (false);
	}
	if (senddata.email.value == ""){
		alert("O campo " + senddata.email.name + " deve ser preenchido!");
		senddata.email.focus();
		return false;
		}
		parte1 = senddata.email.value.indexOf("@");
		parte2 = senddata.email.value.indexOf(".");
		parte3 = senddata.email.value.length;
	if (!(parte1 >= 3 && parte2 >= 6 && parte3 >= 9)) {
		alert("O campo " + senddata.email.name + " deve ser conter um endereço eletrônico!");
		senddata.email.focus();
		return (false);
	}
	if (senddata.cidade.value == ""){
		alert ("O campo "+ senddata.cidade.name + " deve ser preenchido!");
		senddata.cidade.focus();
		return (false);
	}
	if (senddata.uf.value == "selecione"){
		alert ("Selecione seu estado!");
		senddata.uf.focus();
		return (false);
	}
	if ((senddata.textodamensagem.value == "Digite sua mensagem aqui") || (senddata.textodamensagem.value == "")){
		alert ("Digite sua mensagem!");
		senddata.textodamensagem.focus();
		return (false);
	}
	return (true);
}

