﻿function ShowWeather(divWeatherID, divPhotosID)
{
    //debugger
    var divWeather = document.getElementById(divWeatherID);
    var divPhotos = document.getElementById(divPhotosID);
    
    if (divWeather.style.display == "none")
    {
        // activate weather
        divWeather.style.display = "";
        
        // inactivate photos
        divPhotos.style.display = "none";
    }
    else    
    {
        // inactivate weather
        divWeather.style.display = "none";
    }        
}

function ShowPhotos(divWeatherID, divPhotosID)
{   
    //debugger
    var divWeather = document.getElementById(divWeatherID);
    var divPhotos = document.getElementById(divPhotosID);
    
    if (divPhotos.style.display == "none")
    {
        // activate photos
        divPhotos.style.display = "";
        
        // inactivate weather
        divWeather.style.display = "none";
    }
    else    
    {
        // inactivate photos
        divPhotos.style.display = "none";
    }
}

function HideWeather()
{
    var divWeather = document.getElementById("divWeather");
    
    // inactivate weather
    divWeather.style.display = "none";
}

function HidePhotos()
{
    var divPhotos = document.getElementById("divPhotos");
    
    // inactivate weather
    divPhotos.style.display = "none";
}

function ChangeFC(type, F_weather_img, C_weather_img)
{
    var aShowF = document.getElementById("aShowF");
    aShowF.src = F_weather_img;
    var aShowC = document.getElementById("aShowC");
    aShowC.src = C_weather_img;
    
    var tempHI_F_0 = document.getElementById("tempHI_F_0");
    var tempHI_F_1 = document.getElementById("tempHI_F_1");
    var tempHI_F_2 = document.getElementById("tempHI_F_2");
    var tempLO_F_0 = document.getElementById("tempLO_F_0");
    var tempLO_F_1 = document.getElementById("tempLO_F_1");
    var tempLO_F_2 = document.getElementById("tempLO_F_2");
    
    var tempHI_C_0 = document.getElementById("tempHI_C_0");
    var tempHI_C_1 = document.getElementById("tempHI_C_1");
    var tempHI_C_2 = document.getElementById("tempHI_C_2");
    var tempLO_C_0 = document.getElementById("tempLO_C_0");
    var tempLO_C_1 = document.getElementById("tempLO_C_1");
    var tempLO_C_2 = document.getElementById("tempLO_C_2");

    if (type == 'C') 
    {    
        tempHI_F_0.style.display = 'none';
        tempHI_F_1.style.display = 'none';
        tempHI_F_2.style.display = 'none';
        tempLO_F_0.style.display = 'none';
        tempLO_F_1.style.display = 'none';
        tempLO_F_2.style.display = 'none';
        
        tempHI_C_0.style.display = '';
        tempHI_C_1.style.display = '';
        tempHI_C_2.style.display = '';
        tempLO_C_0.style.display = '';
        tempLO_C_1.style.display = '';
        tempLO_C_2.style.display = '';
    }
    else
    {
        tempHI_C_0.style.display = 'none';
        tempHI_C_1.style.display = 'none';
        tempHI_C_2.style.display = 'none';
        tempLO_C_0.style.display = 'none';
        tempLO_C_1.style.display = 'none';
        tempLO_C_2.style.display = 'none';
        
        tempHI_F_0.style.display = '';
        tempHI_F_1.style.display = '';
        tempHI_F_2.style.display = '';
        tempLO_F_0.style.display = '';
        tempLO_F_1.style.display = '';
        tempLO_F_2.style.display = '';
    }
}