//Mostrar ou esconder a combo de classificação de hotel, se o 
function mostrarClassificacao(classi) {

	var oClassi = document.getElementById('linhaClassificacao');
//alert((classi == 'comfort'));
	if (classi == 'comfort') {
		oClassi.style.display = (navigator.appVersion.indexOf("MSIE")!=-1)?'block':'table-row';
	} else {
		oClassi.style.display = 'none';
	}
}

function mostraCancelamento(){
if (document.getElementById("Cancelamento").style.display=="none")
	
		document.getElementById("Cancelamento").style.display="block";
else
document.getElementById("Cancelamento").style.display="none";


}

function mostraQuadro(){
if (document.getElementById("Quadro").style.display=="none")
	
		document.getElementById("Quadro").style.display="block";
else
document.getElementById("Quadro").style.display="none";

}

function getLocalidades(valor, msg){
	
	document.getElementById("painelPesquisa").innerHTML='<p align=center><br><br>' + msg + '...<br><br><img src=imagens/aguarde.gif><br><br></p>';
	document.getElementById("pesquisa").src=  valor;
}

function getPacoteDestino(msg)
{
    var osel =document.formPesquisa.Pais;

	osel.options[0]=new Option(msg,"",true);

document.getElementById("pesquisa").src=  "getPacoteDestinos.asp?mes=" + document.getElementById("mes").value ;
	
}

function getDestinos(msg){
    var osel =document.formPesquisa.destino
	osel.options[0]=new Option(msg,"",true);


	//document.getElementById("tddestino").innerHTML='<select name="destino" id="destino"  class="FontScrol"><option value=" ">Aguarde um momento...</option></select>';
	document.getElementById("pesquisa").src=  "getDestinos.asp?destinationCode=" + document.getElementById("Pais").value + "&tipoHotel=" + document.getElementById("TipoHotel").value;
	
}
function getZonas(msg){
var osel =document.formPesquisa.zona
	osel.options[0]=new Option(msg,"",true);
		

	//document.getElementById("tdzona").innerHTML='<select name="zona" id="zona"  class="FontScrol"><option value=" ">Aguarde um momento...</option></select>';
	
document.getElementById("pesquisa").src= "getZonas.asp?destinationCode=" + document.getElementById("destino").value;



}
function clickcombodestination(elem){
	document.getElementById("regiao").value = elem.options[elem.selectedIndex].text;
	return true;
}



function getavailability(){
	var flag;
	var aux="\n";

	flag=false;

	var frm = document.formPesquisa;





if (frm.Pais.value=="") {
   flag=true;
   aux=aux+"Pais\n";
 }

if (frm.destino.value=="") {
   flag=true;
   aux=aux+"Destino\n";
 }
	


if( !isDate(frm.datainicio) ) {
   flag=true;
   aux=aux+"Data Entrada\n";
 }


if( !isDate(frm.datafim) ) {
   flag=true;
   aux=aux+"Data Saida\n";
 }




if (flag==true) {
   alert("Por favor verique o(s) campo(s)\n" + aux);
  return false;
}


frm.submit();
pesq();
}	
	
	


function getCheckedValue(radioObj) {
	if(!radioObj)
		return "";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return "";
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "";
}

<!--
function isInteger(sInteger) 
{
    var inputStr = sInteger.toString(); // in case not a string already
    var oneChar;
    for (var i = 0; i < inputStr.length; i++) 
    {
        oneChar = inputStr.charAt(i);
        if (oneChar < "0" || oneChar > "9") 
            return false;
    } 
    return true;
}




function isDate(field) 
{
    var sDate = field.value;

    var Slash1Pos = sDate.indexOf("-",0);

    var Slash2Pos = sDate.indexOf("-",Slash1Pos + 1);

    var yyyy = sDate.substring(0,4);
    var mm = sDate.substring(Slash1Pos + 1,Slash2Pos);
    var dd = sDate.substring(Slash2Pos + 1,sDate.length);


    // Validate date
    if(!isInteger(mm) || !isInteger(dd) || !isInteger(yyyy)) return false;

    if (yyyy.length != 4) return false;
    if (mm < 1 || mm > 12) return false;
    if (dd < 1 || dd > 31) return false;
    if (mm == 2) 
    {
        if (dd > 29) return false;
        if (dd == 29) 
        {
        	if (yyyy % 100 == 0 && yyyy % 400 != 0) return false;
            	if (yyyy % 4 != 0) return false;
        }
    } 
    else 
    if ((mm == 4 || mm == 6 || mm == 9 || mm == 11) && dd>30) 
    {
        return false;
    }

    return true;
}


