// JavaScript Document

function Mostra(Opcao){
	for(i=1; i<=9;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 MostraCongressos(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 MostraFaleComAFabec(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 MostraHorario(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 MostraHorario2(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');
}

 //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);
		}
	}
