
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 '1':
            if(iState == 1){ 
		        	styleCalque('pixel1a').background = "#CC0000";
	            styleCalque('pixel1u').background = "#CC0000";
	            styleCalque('pixel2a').background = "#FF9900";
	            styleCalque('pixel2u').background = "#FF9900";
              styleCalque('pixel3a').background = "#FF9900";
	            styleCalque('pixel3u').background = "#FF9900";
	            styleCalque('pixel4a').background = "#FF9900";
	            styleCalque('pixel4u').background = "#FF9900";
              styleCalque('td'+szDivID+'a').background = "#CC0000";
              styleCalque('td2a').background = "#FF9900";
              styleCalque('td3a').background = "#FF9900";
              styleCalque('td4a').background = "#FF9900";
	    }         
        break;
        case '2':
            if(iState == 1){ 
							styleCalque('pixel1a').background = "#FF9900";
	            styleCalque('pixel1u').background = "#FF9900";
	            styleCalque('pixel2a').background = "#CC0000";
	            styleCalque('pixel2u').background = "#CC0000";
              styleCalque('pixel3a').background = "#FF9900";
	            styleCalque('pixel3u').background = "#FF9900";
	            styleCalque('pixel4a').background = "#FF9900";
	            styleCalque('pixel4u').background = "#FF9900";
              styleCalque('td'+szDivID+'a').background = "#CC0000";
              styleCalque('td1a').background = "#FF9900";
              styleCalque('td3a').background = "#FF9900";
              styleCalque('td4a').background = "#FF9900";
            }         
        break;
        case '3':
            if(iState == 1){ 
	            styleCalque('pixel1a').background = "#FF9900";
	            styleCalque('pixel1u').background = "#FF9900";
	            styleCalque('pixel2a').background = "#FF9900";
	            styleCalque('pixel2u').background = "#FF9900";
              styleCalque('pixel3a').background = "#CC0000";
	            styleCalque('pixel3u').background = "#CC0000";
	            styleCalque('pixel4a').background = "#FF9900";
	            styleCalque('pixel4u').background = "#FF9900";
              styleCalque('td'+szDivID+'a').background = "#CC0000";
              styleCalque('td1a').background = "#FF9900";
              styleCalque('td2a').background = "#FF9900";
              styleCalque('td4a').background = "#FF9900";
            }
        break;
        case '4':
            if(iState == 1){ 
	            styleCalque('pixel1a').background = "#FF9900";
	            styleCalque('pixel1u').background = "#FF9900";
	            styleCalque('pixel2a').background = "#FF9900";
	            styleCalque('pixel2u').background = "#FF9900";
              styleCalque('pixel3a').background = "#FF9900";
	            styleCalque('pixel3u').background = "#FF9900";
	            styleCalque('pixel4a').background = "#CC0000";
	            styleCalque('pixel4u').background = "#CC0000";
              styleCalque('td'+szDivID+'a').background = "#CC0000";
              styleCalque('td1a').background = "#FF9900";
              styleCalque('td2a').background = "#FF9900";
              styleCalque('td3a').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;
}
