/*******************************************
	CODIGO PARA MOSTRAR E ESCONDER AS TABLES
*******************************************/
	var objLastMenuShown = null;
	
	function showDG(objMenu)
	{
		if (objMenu == null) return;
	
		if (objLastMenuShown != null)
		{
			showSubMenu(objLastMenuShown, false);
			
		}
		if (objLastMenuShown != objMenu)
		{
			showSubMenu(objMenu, true);
			objLastMenuShown = objMenu;
		}
		else
		{
		objLastMenuShown = null;
		}
	}
	
	function showSubMenu(objMenu, blnShow)
	{
		if (objMenu == null || blnShow == null) {
			return false;
		}
	
		if (blnShow){
			document.getElementById(objMenu).style.display = '';
		}
		else
		{
			document.getElementById(objMenu).style.display = 'none';	
		}
		return true;
	}
  /*
	///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  */
  


/*******************************************
DESDOBRAMENTO FAQS
*******************************************/
var divClickada = null;

function divOver(Div_cell)
{
	if (Div_cell != divClickada)
	{Div_cell.className = 'menuLateralTipoOver';}
}

function liOver(Div_cell)
{
	if (Div_cell != divClickada)
	{Div_cell.className = 'botaoAzulClaro';}
}

function liOut(Div_cell)
{
	if (Div_cell != divClickada)
	{
		Div_cell.className = 'botaoAzulescuro';
	}
}


var aux = null;
function liTransferesOver(Div_cell,aux)
{
	if (Div_cell != divClickada)
	{Div_cell.className = 'botaoAzulClaroTranferesMedida'+aux;}
	
}

function liTransferesOut(Div_cell,aux)
{
	if (Div_cell != divClickada)
	{Div_cell.className = 'botaoAzulEscuroTranferesMedida'+aux;}
}


function divOut(Div_cell)
{
	if (Div_cell != divClickada)
	{
		Div_cell.className = 'menuLateralPai';
	}
}


/*******************************************
Caixas com filhos
*******************************************/
//GUARDAR A TD QUE FOI CLICKADA
var divClickada = null;
var estiloAntigo = null;
var tipo = null;
var tipoAntigo = null;

function tdClickCaixas(Div_cell,estilo)
{	
	if (divClickada == null)
	{
		//nunca executou esta fun&ccedil;&atilde;o
		Div_cell.className = 'menuLateralPaiSel bgMenuLateralPaiSel';
		divClickada = Div_cell;
		estiloAntigo = estilo;
	}
	else
	{
		
		if (divClickada == Div_cell)
		{
			//repor a cor original
			divClickada.className = 'menuLateralPaiSel bgMenuLateralPaiSel';/*Este Segundo pode ter que se criar o on novamente*/
			divClickada = null;
			estiloAntigo = null;
		}
		else
		{
			divClickada.className = 'menuLateralPaiSel bgMenuLateralPaiSel';/*Este Segundo pode ter que se criar o on novamente*/
			estiloAntigo = estilo;
			
			Div_cell.className = 'menuLateralPaiSel bgMenuLateralPaiSel';
			divClickada = Div_cell;
		}
		//j&aacute; executou esta fun&ccedil;&atilde;o
		
	}
}


function tdClickCaixas2(Div_cell,tipo,estilo) {

    if (divClickada == null) {
	    if (tipo == 2) {
	        Div_cell.className = 'bg_LinhaPergFreq524x34AzulClaro';
	    }
	    else {
	        Div_cell.className = 'bg_LinhaPergFreq524x17AzulClaro';
	    }
		divClickada = Div_cell;
		/*estiloAntigo = estilo;*/
		estiloAntigo = Div_cell.className;
		tipoAntigo = tipo;
    }
	
	else
	{		
		if (divClickada == Div_cell) {
		    if (tipo == 2) {
		        divClickada.className = 'bg_LinhaPergFreq524x34';
		    }
		    else{
		        divClickada.className = 'bg_LinhaPergFreq524x17';
		    } 
			divClickada = null;
			estiloAntigo = null;
			tipoAntigo = null;
		}
		else {

		    if (tipoAntigo == 2) {
		        divClickada.className = 'bg_LinhaPergFreq524x34';
		    }
		    else {
		        divClickada.className = 'bg_LinhaPergFreq524x17';
		    }
			
			
			if (tipo == 2) {
		        Div_cell.className = 'bg_LinhaPergFreq524x34AzulClaro';
		    }
		    else{
		        Div_cell.className = 'bg_LinhaPergFreq524x17AzulClaro';
		    }

		    estiloAntigo = Div_cell.className;
		    tipoAntigo = tipo;
			divClickada = Div_cell;
		}		
	}
}

