function AumentarFonte(elemento) {
    switch (elemento.style.fontSize) {
        case '11px': {
            elemento.style.fontSize = '12px';
            break;
            }
        case '12px': {
            elemento.style.fontSize = '13px';
            break;
            }
        case '13px': {
            elemento.style.fontSize = '14px';
            break;
            }
        case '14px': {
            elemento.style.fontSize = '15px';
            break;
            }
        default: {
            if (elemento.style.fontSize != '15px') {
				elemento.style.fontSize = '12px';
			}
            break;
            }
    }
}

function DiminuirFonte(elemento) {
    switch (elemento.style.fontSize) {
        case '15px': {
            elemento.style.fontSize = '14px';
            break;
            }
        case '14px': {
            elemento.style.fontSize = '13px';
            break;
            }
        case '13px': {
            elemento.style.fontSize = '12px';
            break;
            }
        case '12px': {
            elemento.style.fontSize = '11px';
            break;
            }
        default: {
            elemento.style.fontSize = '11px';
            break;
            }
    }
}

function abre_enviarmateria(sURL){
newwindow=open(sURL,"materia","scrollbars=no,toolbar=no,directories=no,menubar=no,resizable=no,status=no,width=250,height=295, top=150, left=150");

}


function abre_encontro(sURL){
newwindow=open(sURL,"materia","scrollbars=no,toolbar=no,directories=no,menubar=no,resizable=no,status=no,width=325,height=390, top=150, left=150");

}
window.defaultStatus = "M9 Web Design®"
function abre_tempo(sURL){
newwindow=open(sURL,"tempo","scrollbars=no,toolbar=no,directories=no,menubar=no,resizable=no,status=no,width=780,height=470, top=150, left=5");

}

function abre_promocao(sURL){
newwindow=open(sURL,"promocao","scrollbars=no,toolbar=no,directories=no,menubar=no,resizable=no,status=no,width=250,height=220, top=150, left=150");

}

function abre_marcas(sURL){
newwindow=open(sURL,"micareta","scrollbars=yes,toolbar=no,directories=no,menubar=no,resizable=no,status=no,width=450,height=350, top=20, left=15");

}

function abre_fotos_festival(sURL){
newwindow=open(sURL,"micareta","scrollbars=yes,toolbar=no,directories=no,menubar=no,resizable=no,status=no,width=755,height=400, top=20, left=15");


}
function abre_programacao(sURL){
newwindow=open(sURL,"micareta","scrollbars=yes,toolbar=no,directories=no,menubar=no,resizable=no,status=no,width=350,height=400, top=20, left=15");

}


function abre_fotos(sURL){
newwindow=open(sURL,"fotos","scrollbars=no,toolbar=no,directories=no,menubar=no,resizable=no,status=no,width=755,height=400, top=20, left=15");

}

function abre_micareta(sURL){
newwindow=open(sURL,"micareta","scrollbars=yes,toolbar=no,directories=no,menubar=no,resizable=no,status=no,width=266,height=300, top=150, left=150");
}

function abre_diadasmaes(sURL){
newwindow=open(sURL,"diadasmaes","scrollbars=yes,toolbar=no,directories=no,menubar=no,resizable=no,status=no,width=266,height=300, top=150, left=150");
}

function abre_referendo(sURL){
newwindow=open(sURL,"referendo","scrollbars=yes,toolbar=no,directories=no,menubar=no,resizable=no,status=no,width=350,height=300, top=150, left=150");
}
function abre_especialnatal(sURL){
newwindow=open(sURL,"referendo","scrollbars=yes,toolbar=no,directories=no,menubar=no,resizable=no,status=no,width=350,height=300, top=150, left=150");
}


function abre_bento_fotos(sURL){
newwindow=open(sURL,"bentofotos","scrollbars=no,toolbar=no,directories=no,menubar=no,resizable=no,status=no,width=755,height=400, top=20, left=15");

}

function abre_bento(sURL){
newwindow=open(sURL,"bento","scrollbars=yes,toolbar=no,directories=no,menubar=no,resizable=no,status=no,width=417,height=450, top=50, left=50");

}

function abre_especial(sURL){
newwindow=open(sURL,"diadasmaes","scrollbars=yes,toolbar=no,directories=no,menubar=no,resizable=no,status=no,width=266,height=300, top=150, left=150");

}

