﻿    
    // JScript 文件
var image_Country = new Array();
image_Country[0] = "templates/images/enflag(1).gif";
image_Country[1] = "templates/images/enflag_gray.gif";
image_Country[2] = "templates/images/deflag.gif";
image_Country[3] = "templates/images/deflag_gray.gif";
image_Country[4] = "templates/images/frflag.gif";
image_Country[5] = "templates/images/frflag_gray.gif";
image_Country[6] = "templates/images/esflag.gif";
image_Country[7] = "templates/images/esflag_gray.gif";
image_Country[8] = "templates/images/icon_all.gif";
image_Country[9] = "templates/images/icon_all_gray.gif";
image_Country[10] = "templates/images/ruflag.gif";
image_Country[11] = "templates/images/ruflag_gray.gif";
function setCountryFlag()
{
    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("ServerLists1_txt_Country").value;
    var GameID = document.getElementById("ServerLists1_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
    {
        CountryStr.style.display = "none";
    }  
    }
    catch(e)      
    {
    }
}