//Carrega o combo de preços de pacotes
	function carregaPreco(param){
//			alert(param.options[param.selectedIndex].value);
		if(param.options[param.selectedIndex].value != "")
		{
			pesquisaCombo('5', param.options[param.selectedIndex].value, 'form2', 'idpacoteviagem', 'ifm');
		}
		else
		{
			document.form2.idpacoteviagem.options[document.form2.idpacoteviagem.selectedIndex].text = "Selecione um roteiro.";
			document.form2.idpacoteviagem.length = 1;

			document.form2.nacional.options[document.form2.nacional.selectedIndex].text= "*Selecione uma faixa de pre&ccedil;o. ";
			document.form2.nacional.length = 1;
		}
	}
	
	//Carrega combo de pacotes
	function carregaPacote(param){
//			alert(param.options[param.selectedIndex].value);
		if(param.options[param.selectedIndex].value != "")
		{
			pesquisaCombo('6', param.options[param.selectedIndex].value, 'form2', 'nacional', 'ifm');
		}
		else
		{
			document.form2.nacional.options[document.form2.nacional.selectedIndex].text= "* Selecione um preço. ";
			document.form2.nacional.length = 1;
		}
	}
	
	function pesquisaPacote(pasta){
	    if(document.form2.idtipopacote.options[document.form2.idtipopacote.selectedIndex].value == '' && 
	    document.form2.idpacoteviagem.options[document.form2.idpacoteviagem.selectedIndex].value == '' && 
	    document.form2.idconfigmunicipio.options[document.form2.idconfigmunicipio.selectedIndex].value == ''){  
		   	alert("selecione os parâmetros nos combos antes de fazer a pesquisa.");
		   	return false;
		 }else{   
		 		//alert(pasta); 
		     document.form2.action = pasta;
		   	 document.form2.submit();
		   	 
	   	}	
	}
	
   	function desabCidade(){
		
		if(document.form2.idtipopacote.options[document.form2.idtipopacote.selectedIndex].text == 'CRUZEIRO'){
			document.form2.idconfigmunicipio.disabled = true;
		}else{
			document.form2.idconfigmunicipio.disabled = false;
		}
	
	}
	
	function removeDestino(obj, objBlock){
		//alert(obj.value);
		 if(obj.value == 7){
			//document.getElementById(div).style.display = 'none';
			objBlock.disabled = true;
		 }else{
			//document.getElementById(div).style.display = 'block';
			objBlock.disabled = false;
		 }
	}
			
   function carregaHotel(h){ 
    if(h.value == ''){  
	   return false;   
	 }else{    
	     document.form1.idtabela.value = h.value;
	     document.form1.action = 'prg_gui_cid_hot_cap.php';	     
	   	 document.form1.submit();
   	}    
		 	
   }
   
   function preencheHotel(param){
		if(param.options[param.selectedIndex].value != ""){
		   pesquisaCombo('1', param.options[param.selectedIndex].value, 'form1', 'idconfighotel','ifm');
		}else{
			document.form1.idhotel.options[document.form1.idhotel.selectedIndex].text= "* Selecione uma cidade acima ";
			document.form1.idhotel.length = 1;			
		}
	}
	
   function carregaDestino(h){ 
    if(h.value == ''){  
	   return false;   
	 }else{    
	     document.destino.idtabela.value= h.value;
	     document.destino.action='prg_gui_cid_cap.php';	     
	   	 document.destino.submit();
   	} 
   }		
	