function getAvailAvioes(){
	var flag;
	var aux="\n";
	flag=false;
	var frm;
	if (document.formPesquisaAvioes) {
		frm = document.formPesquisaAvioes;
	} else {
		frm = document.formPesquisaAviaoHotel;
	};

	if (frm.startAirport.value=="") {
	   flag=true;
	   aux=aux+"Origem\n";
	 }
	if (frm.endAirport.value=="") {
	   flag=true;
	   aux=aux+"Destino\n";
	 }
	if( !isDate(frm.startDate) ) {
	   flag=true;
	   aux=aux+"Data Partida\n";
	 }
	if( !isDate(frm.startDateRet) && frm.roundTrip.checked) {
	   flag=true;
	   aux=aux+"Data Regresso\n";
	}
	if(frm.passAdults.value == '0' && frm.passChildren.value == '0' && frm.passInfants.value == '0'){
		flag=true;
		aux=aux + "Total de 0 (zero) passageiros\n";
	};
	if (flag==true) {
		alert("Por favor verique o(s) campo(s)\n" + aux);
		return false;
	} else {
		pesqAvioes();
		return true;
	}
}


//
//Funções para mudar o estado do som nas páginas, quando se muda no menu
//
function setSom(valor) {
	//actualizar formulário de pesquisa, se existir
	var oSom = document.getElementById("som");
	if (oSom != null) oSom.value = valor; 

	//Actualizar som nos filmes flash
	if (navigator.appName.indexOf("Microsoft") != -1) {
		var oFlash = document.getElementsByTagName("object");
		for (i=0; i<oFlash.length; i++) {
			if (oFlash[i].id != "") thisMovie(oFlash[i].id).asSetSom(valor);
		};
	} else {
		var oFlash = document.getElementsByTagName("embed");
		for (i=0; i<oFlash.length; i++) {
			if (oFlash[i].id != "") thisMovie(oFlash[i].id).asSetSom(valor);
		};
	};
};

function thisMovie(movieName) {
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	return (isIE) ? window[movieName] : document[movieName];
};

//funcões para detalhe de Pacotes

function getnoites(idpacote, msg) {
var datapartida =document.getElementById("dataPartida").value;
document.getElementById("tdnoites").innerHTML='<select name="noites" id="noites"  class="FontScrol"  style="width: 85px;"><option value=" ">' + msg + '...</option></select>';
document.getElementById("pesquisa").src="getnoites.asp?datapartida=" + datapartida + "&idpacote=" + idpacote ;

}
function getRegime(idpacote, msg) {
var datapartida = document.getElementById("dataPartida").value;
var noites = document.getElementById("noites").value;
document.getElementById("tdregime").innerHTML='<select name="noites" id="noites"  class="FontScrol"  style="width: 85px;"><option value=" ">' + msg + '...</option></select>';
document.getElementById("pesquisa").src="getRegime.asp?datapartida=" + datapartida + "&idpacote=" + idpacote + "&noites=" + noites;

}


function getPacotePreco() {


var flag;
	var aux="\n";

	flag=false;

	var frm = document.frmpesquisaPacotepreco;





if (frm.dataPartida.value=="0") {
   flag=true;
   aux=aux+"Data Partida\n";
 }

if (frm.noites.value=="") {
   flag=true;
   aux=aux+"Noites\n";
 }
	

if (frm.regime.value=="") {
   flag=true;
   aux=aux+"Regime\n";
 }
	





if (flag==true) {
   alert("Por favor verique o(s) campo(s)\n" + aux);
  return false;
}


frm.submit();

}

-->