﻿//scripts used to manipulate engines
    
function ChangeSelectorAspect(selector,containerDivId)
{    
    switch(selector)    
    {
        case "Plain":
            document.getElementById("PlainSpan").className = "class2";
            document.getElementById("PlainTD").background = "/images/menus/pesq_top_1a.gif";
            document.getElementById("HotelPlainSpan").className = "class1";
            document.getElementById("HotelPlainTD").background = "/images/menus/pesq_top_2.gif";
            document.getElementById("HotelSpan").className = "class1";
            document.getElementById("HotelTD").background = "/images/menus/pesq_top_3.gif";
            document.getElementById("DestinationSpan").className = "class1";
            document.getElementById("DestinationTD").background = "/images/menus/pesq_top_4.gif";
            document.getElementById("CarSpan").className = "class1";
            document.getElementById("CarTD").background = "/images/menus/pesq_top_5.gif";
            
            document.getElementById(containerDivId).style.display = "";
            document.getElementById("VacationEngineContainer").style.display = "none";            
            document.getElementById(containerDivId).innerHTML = waitingMessage;            
            __getData("$_Engines_UserControls_Plain_PlainEngine",containerDivId);
            
        break;
        
        case "HotelPlain":
            document.getElementById("PlainSpan").className = "class1";
            document.getElementById("PlainTD").background = "/images/menus/pesq_top_1.gif";
            document.getElementById("HotelPlainSpan").className = "class2";
            document.getElementById("HotelPlainTD").background = "/images/menus/pesq_top_2a.gif";
            document.getElementById("HotelSpan").className = "class1";
            document.getElementById("HotelTD").background = "/images/menus/pesq_top_3.gif";
            document.getElementById("DestinationSpan").className = "class1";
            document.getElementById("DestinationTD").background = "/images/menus/pesq_top_4.gif";
            document.getElementById("CarSpan").className = "class1";
            document.getElementById("CarTD").background = "/images/menus/pesq_top_5.gif";                        
            
            document.getElementById(containerDivId).style.display = "";
            document.getElementById("VacationEngineContainer").style.display = "none";
            document.getElementById(containerDivId).innerHTML = waitingMessage;
            __getData("$_Engines_UserControls_AirHotel_AirHotelEngine",containerDivId);

        break;
        
        case "Hotel":
            document.getElementById("PlainSpan").className = "class1";
            document.getElementById("PlainTD").background = "/images/menus/pesq_top_1.gif";
            document.getElementById("HotelPlainSpan").className = "class1";
            document.getElementById("HotelPlainTD").background = "/images/menus/pesq_top_2.gif";
            document.getElementById("HotelSpan").className = "class2";
            document.getElementById("HotelTD").background = "/images/menus/pesq_top_3a.gif";
            document.getElementById("DestinationSpan").className = "class1";
            document.getElementById("DestinationTD").background = "/images/menus/pesq_top_4.gif";
            document.getElementById("CarSpan").className = "class1";
            document.getElementById("CarTD").background = "/images/menus/pesq_top_5.gif";                        
            
            document.getElementById(containerDivId).style.display = "";
            document.getElementById("VacationEngineContainer").style.display = "none";
            document.getElementById(containerDivId).innerHTML = waitingMessage;
            __getData("$_Engines_UserControls_Hotel_HotelEngine",containerDivId);
        break;
        
        case "Destination":
            document.getElementById("PlainSpan").className = "class1";
            document.getElementById("PlainTD").background = "/images/menus/pesq_top_1.gif";
            document.getElementById("HotelPlainSpan").className = "class1";
            document.getElementById("HotelPlainTD").background = "/images/menus/pesq_top_2.gif";
            document.getElementById("HotelSpan").className = "class1";
            document.getElementById("HotelTD").background = "/images/menus/pesq_top_3.gif";
            document.getElementById("DestinationSpan").className = "class2";
            document.getElementById("DestinationTD").background = "/images/menus/pesq_top_4a.gif";
            document.getElementById("CarSpan").className = "class1";
            document.getElementById("CarTD").background = "/images/menus/pesq_top_5.gif";                        
            
            document.getElementById(containerDivId).innerHTML = waitingMessage;
            //__getData("$_Engines_UserControls_Vacations_VacationsEngine",containerDivId);
            document.getElementById(containerDivId).style.display = "none";
            document.getElementById("VacationEngineContainer").style.display = "";
            
        break;
        
        case "Car":
            document.getElementById("PlainSpan").className = "class1";
            document.getElementById("PlainTD").background = "/images/menus/pesq_top_1.gif";
            document.getElementById("HotelPlainSpan").className = "class1";
            document.getElementById("HotelPlainTD").background = "/images/menus/pesq_top_2.gif";
            document.getElementById("HotelSpan").className = "class1";
            document.getElementById("HotelTD").background = "/images/menus/pesq_top_3.gif";
            document.getElementById("DestinationSpan").className = "class1";
            document.getElementById("DestinationTD").background = "/images/menus/pesq_top_4.gif";
            document.getElementById("CarSpan").className = "class2";
            document.getElementById("CarTD").background = "/images/menus/pesq_top_5a.gif";                        
            
            document.getElementById(containerDivId).style.display = "";
            document.getElementById("VacationEngineContainer").style.display = "none";
            document.getElementById(containerDivId).innerHTML = waitingMessage;
            __getData("$_Engines_UserControls_Car_CarEngine",containerDivId);
            
        break;
        
        default:
            
            break;
    }
}