function caixaOver(Div_cell,tipo)
{
    if (Div_cell != divClickada) {
	    if(tipo == 2)
	        Div_cell.className = 'bg_LinhaPergFreq524x34AzulClaro';
	    else
	        Div_cell.className = 'bg_LinhaPergFreq524x17AzulClaro';
	}
}

function caixaOut(Div_cell,tipo)
{
	if (Div_cell != divClickada) {
	    if (tipo == 2)
	        Div_cell.className = 'bg_LinhaPergFreq524x34';
		else
		    Div_cell.className = 'bg_LinhaPergFreq524x17';
	}
}



function tdClickCaixas3(Div_cell,tipo,estilo) {

    if (divClickada == null) {
	    if (tipo == 2) {
	        Div_cell.className = 'bg_LinhaPergFreq947x34AzulClaro';
	    }
	    else {
	        Div_cell.className = 'bg_LinhaPergFreq947x17AzulClaro';
	    }
		divClickada = Div_cell;
		/*estiloAntigo = estilo;*/
		estiloAntigo = Div_cell.className;
		tipoAntigo = tipo;
    }
	
	else
	{		
		if (divClickada == Div_cell) {
		    if (tipo == 2) {
		        divClickada.className = 'bg_LinhaPergFreq947x34';
		    }
		    else{
		        divClickada.className = 'bg_LinhaPergFreq947x17';
		    } 
			divClickada = null;
			estiloAntigo = null;
			tipoAntigo = null;
		}
		else {

		    if (tipoAntigo == 2) {
		        divClickada.className = 'bg_LinhaPergFreq947x34';
		    }
		    else {
		        divClickada.className = 'bg_LinhaPergFreq947x17';
		    }
			
			
			if (tipo == 2) {
		        Div_cell.className = 'bg_LinhaPergFreq947x34AzulClaro';
		    }
		    else{
		        Div_cell.className = 'bg_LinhaPergFreq947x17AzulClaro';
		    }

		    estiloAntigo = Div_cell.className;
		    tipoAntigo = tipo;
			divClickada = Div_cell;
		}		
	}
}



function caixaFaqsOver(Div_cell,tipo)
{
    if (Div_cell != divClickada) {
	    if(tipo == 2)
	        Div_cell.className = 'bg_LinhaPergFreqAzulClaro947x17';
	    else
	        Div_cell.className = 'bg_LinhaPergFreq947x17AzulClaro';
	}
}

function caixaFaqsOut(Div_cell,tipo)
{
	if (Div_cell != divClickada) {
	    if (tipo == 2)
	        Div_cell.className = 'bg_LinhaPergFreq947x17';
		else
		    Div_cell.className = 'bg_LinhaPergFreq947x17';
	}
}

function divClickPai(Div_cell)
{
	divClickada = Div_cell;
	Div_cell.className = 'menuLateralPaiSel';
}

/*****************************************
	PARA FAZER O MOUSE OVER NAS TD's
******************************************/
function divOver(Div_cell) {
	Div_cell.className = 'menuLateralPaiSel bgMenuLateralPaiSel';
}
function divOut(Div_cell) {
    Div_cell.className = 'menuLateralPai bgMenuLateralPaiSel';	
}


/*****************************************
	PARA FAZER O MOUSE OVER MOUSE OUT TOP PROMOS
******************************************/

function topPromosMouseOuver(id) 
{ 
    document.getElementById(id).style.background = "url(img/separadorAzulClaro.gif)";
    document.getElementById(id + 'Col_1').className = "linhasDestaquesPromoCol1Ouver";
    document.getElementById(id + 'Col_2').className = "linhasDestaquesPromoCol2Ouver";
    document.getElementById(id + 'Col_3').className = "linhasDestaquesPromoCol3Ouver";
    document.getElementById(id + 'Col_4').className = "linhasDestaquesPromoCol4Ouver";	
    document.getElementById(id + 'Col_4_S2').className = "textoLinhasDestaquesPromo14";
    document.getElementById(id + 'Col_1_S1').className = "textoLinhasDestaquesPromo12";
    document.getElementById(id + 'Col_5').className = "linhasDestaquesPromoCol4Ouver";
    document.getElementById(id + 'Col_6').className = "linhasDestaquesPromoCol4Ouver";
} 
function topPromosMouseOut(id) 
{ 	
    document.getElementById(id).style.background = "url(img/x.gif)";
    document.getElementById(id + 'Col_1').className = "linhasDestaquesPromoCol1Out";
	document.getElementById(id + 'Col_1_S1').className = "branco12";
    document.getElementById(id + 'Col_2').className = "linhasDestaquesPromoCol2Out";
	document.getElementById(id + 'Col_3').className = "linhasDestaquesPromoCol3Out";
    document.getElementById(id + 'Col_4').className = "linhasDestaquesPromoCol4Out";
    document.getElementById(id + 'Col_5').className = "linhasDestaquesPromoCol4Out";
    document.getElementById(id + 'Col_6').className = "linhasDestaquesPromoCol4Out";
	document.getElementById(id + 'Col_4_S2').className = "branco14";		 
} 

