// JavaScript Document

function Mostra(Opcao){
	for(i=1; i<=38;i++){
		textoLink = "Quadro" + i;

		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraVestibular(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraTransferencia(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro1" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraPortadordodiploma(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraProuni(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraLaboratorio(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraMEC(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraComochegar(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraEnade(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraManual(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}


function MostraPos(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraEGCB(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE2(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE3(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE4(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE5(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE6(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE7(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE8(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE9(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE10(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE11(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE12(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE13(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE14(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE15(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE16(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE17(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}
function MostraENADE18(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE19(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE20(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE21(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE22(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE23(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE24(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE25(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE26(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE27(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE28(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE29(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function MostraENADE30(Opcao){
	for(i=1; i<=2;i++){
		textoLink = "Quadro" + i;
		if (textoLink == Opcao){
				document.getElementById(Opcao).style.display = 'block';
		}else{
			document.getElementById(textoLink).style.display = 'none';
		}
	}
}

function Desaparece(Opcao){
	document.getElementById(Opcao).style.display = 'none';
}

function FecharJanela(){
	window.close();
}

function AbreCursos(Pagina){
	window.open(Pagina,'','width=810,height=600,left=200,top=20,scrollbars=1');
}

function SomenteNumero(e){
    var tecla=(window.event)?event.keyCode:e.which;
    if((tecla > 47 && tecla < 58)) return true;
    else{
    if (tecla != 8) return false;
    else return true;
    }
}

//VALIDAÇÃO DE CPF
function validarCPF(CampoCPF){
   var cpf = CampoCPF.value;
   
   if (CampoCPF.value != ""){
   
	   if(cpf.length != 11 || cpf == "00000000000" || cpf == "11111111111" ||
		  cpf == "22222222222" || cpf == "33333333333" || cpf == "44444444444" ||
		  cpf == "55555555555" || cpf == "66666666666" || cpf == "77777777777" ||
		  cpf == "88888888888" || cpf == "99999999999"){
		  return false;
	   }
	
	   soma = 0;
	   for(i = 0; i < 9; i++)
		 soma += parseInt(cpf.charAt(i)) * (10 - i);
	   resto = 11 - (soma % 11);
	   if(resto == 10 || resto == 11)
		 resto = 0;
	   if(resto != parseInt(cpf.charAt(9))){
		 return false;
	   }
	   soma = 0;
	   for(i = 0; i < 10; i ++)
		 soma += parseInt(cpf.charAt(i)) * (11 - i);
	   resto = 11 - (soma % 11);
	   if(resto == 10 || resto == 11)
		 resto = 0;
	   if(resto != parseInt(cpf.charAt(10))){
		 return false;
	   }
	}
	
   return true;
 }
 
 //FORMATANDO CPF
 function FormataCpf(campo, teclapres)
	{
		var tecla = teclapres.keyCode;
		var vr = new String(campo.value);
		vr = vr.replace(".", "");
		vr = vr.replace("/", "");
		vr = vr.replace("-", "");
		tam = vr.length + 1;
		if (tecla != 14)
		{
			if (tam == 4)
				campo.value = vr.substr(0, 3) + '.';
			if (tam == 7)
				campo.value = vr.substr(0, 3) + '.' + vr.substr(3, 6) + '.';
			if (tam == 11)
				campo.value = vr.substr(0, 3) + '.' + vr.substr(3, 3) + '.' + vr.substr(7, 3) + '-' + vr.substr(11, 2);
		}
	}


