﻿// JScript 文件
var image_Country = new Array();
image_Country[0] = "images/enflag.gif";
image_Country[1] = "images/enflag_gray.gif";
image_Country[2] = "images/deflag.gif";
image_Country[3] = "images/deflag_gray.gif";
image_Country[4] = "images/frflag.gif";
image_Country[5] = "images/frflag_gray.gif";
image_Country[6] = "images/esflag.gif";
image_Country[7] = "images/esflag_gray.gif";
image_Country[8] = "images/icon_all.gif";
image_Country[9] = "images/icon_all_gray.gif";
image_Country[10] = "images/ruflag.gif";
image_Country[11] = "images/ruflag_gray.gif";
function setGameOrCountryFlag()
{
    try{
    var img_all = document.getElementById("img_all");
    var img_en = document.getElementById("img_en");
    var img_de = document.getElementById("img_de");
    var img_fr = document.getElementById("img_fr");
    var img_es = document.getElementById("img_es");
    var img_ru = document.getElementById("img_ru");
    var CountryStr = document.getElementById("CountryStr");
    var Country = document.getElementById("serverListChoose_uc1_txt_Country").value;
    var GameID = document.getElementById("serverListChoose_uc1_txt_GameID").value;
    if(GameID == 1)
    {
        CountryStr.style.display = "block";
        if(Country != "")
        {
            if(Country.toLowerCase() == "en")
            {

            }
            else if(Country.toLowerCase() == "de")
            {
                img_en.src = image_Country[1];
                img_de.src = image_Country[2];
            }
            else if(Country.toLowerCase() == "fr")
            {
                img_en.src = image_Country[1];
                img_fr.src = image_Country[4];
            }
            else if(Country.toLowerCase() == "es")
            {
                img_en.src = image_Country[1];
                img_es.src = image_Country[6];
            }
            else if(Country.toLowerCase() == "ru")
            {
                img_en.src = image_Country[1];
                img_ru.src = image_Country[10];
            }
        }
        else
        {
            img_all.src = image_Country[8];
            img_en.src = image_Country[1];
        }
    }
    else if(parseInt(GameID) == 45)
    {
        document.getElementById("gameLog45").style.display = "inline";
    }
    else if(parseInt(GameID) == 46)
    {
        document.getElementById("gameLog46").style.display = "inline";
    }
    else if(parseInt(GameID) == 49)
    {
        document.getElementById("gameLog49").style.display = "inline";
    }
    else if(parseInt(GameID) == 50)
    {
        document.getElementById("gameLog50").style.display = "inline";
    }    
    else
    {
        CountryStr.style.display = "none";
    }  
    }
    catch(e)      
    {
    }
}

