
function styleCalque(message) { 
    if (document.all) calqueStyle = document.all[message].style; 
    if (document.layers) calqueStyle = document.layers[message].style; 
    if (document.getElementById) calqueStyle = document.getElementById(message).style; 
    return calqueStyle; 
} 

function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
    styleCalque(szDivID).visibility = iState ? "visible" : "hidden";
    switch(szDivID){
        case 'flights':
            if(iState == 1){ 
		        styleCalque('pixelfla').background = "#CC0000";
	            styleCalque('pixelflu').background = "#CC0000";
	            styleCalque('pixelhota').background = "#FF9900";
	            styleCalque('pixelhotu').background = "#FF9900";
	            styleCalque('td'+szDivID).background = "#CC0000";
	            styleCalque('tdhotels').background = "#FF9900";
	    }         
        break;
        case 'hotels':
            if(iState == 1){ 
	        styleCalque('pixelfla').background = "#FF9900";
	        styleCalque('pixelflu').background = "#FF9900";
	        styleCalque('pixelhota').background = "#CC0000";
	        styleCalque('pixelhotu').background = "#CC0000";
            styleCalque('td'+szDivID).background = "#CC0000";
            styleCalque('tdflights').background = "#FF9900";
            }         
        break;
    }
}

function abilita_flights(){
	document.search_flights.start_dd.disabled = false;
	document.search_flights.start_mm.disabled = false;
	document.search_flights.return_dd.disabled = false;
	document.search_flights.return_mm.disabled = false;
}

function disabilita_flights(){
	document.search_flights.start_dd.disabled = true;
	document.search_flights.start_mm.disabled = true;
	document.search_flights.return_dd.disabled = true;
	document.search_flights.return_mm.disabled = true;
}
