function ajaxFunction( id, code )
{
    var xmlHttp;   
    var idSplit = id.split('_');    
   
    try
    {
        // Firefox, Opera 8.0+, Safari
        xmlHttp=new XMLHttpRequest();
    }
    catch (e)
    {
        // Internet Explorer
        try
        {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch (e)
        {
            try
            {
                xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch (e)
            {
                alert("O seu browser não suporta AJAX!");
                return false;
            }
        }
    }    
    xmlHttp.onreadystatechange = function()
    {  
        //Imagem de espera
        //CityHelper_LoadingImage( id );
        if( xmlHttp.readyState == 4 )
        {
//alert( xmlHttp.responseText );
            document.getElementById( id ).innerHTML = xmlHttp.responseText;
//alert( document.getElementById( id ).innerHTML );
        }
    }
    
    switch(idSplit[0])
    {
        case "VThotelComboCities":
            xmlHttp.open("GET", "/VendasUserControls/DynamicSearch/CitiesCombo.aspx?id=" + code, true);
            break;        
        case "VTAirSearchForm":
            xmlHttp.open("GET", "/VendasUserControls/DynamicSearch/AirCityHelperForm.aspx?id=" + code, true);            
            break;
        case "Country":
            //CityHelper_LoadingImage( id );
            xmlHttp.open("GET", "/VendasUserControls/DynamicSearch/AirCityHelperGetCities.aspx?id=" + code, true);
            break;        
        default:
            break;    
    }
  
  xmlHttp.send(null);
  }


function changeHotelCountryCodeByDesc()
{
    var selObj = document.getElementById('Country');    
    var selIndex = selObj.selectedIndex;

    selObj.options[selIndex].value = selObj.options[selIndex].text;
}