// CHECA CADASTRO USUÁRIO
function cadastro_usuario() {
    var a = document.cadastro;
    if (!a.email.value.indexOf('@', 0) == -1 ||
	a.email.value.indexOf('.', 0) == -1)
		 {
        window.alert('Você não preencheu seu e-mail corretamente!');
        return false;		
        }
		
    if (!a.senha.value) {
        window.alert('Você não preencheu o sua senha!');
        return false;
    }
	
	if (!a.csenha.value) {
        window.alert('Você não confirmou sua senha!');
        return false;
    }
	
	if (!a.nome.value) {
        window.alert('Você não digitou seu nome!');
        return false;
    }
	
	if (!a.sobrenome.value) {
        window.alert('Você não digitou seu sobrenome!');
        return false;
    }
	
	if (!a.fone.value) {
        window.alert('Você não digitou seu telefone!');
        return false;
    }
	
	if (!a.rg.value) {
        window.alert('Você não digitou seu RG!');
        return false;
    }
    	
	return true;
}

// CHECA LEMBRAR SENHA
function lembrar_senha() {
    var a = document.lembrar;
    if (!a.email.value.indexOf('@', 0) == -1 ||
	a.email.value.indexOf('.', 0) == -1)
		 {
        window.alert('Você não preencheu seu e-mail corretamente!');
        return false;		
        }
	   	
	return true;
}

// PARTICIPAR DA PROMOÇÃO
function participar_promocao() {
    var a = document.participar;
    if (!a.email.value.indexOf('@', 0) == -1 ||
	a.email.value.indexOf('.', 0) == -1)
		 {
        window.alert('Você não preencheu seu e-mail corretamente!');
        return false;		
        }
		
    if (!a.senha.value) {
        window.alert('Você não digitou sua senha!');
        return false;
    }
		   	
	return true;
}


function alterna() {
  window.open("/"+document.franquia.dir.value,'','width=950,height=650');
}
function Abre_Album(Cod) {
  window.open("album/index.asp?cod="+Cod,'','width=950,height=650');
}
function Abre_Albumpessoal(Cod) {
  window.open("album/indexpessoal.asp?cod="+Cod,'','width=900,height=600');
}

function Editar_Dadospessoais(Cod) {
  window.open("album/editardadospessoais.asp?cod="+Cod,'','width=450,height=300');
}

function Editar_Albumpessoal(Cod) {
  window.open("album/removerfotosdoalbum.asp?cod="+Cod,'','width=550,height=530');
}


function Coberturas(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function Senha() { //v2.0
  window.open('lembrete.asp','Lembrete','scrollbars=yes,resizable=yes,width=400,height=200');
}

function TestaCadastro(){
		f = document.cadastro;
		if (f.nome.value == ""){
		alert("É necessário o preenchimento do nome.");
		f.nome.focus();
		return false;
		}
		parte1 = f.email.value.indexOf("@");
		parte2 = f.email.value.indexOf(".");
		parte3 = f.email.value.length;
		if (!(parte1 >= 3 && parte2 >= 6 && parte3 >= 9)) {
			alert("O campo E-mail deve conter um endereco eletronico!");
			f.email.focus();
			return false;
		}
				if (f.telefone.value == ""){
		alert("É necessário o preenchimento do nº do telefone.");
		f.telefone.focus();
		return false;
		}
		if (f.apelido.value == ""){
		alert("É necessário o preenchimento do apelido.");
		f.apelido.focus();
		return false;
		}
		if (f.dia.value == ""){
		alert("Digite o Dia do seu nascimento.");
		f.dia.focus();
		return false;
		}
		if (f.mes.value == ""){
		alert("Digite o mês do seu nascimento.");
		f.mes.focus();
		return false;
		}
		if (f.ano.value == ""){
		alert("Digite o ano do seu nascimento.");
		f.ano.focus();
		return false;
		}
		if (f.senha.value == ""){
		alert("Coloque uma senha");
		f.senha.focus();
		return false;
		}
		if (f.senhateste.value == ""){
		alert("Confirme a senha");
		f.senhateste.focus();
		return false;
		}
		if (!(f.senha.value == f.senhateste.value)){
		alert("As senhas não conferem!");
		f.senhateste.focus();
		return false;
		}
	return true;
}
