/*
	Para incluir novas abas proceda da seguinte forma:
	
	1º duplique as variaveis referentes a aba e abatit.
	2º duplique  uma linha referente a titulo e uma linha referente a aba em todos os if´s.
	3º inclua mais um if mudando o nomedo i == X
	4º no html duplique um h2 uma div#aba alterando os respectivos valores
	5º no css crie os novos titulos com sinal de mais e sinal de menos
	
	OBS.: em todos os casos mantenha o padrao dos nomes
	*/
function displayAbas(i){
	var aba01 = document.getElementById('aba01');
	var aba01tit = document.getElementById('aba01-tit');
	
	var aba02 = document.getElementById('aba02');
	var aba02tit = document.getElementById('aba02-tit');
	
	var aba03 = document.getElementById('aba03');
	var aba03tit = document.getElementById('aba03-tit');
	
	var aba04 = document.getElementById('aba04');
	var aba04tit = document.getElementById('aba04-tit');
	
	
	if(i==1){
		aba01tit.className = 'tit-aba01-on';
		aba02tit.className = 'tit-aba02-off';
		aba03tit.className = 'tit-aba03-off';
		aba04tit.className = 'tit-aba04-off';
		
		aba01.style.display = 'block';
		aba02.style.display = 'none';
		aba03.style.display = 'none';
		aba04.style.display = 'none';
	}
	
	if(i==2){
		aba01tit.className = 'tit-aba01-off';
		aba02tit.className = 'tit-aba02-on';
		aba03tit.className = 'tit-aba03-off';
		aba04tit.className = 'tit-aba04-off';
		
		aba01.style.display = 'none';
		aba02.style.display = 'block';
		aba03.style.display = 'none';
		aba04.style.display = 'none';
	}
	
	if(i==3){
		aba01tit.className = 'tit-aba01-off';
		aba02tit.className = 'tit-aba02-off';
		aba03tit.className = 'tit-aba03-on';
		aba04tit.className = 'tit-aba04-off';
		
		aba01.style.display = 'none';
		aba02.style.display = 'none';
		aba03.style.display = 'block';
		aba04.style.display = 'none';
	}
	
	if(i==4){
		aba01tit.className = 'tit-aba01-off';
		aba02tit.className = 'tit-aba02-off';
		aba03tit.className = 'tit-aba03-off';
		aba04tit.className = 'tit-aba04-on';
		
		aba01.style.display = 'none';
		aba02.style.display = 'none';
		aba03.style.display = 'none';
		aba04.style.display = 'block';
	}
}

window.onload = function(){
	ancora = location.href;
	ancora = ancora.split("#anc");
	displayAbas(ancora[1]);
}
