// JavaScript Document

function ilustracao(id,tam){
	for(x=1;x<=tam;x++){
		if(x==1){
			stringVetor = x; 
		}else{
			stringVetor += ','+x;
		}
	}
	
	var ids = stringVetor.split(",");
	
	for(i=0;i<ids.length;i++){
		var some = "ilustracao"+ids[i];
		if(id != (i + 1)){
			document.getElementById(some).style.display = "none";
		}else{
			document.getElementById("ilustracao"+id).style.display = "block";
		}
	}
}

function sustentabilidade(id,tam,par){
	for(x=1;x<=tam;x++){
		if(x==1){
			stringVetor = x; 
		}else{
			stringVetor += ','+x;
		}
	}
	
	var ids = stringVetor.split(",");
	
	for(i=0;i<ids.length;i++){
		var some = "sustentabilidade"+par+"_"+ids[i];
		if(id != (i + 1)){
			document.getElementById(some).style.display = "none";
		}else{
			document.getElementById("sustentabilidade"+par+"_"+id).style.display = "block";
		}
	}
}
function quemsomos(id,tam,par){
	for(x=1;x<=tam;x++){
		if(x==1){
			stringVetor = x; 
		}else{
			stringVetor += ','+x;
		}
	}
	
	var ids = stringVetor.split(",");
	
	for(i=0;i<ids.length;i++){
		var some = "quemsomos"+par+"_"+ids[i];
		if(id != (i + 1)){
			document.getElementById(some).style.display = "none";
		}else{
			document.getElementById("quemsomos"+par+"_"+id).style.display = "block";
		}
	}
}

function estados(id,tam){
	for(x=1;x<=tam;x++){
		if(x==1){
			stringVetor = x; 
		}else{
			stringVetor += ','+x;
		}
	}
	
	var ids = stringVetor.split(",");
	
	for(i=0;i<ids.length;i++){
		var some = "estado"+ids[i];
		if(id != (i + 1)){
			document.getElementById(some).style.display = "none";
		}else{
			document.getElementById("estado"+id).style.display = "block";
		}
	}
}

function submenu(id,tam){
	for(x=1;x<=tam;x++){
		if(x==1){
			stringVetor = x; 
		}else{
			stringVetor += ','+x;
		}
	}
	
	var ids = stringVetor.split(",");
	
	for(i=0;i<ids.length;i++){
		var some = "item"+ids[i];
		var abas = "aba"+ids[i];
		if(id != (i + 1)){
			document.getElementById(some).style.display = "none";
			document.getElementById(abas).className = "off";
		}else{
			document.getElementById("item"+id).style.display = "block";
			document.getElementById("aba"+id).className = "atual";
		}
	}
}

function fechaBanner(){
	document.getElementById("bannerHome").style.display = "none";
}