/*****************************************
	PARA FAZER O MOUSE OVER MOUSE OUT TOP PROMOS 2
******************************************/

function topPromosMouseOuver2(id) 
{ 
    document.getElementById(id).style.backgroundColor = "#d81e6c";
    //document.getElementById('New' + id + 'sDestaquesPromoCol6').style.backgroundColor = "#d81e6c";
	//alert(id);
} 
function topPromosMouseOut2(id) 
{ 	
    document.getElementById(id).style.background = "url(img/x.gif)";
} 


/*******************************************
DESDOBRAMENTO Novidades
*******************************************/
var tdClickada = null;

function tdClickNovidades(table_cell)
{
	if (tdClickada == null)
	{
		//nunca executou esta fun&ccedil;&atilde;o
		table_cell.className = 'menuNovidadesSel';
		tdClickada = table_cell;
	}
	else
	{
		if (tdClickada == table_cell)
		{
			//repor a cor original
			tdClickada.className = 'menuNovidades';
			tdClickada = null;
		}
		else
		{
			tdClickada.className = 'menuNovidades';
			table_cell.className = 'menuNovidadesSel';
			tdClickada = table_cell;
		}
		//j&aacute; executou esta fun&ccedil;&atilde;o
		
	}
}


function tdNovidadesOver(table_cell) {
	if (table_cell != tdClickada)
	{table_cell.className = 'menuNovidadesOver';}
}
function tdNovidadesOut(table_cell) {
	if (table_cell != tdClickada)
	{
		table_cell.className = 'menuNovidades';
	}
}




/******************************************* 
Estância Alojamento
*******************************************/


function tdClickCaixasAlojamento(Div_cell,estilo)
{	
	if (divClickada == null)
	{
		//nunca executou esta fun&ccedil;&atilde;o
		Div_cell.className = 'bg_LinhaEstanciaAlojamento';
		divClickada = Div_cell;
		estiloAntigo = estilo;
	}
	else
	{
		
		if (divClickada == Div_cell)
		{
			//repor a cor original
			divClickada.className = 'menuLateralPaiSel bgMenuLateralPaiSel';/*Este Segundo pode ter que se criar o on novamente*/
			divClickada = null;
			estiloAntigo = null;
		}
		else
		{
			divClickada.className = 'menuLateralPaiSel bgMenuLateralPaiSel';/*Este Segundo pode ter que se criar o on novamente*/
			estiloAntigo = estilo;
			
			Div_cell.className = 'menuLateralPaiSel bgMenuLateralPaiSel';
			divClickada = Div_cell;
		}
		//j&aacute; executou esta fun&ccedil;&atilde;o
		
	}
}

function tdClickCaixasAlojamento2(Div_cell,estilo) {

    if (divClickada == null) {
	  
	    Div_cell.className = 'bg_LinhaEstanciaAlojamento_on';	   
		divClickada = Div_cell;
		estiloAntigo = Div_cell.className;
		tipoAntigo = tipo;
    }
	
	else
	{		
		if (divClickada == Div_cell) {
		    
		 divClickada.className = 'bg_LinhaEstanciaAlojamento_on';
		 divClickada = null;
		 estiloAntigo = null;
		 tipoAntigo = null;
		}
		else {

	        divClickada.className = 'bg_LinhaEstanciaAlojamento';
		    estiloAntigo = Div_cell.className;
		    tipoAntigo = tipo;
			divClickada = Div_cell;
		}		
	}
}

function caixaAlojamentoOver(Div_cell,tipo)
{
    if (Div_cell != divClickada) {
	   
	        Div_cell.className = 'bg_LinhaEstanciaAlojamento_on';
	}
}

function caixaAlojamentoOut(Div_cell,tipo)
{
	if (Div_cell != divClickada) {
	   
		    Div_cell.className = 'bg_LinhaEstanciaAlojamento';
	}
}



