// central de atendimento

function toggle(obj) {
	var el = document.getElementById(obj);
	if ( el.style.display != 'none' ) {
		el.style.display = 'none';
	}
	else {
		el.style.display = ''; 
	}
}


	function passagens(){
		document.getElementById("passagens").style.display = "block";
		document.getElementById("hoteis").style.display = "none";
		document.getElementById("pacotes").style.display = "none";
		document.getElementById("cruzeiros").style.display = "none";
	}
	function hoteis(){
		document.getElementById("passagens").style.display = "none";
		document.getElementById("hoteis").style.display = "block";
		document.getElementById("pacotes").style.display = "none";
		document.getElementById("cruzeiros").style.display = "none";
	}
	function pacotes(){
		document.getElementById("passagens").style.display = "none";
		document.getElementById("hoteis").style.display = "none";
		document.getElementById("pacotes").style.display = "block";
		document.getElementById("cruzeiros").style.display = "none";
	}
	function cruzeiros(){
		document.getElementById("passagens").style.display = "none";
		document.getElementById("hoteis").style.display = "none";
		document.getElementById("pacotes").style.display = "none";
		document.getElementById("cruzeiros").style.display = "block";
	}


function inCat(url) {
	if(url)
	{
		
		var array_url = url.split("?");
		array_url= array_url[1];
		
		array_url=array_url.split("&");
		var upto=array_url.length;
		
		var getNomeVariavel = new Array();
		var getValorVariaval = new Array();
		
		for(var i=0;i<upto;i++) {
			var parametros = array_url[i].split("=");
			getNomeVariavel[i] = parametros[0];	
			getValorVariaval[i] = parametros[1];
			}
			
		i=0;
		while (i<upto) {
			
			if(getNomeVariavel[i]=="sessao") {
				
				if(getValorVariaval[i]=="buscaPorHoteis")
				{
					hoteis();
					window.location = '#buscaPorHoteis';
				break;
				}
				
				if(getValorVariaval[i]=="dicasDeViagemHoteis")
				{
					hoteis();
					window.location = '#dicasDeViagemHoteis';
				break;
				}		
				if(getValorVariaval[i]=="buscaPorPacotes")
				{
					pacotes();
					window.location = '#buscaPorPacotes';
				break;
				}	
				if(getValorVariaval[i]=="pgtosEntregasVoucher")
				{
					pacotes();
					window.location = '#pgtosEntregasVoucher';
				break;
				}	
				if(getValorVariaval[i]=="buscaPorCruzeiros")
				{
					cruzeiros();
					window.location = '#buscaPorCruzeiros';
				break;
				}	
				if(getValorVariaval[i]=="dicasDeViagemCruzeiros")
				{
					cruzeiros();
					window.location = '#dicasDeViagemCruzeiros';
				break;
				}						
			break;
			}
				
			if(getNomeVariavel[i]=="topico") {
			
				if(getValorVariaval[i]=="passagens")
				{
					passagens();
					window.location = '#passagens';
				break;
				}
				
				else if (getValorVariaval[i]=="pacotes")
				{
					pacotes();
					window.location = '#pacotes';
				break;
				}
				
				else if (getValorVariaval[i]=="cruzeiros")
				{
					cruzeiros();
					window.location = '#cruzeiros';
				break;
				}
				
				else if (getValorVariaval[i]=="hoteis")
				{
					hoteis();
					window.location = '#hoteis';
				break;
				}
			break;				
			}			
			
		i++;
						
		}
		
	}	
}
