function openAjax(){
	var Ajax;
	try{
		Ajax = new XMLHttpRequest();
	}catch(ee){
		try{
			Ajax = new ActiveXObject("Msxml2.XMLHTTP");
		}catch(e){
			try{
				Ajax = new ActiveXObject("Microsoft.XMLHTTP");
			}catch(e){
				Ajax = false;
			}
		}
	}
	return Ajax;
}


function carregaAjax(cod_idioma,cod_resort)
{
	if(document.getElementById){
		var exibeResultado = document.getElementById("idDiv");
		var id = cod_resort;
		var Ajax = openAjax();
		Ajax.open("GET", "mostra_outrasopcoes_deresorts.php?id=" + id + "&cod_idioma=" + cod_idioma, true);
		Ajax.onreadystatechange = function()
		{
			if(Ajax.readyState == 1){
				exibeResultado.style.visibility="visible";
				document.getElementById("fechaDIV").style.visibility="visible";
			}
			if(Ajax.readyState == 4){
				if(Ajax.status == 200){
					var resultado = Ajax.responseText;
					resultado = resultado.replace(/\+/g," ");
					resultado = unescape(resultado);
					exibeResultado.style.visibility="visible";
					exibeResultado.innerHTML = resultado;
					document.getElementById("fechaDIV").style.visibility="visible";
					document.getElementById("linq").style.color="#000000";
				}else{
					exibeResultado.innerHTML = "Erro: .";
				}
			}
		}
		Ajax.send(null);
	}
}


function mostraClubMedInt(destino) {
	if(document.getElementById) {
		var exibeResultado = document.getElementById("conteudoClubMedInt");
		var destino = destino;
		var Ajax = openAjax();
		Ajax.open("GET", "clubmedinternacional/funcoes/monta_paginas.php?flag=" + destino, true);
		Ajax.onreadystatechange = function(){
			if(Ajax.readyState == 1) {
				exibeResultado.style.visibility="visible";
			}
			if(Ajax.readyState == 4) {
				if(Ajax.status == 200) {
					var resultado = Ajax.responseText;
					resultado = resultado.replace(/\+/g," ");
					resultado = unescape(resultado);
					exibeResultado.style.visibility="visible";
					exibeResultado.innerHTML = resultado;
				}else{
					exibeResultado.innerHTML = "Erro: .";
				}
			}	
		}
	Ajax.send(null);
	}
}






function fecharDiv(){
	document.getElementById("idDiv").style.visibility="hidden";
	document.getElementById("fechaDIV").style.visibility="hidden";
    document.getElementById("idDiv").innerHTML = "";
    document.getElementById("linq").style.color="#0000FF";
}
    

function adicionar_favoritos(){
	var browsName = navigator.appName;
	var url=document.location
    var site=document.title
    if (browsName == 'Microsoft Internet Explorer'){
		if (document.all){
			window.external.AddFavorite(url,site);
		}
	}else if (browsName == 'Netscape'){
		alert ('Pressione CTRL + D para adicionar esta página a seus Favoritos');
	}
}
    
function Esconde(){
	document.getElementById('Layer2').style.visibility='hidden';
}


var popUpWin=0;
function popUpWindow_scroll(URLStr, left, top, width, height){
	if(popUpWin){
		if(!popUpWin.closed){
			popUpWin.close();
		}
	}
    popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');

}


var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height){
	if(popUpWin){
		if(!popUpWin.closed){
			popUpWin.close();
		}
	}
	popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}
	


function mostraLista(){

	document.getElementById("listaR").style.display="block";
	
}	


function fechaLista(){

	document.getElementById("listaR").style.display="none";
	
}		

///////////////////////////////////////////////////////////////////////////////////////////////////
function mostraDestino(){
	
	alert('f');

	document.getElementById("opcoesDestino").style.display="block";
	
}	

function fechaDestino(){

	document.getElementById("opcoesDestino").style.display="none";
	
}	

function mostraResort(id){

	document.getElementById(id).style.display="block";
	
}	

function fechaResort(id){

	document.getElementById(id).style.display="none";
	
}	
/////////////////////////////////////////////////////////////////////////////////////////////////////////